1、聚合搜索
2、公共视频详情页
This commit is contained in:
parent
0b99562766
commit
ce0331e4c6
@ -14,5 +14,8 @@ class CommonApi {
|
||||
// 获取字典枚举
|
||||
static const String dictionaryApi = '/app/sys/dict/type/';
|
||||
|
||||
// 聚合搜索
|
||||
static const String aggregationSearchApi = '/app/common/search';
|
||||
|
||||
///resource/oss/upload
|
||||
}
|
||||
|
@ -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获取视频系详情
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -117,6 +117,7 @@ class ShopIndexController extends GetxController with GetSingleTickerProviderSta
|
||||
});
|
||||
|
||||
final data = res['data']['records'];
|
||||
print('商品返回数据------------------------->${data}');
|
||||
tab.dataList.addAll(data);
|
||||
// logger.w(res);
|
||||
|
||||
|
@ -597,7 +597,8 @@ class _ChatState extends State<Chat> with SingleTickerProviderStateMixin {
|
||||
),
|
||||
onTap: () {
|
||||
// 这里带上分享人的ID
|
||||
Get.toNamed('/goods');
|
||||
// Get.toNamed('/goods');
|
||||
Get.toNamed('/goods', arguments: {});
|
||||
},
|
||||
),
|
||||
));
|
||||
|
@ -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 部分
|
||||
|
@ -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
1404
lib/pages/video/commonVideo.dart
Normal file
1404
lib/pages/video/commonVideo.dart
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user