1、聚合搜索

2、公共视频详情页
This commit is contained in:
cuiyouliang 2025-08-30 16:49:21 +08:00
parent 0b99562766
commit ce0331e4c6
10 changed files with 2053 additions and 262 deletions

View File

@ -14,5 +14,8 @@ class CommonApi {
//
static const String dictionaryApi = '/app/sys/dict/type/';
//
static const String aggregationSearchApi = '/app/common/search';
///resource/oss/upload
}

View File

@ -8,9 +8,11 @@ class VideoApi {
// post
static const String myPublicList = '/app/vlog/myPublicList'; //
static const String myLikedList = '/app/vlog/myLikedList'; //
static const String videoCommentList = '/app/comment/list'; //
static const String videoCommentList = '/app/comment/page'; //
static const String doVideoComment = '/app/comment/publish'; //
static const String reportVideoApi = '/app/feedback/add'; //
static const String videoDetailApi = '/app/vlog/detail/'; // Id获取视频系详情

View File

@ -117,6 +117,7 @@ class ShopIndexController extends GetxController with GetSingleTickerProviderSta
});
final data = res['data']['records'];
print('商品返回数据------------------------->${data}');
tab.dataList.addAll(data);
// logger.w(res);

View File

@ -597,7 +597,8 @@ class _ChatState extends State<Chat> with SingleTickerProviderStateMixin {
),
onTap: () {
// ID
Get.toNamed('/goods');
// Get.toNamed('/goods');
Get.toNamed('/goods', arguments: {});
},
),
));

View File

@ -48,13 +48,13 @@ class _GoodsState extends State<Goods> {
@override
void initState() {
super.initState();
final shopId = Get.arguments;
final goodsId = Get.arguments['goodsId'];
scrollController.addListener(() {
setState(() {
scrollOffset = scrollController.offset;
});
});
shopDetail(shopId);
shopDetail(goodsId);
}
@override
@ -64,9 +64,9 @@ class _GoodsState extends State<Goods> {
}
///
void shopDetail(shopId) async {
void shopDetail(goodsId) async {
try {
final res = await Http.get('${ShopApi.shopDetail}/$shopId');
final res = await Http.get('${ShopApi.shopDetail}/$goodsId');
logger.e(res['data']);
setState(() {
shopObj = res['data']; // data

View File

@ -104,7 +104,8 @@ class _IndexPageState extends State<IndexPage> with SingleTickerProviderStateMix
),
),
onTap: () {
Get.toNamed('/goods', arguments: item['id']);
// Get.toNamed('/goods', arguments: item['id']);
Get.toNamed('/goods', arguments: {'goodsId': item['id']});
},
);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,7 @@ import 'package:loopin/pages/my/vloger.dart';
import 'package:loopin/pages/video/report.dart';
import 'package:loopin/pages/search/index.dart';
import 'package:loopin/pages/search/search-result.dart';
import 'package:loopin/pages/video/commonVideo.dart';
import '../layouts/index.dart';
/* 引入路由页面 */
@ -40,6 +41,7 @@ final Map<String, Widget> routes = {
'/order/detail': const OrderDetail(),
'/vloger': const Vloger(),
'/report': const ReportPage(),
'/videoDetail': const VideoDetailPage(),
'/search': const SearchPage(),
'/search-result': const SearchResultPage(),
//settins

View File

@ -199,4 +199,13 @@ class Utils {
const weekdays = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
return weekdays[(weekday - 1) % 7];
}
//
String formatLikeCount(int count) {
if (count >= 10000) {
return '${(count / 10000).toStringAsFixed(1)}w';
} else if (count >= 1000) {
return '${(count / 1000).toStringAsFixed(1)}k';
}
return count.toString();
}
}