Browse Source

拼团砍价,修改

zyh
w-R 3 years ago
parent
commit
7509662de2
  1. BIN
      assets/image/2x/di_zhi.png
  2. BIN
      assets/image/2x/ding_dan.png
  3. BIN
      assets/image/2x/dong_tai.png
  4. BIN
      assets/image/2x/fen_si.png
  5. BIN
      assets/image/2x/guan_zhu.png
  6. BIN
      assets/image/2x/ka.png
  7. BIN
      assets/image/2x/xiao_fei.png
  8. BIN
      assets/image/3x/di_zhi.png
  9. BIN
      assets/image/3x/ding_dan.png
  10. BIN
      assets/image/3x/dong_tai.png
  11. BIN
      assets/image/3x/fen_si.png
  12. BIN
      assets/image/3x/guan_zhu.png
  13. BIN
      assets/image/3x/ka.png
  14. BIN
      assets/image/3x/xiao_fei.png
  15. BIN
      assets/image/di_zhi.png
  16. BIN
      assets/image/ding_dan.png
  17. BIN
      assets/image/dong_tai.png
  18. BIN
      assets/image/fen_si.png
  19. BIN
      assets/image/guan_zhu.png
  20. BIN
      assets/image/ka.png
  21. BIN
      assets/image/xiao_fei.png
  22. 9
      lib/community/community_list.dart
  23. 5
      lib/message/system_details.dart
  24. 1
      lib/message/system_message.dart
  25. 5
      lib/mine/coupons_page.dart
  26. 40
      lib/mine/fans_page.dart
  27. 17
      lib/mine/follow_page.dart
  28. 3
      lib/mine/manage_address_page.dart
  29. 3
      lib/mine/mine_wallet_page.dart
  30. 2
      lib/mine/release_page.dart
  31. 1
      lib/mine/roll_center_page.dart
  32. 1
      lib/mine/vip_balance_page.dart
  33. 1
      lib/mine/vip_card_page.dart
  34. 26
      lib/order/bargain_group_order.dart
  35. 5
      lib/order/exchange_history_page.dart
  36. 1
      lib/order/logistics_information_page.dart
  37. 25
      lib/order/order_history_page.dart
  38. 4
      lib/retrofit/min_api.dart
  39. 207
      lib/retrofit/min_api.g.dart
  40. 4
      lib/retrofit/retrofit_api.dart
  41. 88
      lib/retrofit/retrofit_api.g.dart
  42. 5
      lib/store/shopping/activity_prefecture_details.dart
  43. 29
      lib/store/shopping/shopping_cart/shopping_cart_page.dart
  44. 230
      lib/store/shopping/shopping_goods_details.dart
  45. 143
      lib/store/shopping/shopping_home/group_details.dart
  46. 1
      lib/store/shopping/shopping_home/recommend_goods_list_view.dart
  47. 2
      lib/store/shopping/shopping_mall_home.dart
  48. 1
      lib/store/store_view/store_activity.dart
  49. 6
      lib/view_widget/no_data_view.dart
  50. 2
      pubspec.lock

BIN
assets/image/2x/di_zhi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
assets/image/2x/ding_dan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
assets/image/2x/dong_tai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
assets/image/2x/fen_si.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
assets/image/2x/guan_zhu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
assets/image/2x/ka.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
assets/image/2x/xiao_fei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/3x/di_zhi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
assets/image/3x/ding_dan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
assets/image/3x/dong_tai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
assets/image/3x/fen_si.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
assets/image/3x/guan_zhu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
assets/image/3x/ka.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
assets/image/3x/xiao_fei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
assets/image/di_zhi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/image/ding_dan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/dong_tai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
assets/image/fen_si.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/guan_zhu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/image/ka.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/image/xiao_fei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

9
lib/community/community_list.dart

@ -10,6 +10,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/icon_text.dart'; import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -84,6 +85,14 @@ class _CommunityList extends State<CommunityList> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
(widget.comments == null || widget.comments.length == 0)
? NoDataView(
src: widget.commentType == 1 ? "assets/image/dong_tai.png" :"assets/image/guan_zhu.png",
isShowBtn: false,
text:widget.commentType == 1 ? "目前暂无发布动态,要把开心的事讲出来哦~" :"目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
):
ListView.builder( ListView.builder(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount: widget.comments.length, itemCount: widget.comments.length,

5
lib/message/system_details.dart

@ -198,6 +198,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [ children: [
(messages == null || messages.length == 0) (messages == null || messages.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi, text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp, fontSize: 16.sp,
@ -322,6 +323,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [ children: [
(messages == null || messages.length == 0) (messages == null || messages.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi, text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp, fontSize: 16.sp,
@ -457,6 +459,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [ children: [
(messages == null || messages.length == 0) (messages == null || messages.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi, text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp, fontSize: 16.sp,
@ -603,6 +606,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [ children: [
(messages == null || messages.length == 0) (messages == null || messages.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi, text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp, fontSize: 16.sp,
@ -846,6 +850,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [ children: [
(messages == null || messages.length == 0) (messages == null || messages.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi, text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp, fontSize: 16.sp,

1
lib/message/system_message.dart

@ -403,6 +403,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
), ),
(messages == null || messages.length == 0) (messages == null || messages.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi, text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp, fontSize: 16.sp,

5
lib/mine/coupons_page.dart

@ -196,10 +196,11 @@ class _CouponsPage extends State<CouponsPage> {
itemCount: coupons != null ? coupons.length : 0, itemCount: coupons != null ? coupons.length : 0,
) )
: NoDataView( : NoDataView(
src: "assets/image/ka.png",
isShowBtn: false, isShowBtn: false,
text: "你还没有券", text: "目前暂无优惠券,请到领劵中心领取哦",
fontSize: 16.sp, fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h), margin: EdgeInsets.only(top: 120.h,left:60,right:60),
), ),
), ),
), ),

40
lib/mine/fans_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -18,9 +19,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class FansPage extends StatefulWidget { class FansPage extends StatefulWidget {
final Function refresh; final Function refresh;
FansPage( FansPage(this.refresh);
this.refresh
);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -81,12 +80,13 @@ class _FansPage extends State<FansPage> {
} }
/// ///
_vipFollow(followId,isFollow) async { _vipFollow(followId, isFollow) async {
BaseData baseData = await apiService.follow(followId); BaseData baseData = await apiService.follow(followId);
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
widget.refresh(); widget.refresh();
_queryFollowList(); _queryFollowList();
SmartDialog.showToast(isFollow?"取关成功":"关注成功", alignment: Alignment.center); SmartDialog.showToast(isFollow ? "取关成功" : "关注成功",
alignment: Alignment.center);
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
@ -94,8 +94,7 @@ class _FansPage extends State<FansPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Container(
body: Container(
margin: EdgeInsets.only(top: 2), margin: EdgeInsets.only(top: 2),
color: Colors.white, color: Colors.white,
child: SmartRefresher( child: SmartRefresher(
@ -108,9 +107,19 @@ class _FansPage extends State<FansPage> {
}, },
), ),
controller: _refreshController, controller: _refreshController,
onRefresh: (){_queryFollowList();}, onRefresh: () {
_queryFollowList();
},
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: ListView.builder( child: (list == null || list.length == 0)
? NoDataView(
src: "assets/image/fen_si.png",
isShowBtn: false,
text: "目前暂无粉丝,听说多发动态可以涨粉哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
)
: ListView.builder(
itemCount: list == null ? 0 : list.length, itemCount: list == null ? 0 : list.length,
padding: EdgeInsets.symmetric(vertical: 8.h), padding: EdgeInsets.symmetric(vertical: 8.h),
shrinkWrap: true, shrinkWrap: true,
@ -122,13 +131,6 @@ class _FansPage extends State<FansPage> {
child: fansItem(list[position]), child: fansItem(list[position]),
); );
}, },
)
// NoDataView(
// isShowBtn: false,
// text: "共关注0人",
// fontSize: 16.sp,
// margin: EdgeInsets.only(top: 120.h),
// ),
), ),
), ),
); );
@ -173,7 +175,7 @@ class _FansPage extends State<FansPage> {
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
_vipFollow(list.mid,list?.isFollow ?? false); _vipFollow(list.mid, list?.isFollow ?? false);
}); });
}, },
child: RoundButton( child: RoundButton(
@ -186,9 +188,7 @@ class _FansPage extends State<FansPage> {
text: (list?.isFollow ?? false) ? "已关注" : "关注", text: (list?.isFollow ?? false) ? "已关注" : "关注",
radius: 20, radius: 20,
icons: Icon( icons: Icon(
(list?.isFollow ?? false) (list?.isFollow ?? false) ? Icons.check : Icons.add,
? Icons.check
: Icons.add,
color: (list?.isFollow ?? false) color: (list?.isFollow ?? false)
? Color(0xFF808080) ? Color(0xFF808080)
: Colors.white, : Colors.white,

17
lib/mine/follow_page.dart

@ -112,7 +112,15 @@ class _FollowPage extends State<FollowPage> {
controller: _refreshController, controller: _refreshController,
onRefresh: (){_queryFollowList();}, onRefresh: (){_queryFollowList();},
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: ListView.builder( child: (list == null || list.length == 0)
? NoDataView(
src: "assets/image/guan_zhu.png",
isShowBtn: false,
text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
)
: ListView.builder(
itemCount: list == null ? 0 : list.length, itemCount: list == null ? 0 : list.length,
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -124,14 +132,7 @@ class _FollowPage extends State<FollowPage> {
); );
}, },
), ),
// NoDataView(
// isShowBtn: false,
// text: "共关注0人",
// fontSize: 16.sp,
// margin: EdgeInsets.only(top: 120.h),
// ),
), ),
), ),
); );
} }

3
lib/mine/manage_address_page.dart

@ -66,8 +66,9 @@ class _ManageAddressPage extends State<ManageAddressPage> {
Expanded( Expanded(
child: (addressList == null || addressList.length == 0) child: (addressList == null || addressList.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/di_zhi.png",
isShowBtn: false, isShowBtn: false,
text: "目前暂无送货地址,请添加", text: "目前暂无收货地址,请添加~",
fontSize: 16.sp, fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h), margin: EdgeInsets.only(top: 120.h),
) )

3
lib/mine/mine_wallet_page.dart

@ -172,8 +172,9 @@ class _MineWalletPage extends State<MineWalletPage> {
margin: EdgeInsets.only(top: 14.h), margin: EdgeInsets.only(top: 14.h),
child: (userBills == null || userBills.length == 0) child: (userBills == null || userBills.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/ding_dan.png",
isShowBtn: false, isShowBtn: false,
text: "目前暂未记录哦", text: "目前暂无记录哦~",
fontSize: 16.sp, fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h), margin: EdgeInsets.only(top: 120.h),
) )

2
lib/mine/release_page.dart

@ -103,7 +103,7 @@ class _ReleasePage extends State<ReleasePage> {
enablePullUp: true, enablePullUp: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
header: MyHeader(), header: MyHeader(),
footer: CustomFooter( footer:CustomFooter(
builder: (context, mode) { builder: (context, mode) {
return MyFooter(mode); return MyFooter(mode);
}, },

1
lib/mine/roll_center_page.dart

@ -152,6 +152,7 @@ class _RollCenterPage extends State<RollCenterPage> {
itemCount: (coupons != null && coupons.length > 0) ? coupons.length : 0, itemCount: (coupons != null && coupons.length > 0) ? coupons.length : 0,
) )
: NoDataView( : NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).haimeiyouyouhuiquankeyilingqu, text: S.of(context).haimeiyouyouhuiquankeyilingqu,
fontSize: 16.sp, fontSize: 16.sp,

1
lib/mine/vip_balance_page.dart

@ -92,6 +92,7 @@ class _VipBalancePage extends State<VipBalancePage> {
body: Container( body: Container(
child: (userBills == null || userBills.length == 0) child: (userBills == null || userBills.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: S.of(context).nihaimeiyouchongzhihuoxiaofeijilu, text: S.of(context).nihaimeiyouchongzhihuoxiaofeijilu,
fontSize: 16.sp, fontSize: 16.sp,

1
lib/mine/vip_card_page.dart

@ -88,6 +88,7 @@ class _VipCardPage extends State<VipCardPage> {
itemCount: coupons != null ? coupons.length : 0, itemCount: coupons != null ? coupons.length : 0,
) )
: NoDataView( : NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: "还没有会员卡~", text: "还没有会员卡~",
fontSize: 16.sp, fontSize: 16.sp,

26
lib/order/bargain_group_order.dart

@ -192,15 +192,10 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
}, },
), ),
controller: _refreshController, controller: _refreshController,
physics: BouncingScrollPhysics(),
onRefresh: _refresh, onRefresh: _refresh,
child: (activityOrderList?.length ?? 0) < 0 child: (activityOrderList != null && activityOrderList.length > 0)
? NoDataView( ?
isShowBtn: false,
text: "还没有订单,快去下一单吧~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)
:
ListView.builder( ListView.builder(
itemCount: activityOrderList?.length ?? 0, itemCount: activityOrderList?.length ?? 0,
shrinkWrap: true, shrinkWrap: true,
@ -208,6 +203,12 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
itemBuilder: (context, position) { itemBuilder: (context, position) {
return bargainOrder(activityOrderList[position]); return bargainOrder(activityOrderList[position]);
}, },
):NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: "还没有订单,快去下一单吧~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
), ),
), ),
); );
@ -441,7 +442,14 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
child: Row( child: Row(
children: [ children: [
GestureDetector( GestureDetector(
onTap: () {}, onTap: () {
Navigator.of(context)
.popAndPushNamed('/router/group_details', arguments: {
"actRecordId": activityOrderList.actRecordId,
"actProduct":activityOrderList,
"limitNumber":activityOrderList.howManyMore,
});
},
child: RoundButton( child: RoundButton(
height: 25.h, height: 25.h,
text: "查看详情", text: "查看详情",

5
lib/order/exchange_history_page.dart

@ -191,10 +191,11 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
onLoading: queryHistory, onLoading: queryHistory,
child: orders == null || orders.length == 0 child: orders == null || orders.length == 0
? NoDataView( ? NoDataView(
src: "assets/image/ding_dan.png",
isShowBtn: false, isShowBtn: false,
text: "暂无已完成的订单", text: "目前暂无记录,手上那么多积分要赶紧用掉哦~",
fontSize: 16.sp, fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h), margin: EdgeInsets.only(top: 120.h,left: 72,right: 72),
) )
: ListView.builder( : ListView.builder(
itemCount: orders == null ? 0 : orders.length, itemCount: orders == null ? 0 : orders.length,

1
lib/order/logistics_information_page.dart

@ -153,6 +153,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
position, logistics.length); position, logistics.length);
}) })
: NoDataView( : NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: "暂无物流信息~", text: "暂无物流信息~",
fontSize: 16.sp, fontSize: 16.sp,

25
lib/order/order_history_page.dart

@ -156,8 +156,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
); );
}) })
: NoDataView( : NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: "还没有订单,快去下一单吧~", text: "目前暂无订单,快去下一单吧~",
fontSize: 16.sp, fontSize: 16.sp,
margin: EdgeInsets.only(top: 120), margin: EdgeInsets.only(top: 120),
), ),
@ -253,8 +254,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
width: 1, width: 1,
color: Color(0xFF32A060), color: Color(0xFF32A060),
style: BorderStyle.solid, style: BorderStyle.solid,
) )),
),
child: Text( child: Text(
"", "",
style: TextStyle( style: TextStyle(
@ -266,8 +266,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
), ),
Container( Container(
width: 19, width: 19,
height:21, height: 21,
margin: EdgeInsets.only(left:7.w,top: 12.h), margin: EdgeInsets.only(left: 7.w, top: 12.h),
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xff32A060), color: Color(0xff32A060),
@ -542,18 +542,21 @@ class _OrderHistoryList extends State<OrderHistoryList>
}, },
); );
if (payChannel != null && payChannel > 0) { if (payChannel != null && payChannel > 0) {
OrderUtils.carryOnPay(payChannel, minService, orderInfo, () { OrderUtils.carryOnPay(
payChannel,
minService,
orderInfo,
() {
SmartDialog.showToast("订单支付成功"); SmartDialog.showToast("订单支付成功");
Future.delayed(Duration(seconds: 1), () { Future.delayed(Duration(seconds: 1), () {
_onRefresh(); _onRefresh();
}); });
},); },
);
} }
} }
payResult(BaseData baseData) { payResult(BaseData baseData) {}
}
orderCancel(String orderId) async { orderCancel(String orderId) async {
BaseData baseData = await apiService.orderCancel(orderId); BaseData baseData = await apiService.orderCancel(orderId);
@ -573,7 +576,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
// ? (orderInfo.storeVO.id ?? "") // ? (orderInfo.storeVO.id ?? "")
// : ""; // : "";
if(orderInfo.storeVO.posType.code == "NORMALSTORE") { if (orderInfo.storeVO.posType.code == "NORMALSTORE") {
Scan.toScan( Scan.toScan(
context, context,
orderInfo.storeVO.id, orderInfo.storeVO.id,

4
lib/retrofit/min_api.dart

@ -34,8 +34,8 @@ part 'min_api.g.dart';
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8765/app/";/// // const base_url = "http://192.168.10.236:8765/app/";///
const baseUrl = "http://192.168.10.236:8765/app/";/// // const baseUrl = "http://192.168.10.236:8765/app/";///
const base_url = "http://192.168.10.88:8765/app/";/// const base_url = "http://192.168.10.88:8765/app/";///

207
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/'; baseUrl ??= 'http://192.168.10.88:8765/app/';
} }
final Dio _dio; final Dio _dio;
@ -400,4 +400,209 @@ class _MinApiService implements MinApiService {
); );
return value; return value;
} }
@override
Future<BaseData<List<HomeRecommendList>>> recommendList() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'product/recommendList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<HomeRecommendList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<HomeRecommendList>(
(i) => HomeRecommendList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<ShoppingHomeConfig>> homeConfig() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('store/homeConfig',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ShoppingHomeConfig>.fromJson(
_result.data,
(json) => ShoppingHomeConfig.fromJson(json),
);
return value;
}
@override
Future<BaseData<ActivityAreaList>> findActListByType(allDay, type) async {
ArgumentError.checkNotNull(allDay, 'allDay');
ArgumentError.checkNotNull(type, 'type');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/findActListByType?allDay=$allDay&type=$type',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ActivityAreaList>.fromJson(
_result.data,
(json) => ActivityAreaList.fromJson(json),
);
return value;
}
@override
Future<BaseData<ActivityDetails>> viewProduct(actProductId, type) async {
ArgumentError.checkNotNull(actProductId, 'actProductId');
ArgumentError.checkNotNull(type, 'type');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/viewProduct?actProductId=$actProductId&type=$type',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ActivityDetails>.fromJson(
_result.data,
(json) => ActivityDetails.fromJson(json),
);
return value;
}
@override
Future<BaseData<dynamic>> launchAct(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/launchAct',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<dynamic>> joinAct(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/joinAct',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<dynamic>> actPay(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/actPay',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<List<ActivityOrderList>>> showMyActList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/showMyActList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<ActivityOrderList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<ActivityOrderList>(
(i) => ActivityOrderList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<ActivityActRecordDetails>> showOneAct(actRecordId) async {
ArgumentError.checkNotNull(actRecordId, 'actRecordId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/showOneAct?actRecordId=$actRecordId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ActivityActRecordDetails>.fromJson(
_result.data,
(json) => ActivityActRecordDetails.fromJson(json),
);
return value;
}
} }

4
lib/retrofit/retrofit_api.dart

@ -61,8 +61,8 @@ part 'retrofit_api.g.dart';
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8766/app/"; /// // const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; /// // const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";

88
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/'; baseUrl ??= 'http://192.168.10.88:8766/app/';
} }
final Dio _dio; final Dio _dio;
@ -17,22 +17,17 @@ class _ApiService implements ApiService {
String baseUrl; String baseUrl;
@override @override
Future<BaseData<UploadResult>> upload(data, folderId,bool isVideo) async { Future<BaseData<UploadResult>> upload(data, folderId, isVideo) async {
ArgumentError.checkNotNull(data, 'data'); ArgumentError.checkNotNull(data, 'data');
ArgumentError.checkNotNull(folderId, 'folderId'); ArgumentError.checkNotNull(folderId, 'folderId');
ArgumentError.checkNotNull(isVideo, 'isVideo');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = FormData(); final _data = FormData();
String fileName = data.path.split(Platform.pathSeparator).last;
if(!isVideo && !fileName.contains(".jpeg") && !fileName.contains(".png"))
fileName += ".jpeg";
else if(isVideo && !fileName.contains(".mp4"))
fileName += ".mp4";
_data.files.add(MapEntry( _data.files.add(MapEntry(
'file', 'file',
MultipartFile.fromFileSync(data.path, MultipartFile.fromFileSync(data.path,
filename: fileName))); filename: data.path.split(Platform.pathSeparator).last)));
print("filename:$fileName");
if (folderId != null) { if (folderId != null) {
_data.fields.add(MapEntry('folderId', folderId.toString())); _data.fields.add(MapEntry('folderId', folderId.toString()));
} }
@ -74,28 +69,6 @@ class _ApiService implements ApiService {
return value; return value;
} }
// @override
// Future<BaseData<dynamic>> memberLogin(param) async {
// ArgumentError.checkNotNull(param, 'param');
// const _extra = <String, dynamic>{};
// final queryParameters = <String, dynamic>{};
// final _data = <String, dynamic>{};
// _data.addAll(param ?? <String, dynamic>{});
// final _result = await _dio.request<Map<String, dynamic>>(
// '/auth/platform/memberLogin',
// queryParameters: queryParameters,
// options: RequestOptions(
// method: 'POST',
// headers: <String, dynamic>{},
// extra: _extra,
// baseUrl: baseUrl),
// data: _data);
// final value = BaseData<dynamic>.fromJson(
// _result.data,
// (json) => json as dynamic,
// );
// return value;
// }
@override @override
Future<BaseData<LoginInfo>> memberLogin(param) async { Future<BaseData<LoginInfo>> memberLogin(param) async {
ArgumentError.checkNotNull(param, 'param'); ArgumentError.checkNotNull(param, 'param');
@ -374,15 +347,13 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _headers = <String, dynamic>{};
_headers.addAll({"Environment":"app"});
_data.addAll(param ?? <String, dynamic>{}); _data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/create', '/creditOrder/create',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'POST', method: 'POST',
headers: _headers, headers: <String, dynamic>{},
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),
data: _data); data: _data);
@ -1037,8 +1008,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>('/app-msg/stats',
'/app-msg/stats',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -1415,7 +1385,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<CategorySelectList>>.fromJson( final value = BaseData<List<CategorySelectList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<CategorySelectList>((i) => CategorySelectList.fromJson(i as Map<String, dynamic>)) .map<CategorySelectList>(
(i) => CategorySelectList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -1450,8 +1421,7 @@ class _ApiService implements ApiService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
_data.addAll(map ?? <String, dynamic>{}); _data.addAll(map ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>('/course/list',
'/course/list',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'POST', method: 'POST',
@ -1486,7 +1456,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<CollectClassList>>.fromJson( final value = BaseData<List<CollectClassList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<CollectClassList>((i) => CollectClassList.fromJson(i as Map<String, dynamic>)) .map<CollectClassList>(
(i) => CollectClassList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -1509,7 +1480,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<CourseList>>.fromJson( final value = BaseData<List<CourseList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<CourseList>((i) => CourseList.fromJson(i as Map<String, dynamic>)) .map<CourseList>(
(i) => CourseList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -1520,8 +1492,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>('/course/$id',
'/course/$id',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -1559,13 +1530,14 @@ class _ApiService implements ApiService {
} }
@override @override
Future<BaseData<List<VipBadgesList>>> findBadges(param) async { Future<BaseData<List<VipBadgesList>>> findBadges(map) async {
ArgumentError.checkNotNull(param, 'param'); ArgumentError.checkNotNull(map, 'map');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{}); _data.addAll(map ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/app-memberAchievement/findBadges', final _result = await _dio.request<Map<String, dynamic>>(
'/app-memberAchievement/findBadges',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'POST', method: 'POST',
@ -1576,13 +1548,15 @@ class _ApiService implements ApiService {
final value = BaseData<List<VipBadgesList>>.fromJson( final value = BaseData<List<VipBadgesList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<VipBadgesList>((i) => VipBadgesList.fromJson(i as Map<String, dynamic>)) .map<VipBadgesList>(
(i) => VipBadgesList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@override @override
Future<BaseData<List<AchievementDetailList>>> getAchievementDetail(achievementCategoryId) async { Future<BaseData<List<AchievementDetailList>>> getAchievementDetail(
achievementCategoryId) async {
ArgumentError.checkNotNull(achievementCategoryId, 'achievementCategoryId'); ArgumentError.checkNotNull(achievementCategoryId, 'achievementCategoryId');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
@ -1599,7 +1573,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<AchievementDetailList>>.fromJson( final value = BaseData<List<AchievementDetailList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<AchievementDetailList>((i) => AchievementDetailList.fromJson(i as Map<String, dynamic>)) .map<AchievementDetailList>((i) =>
AchievementDetailList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -1621,7 +1596,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<VipBenefitList>>.fromJson( final value = BaseData<List<VipBenefitList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<VipBenefitList>((i) => VipBenefitList.fromJson(i as Map<String, dynamic>)) .map<VipBenefitList>(
(i) => VipBenefitList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -1631,8 +1607,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>('/home/vipBenefit',
'/home/vipBenefit',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'GET',
@ -1664,7 +1639,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<SecondCardList>>.fromJson( final value = BaseData<List<SecondCardList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<SecondCardList>((i) => SecondCardList.fromJson(i as Map<String, dynamic>)) .map<SecondCardList>(
(i) => SecondCardList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -1774,7 +1750,8 @@ class _ApiService implements ApiService {
final value = BaseData<List<HeadlinesList>>.fromJson( final value = BaseData<List<HeadlinesList>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => (json as List<dynamic>)
.map<HeadlinesList>((i) => HeadlinesList.fromJson(i as Map<String, dynamic>)) .map<HeadlinesList>(
(i) => HeadlinesList.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
return value; return value;
} }
@ -1800,5 +1777,4 @@ class _ApiService implements ApiService {
); );
return value; return value;
} }
} }

5
lib/store/shopping/activity_prefecture_details.dart

@ -176,7 +176,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
refreshController.refreshCompleted(); refreshController.refreshCompleted();
}); });
} else { } else {
refreshController.refreshFailed(); refreshController.refreshCompleted();
} }
} }
@ -217,7 +217,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
onRefresh: () { onRefresh: () {
setState(() { setState(() {
queryFindActListByType(pageType == "2" ? false : true); queryFindActListByType((pageType == "2" && seckillIndex == 0) ? false : true);
}); });
}, },
child:SingleChildScrollView( child:SingleChildScrollView(
@ -916,6 +916,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
], ],
), ),
), ),
SizedBox(width:2.w,),
Expanded( Expanded(
child: Text( child: Text(
productList.productPrice, productList.productPrice,

29
lib/store/shopping/shopping_cart/shopping_cart_page.dart

@ -13,6 +13,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -388,26 +389,14 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
} }
Widget cartGoodsList(){ Widget cartGoodsList(){
return return (shopCarGoods == null || shopCarGoods.length == 0)
// ((shopCarGoods?.length ?? 0) > 0) ?Container( ? NoDataView(
// // width: double.infinity, src: "assets/image/shopping_k.png",
// alignment: Alignment.center, isShowBtn: false,
// margin: EdgeInsets.only(bottom: 47.h,left: 66.w,right: 59.w), text:"目前暂无商品,要快去买点好吃的哦~",
// child:Column(children: [ fontSize: 16.sp,
// Image.asset( margin: EdgeInsets.only(top: 150.h),
// "assets/image/shopping_k.png", ):
// width:double.infinity,
// height: 250.h,
// ),
// Text(
// "目前暂无商品,要快去买点好吃的哦~",
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight: MyFontWeight.regular,
// color: Color(0xFF353535),
// ),
// ),
// ],)):
Container( Container(
margin: EdgeInsets.only(bottom: 50.h), margin: EdgeInsets.only(bottom: 50.h),
child: ListView.builder( child: ListView.builder(

230
lib/store/shopping/shopping_goods_details.dart

@ -75,7 +75,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
Timer _timer; Timer _timer;
String testTime = "2021-12-30 10:00:00"; String testTime = "2021-12-30 10:00:00";
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
@ -96,7 +95,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
limitNumber = widget.arguments["limitNumber"]; limitNumber = widget.arguments["limitNumber"];
limitTime = widget.arguments["limitTime"]; limitTime = widget.arguments["limitTime"];
bannerImg = widget.arguments["bannerImg"]; bannerImg = widget.arguments["bannerImg"];
productId =widget.arguments["productId"]; productId = widget.arguments["productId"];
startCountdownTimer(); startCountdownTimer();
debugPrint("store_param tenant:$tenant storeId:$storeId"); debugPrint("store_param tenant:$tenant storeId:$storeId");
@ -183,8 +182,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
miNiDetail = baseData.data; miNiDetail = baseData.data;
if(pageType != null) if (pageType != null) queryViewProduct(actProductId, pageType);
queryViewProduct(actProductId, pageType);
}); });
refreshController.refreshCompleted(); refreshController.refreshCompleted();
} else { } else {
@ -212,10 +210,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
setState(() { setState(() {
activityDetails = baseData.data; activityDetails = baseData.data;
miNiDetail.productSkuVOList.forEach((element) { miNiDetail.productSkuVOList.forEach((element) {
var sku = activityDetails.actProduct.skuJson.firstWhere((ele) => ele.skuId == element.id); var sku = activityDetails.actProduct.skuJson
if(sku == null ){ .firstWhere((ele) => ele.skuId == element.id);
if (sku == null) {
miNiDetail.productSkuVOList.remove(sku); miNiDetail.productSkuVOList.remove(sku);
}else{ } else {
element.skuPrice = sku.skuPrice.toString(); element.skuPrice = sku.skuPrice.toString();
element.skuStock = sku.skuStock.toInt(); element.skuStock = sku.skuStock.toInt();
} }
@ -289,7 +288,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
} }
/// ///
Future _addShopCar(MiNiDetail miNiDetail, selectSkus, int count,) async { Future _addShopCar(
MiNiDetail miNiDetail,
selectSkus,
int count,
) async {
if (selectSkus != null && selectSkus.length == 0) { if (selectSkus != null && selectSkus.length == 0) {
productSku = miNiDetail.productSkuVOList.first; productSku = miNiDetail.productSkuVOList.first;
} else { } else {
@ -310,14 +313,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
.toString() .toString()
.replaceAll("[", "") .replaceAll("[", "")
.replaceAll("]", "") .replaceAll("]", "")
.replaceAll(",", "") .replaceAll(",", "");
;
setState(() { setState(() {
skuId1 = skuId; skuId1 = skuId;
skuValue1 = skuValue; skuValue1 = skuValue;
count1 = count; count1 = count;
}); });
} }
///1 ///1
@ -355,7 +356,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
} }
} }
_onRefresh(){ _onRefresh() {
if (pageType == null) { if (pageType == null) {
queryMiNiDetail(id); queryMiNiDetail(id);
} else { } else {
@ -370,10 +371,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
var callback = ((timer) { var callback = ((timer) {
if (isDispose) return; if (isDispose) return;
setState(() { setState(() {
if((activityDetails?.actRecordAndJoinlDTOList) != null) if ((activityDetails?.actRecordAndJoinlDTOList) != null)
activityDetails.actRecordAndJoinlDTOList.forEach((element) { activityDetails.actRecordAndJoinlDTOList.forEach((element) {
var tempDateTime = var tempDateTime = DateTime.parse(element.actRecord.endTime)
DateTime.parse(element.actRecord.endTime).difference(DateTime.now()); .difference(DateTime.now());
if (tempDateTime.inSeconds < 0) { if (tempDateTime.inSeconds < 0) {
element.actRecord.tempDay = 0; element.actRecord.tempDay = 0;
element.actRecord.tempHour = 0; element.actRecord.tempHour = 0;
@ -382,9 +383,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
return; return;
} }
element.actRecord.tempDay = tempDateTime.inDays; element.actRecord.tempDay = tempDateTime.inDays;
element.actRecord.tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); element.actRecord.tempHour =
element.actRecord.tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); tempDateTime.inHours - (tempDateTime.inDays * 24);
element.actRecord.tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); element.actRecord.tempM =
tempDateTime.inMinutes - (tempDateTime.inHours * 60);
element.actRecord.tempS =
tempDateTime.inSeconds - (tempDateTime.inMinutes * 60);
}); });
}); });
}); });
@ -404,12 +408,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
arguments: { arguments: {
"storeInfo": storeInfo, "storeInfo": storeInfo,
"tableId": tableId, "tableId": tableId,
// "parentCode": parentCode, "parentCode": parentCode,
// "parentId": parentId, "parentId": parentId,
"pName":pName, "pName": pName,
"pid":pid, "pid": pid,
"cName":cName, "cName": cName,
"cid":cid, "cid": cid,
"shoppingCartSkuItemList": [ "shoppingCartSkuItemList": [
{ {
"buyNum": count1, "buyNum": count1,
@ -426,7 +430,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
// "numberOfPeople": numberOfPeople, // "numberOfPeople": numberOfPeople,
}, },
); );
} }
@override @override
@ -465,12 +468,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
buildColumn(), buildColumn(),
/// ///
if (pageType == "1") if (pageType == "1") groupOption(),
groupOption(),
/// ///
if(pageType == "1") if (pageType == "1") groupRule(),
groupRule(),
goodsOption(), goodsOption(),
Padding( Padding(
padding: EdgeInsets.only(top: 16.h, bottom: 12.h), padding: EdgeInsets.only(top: 16.h, bottom: 12.h),
@ -612,15 +613,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
/// ///
Widget payButton() { Widget payButton() {
return Container( return Container(
child:Row( child: Row(
children: [ children: [
if(pageType == null) if (pageType == null)
Row( Row(
children: [ children: [
GestureDetector( GestureDetector(
onTap: () { onTap: () {
if (productSku == null) if (productSku == null)
SmartDialog.showToast("请选择規格!", alignment: Alignment.center); SmartDialog.showToast("请选择規格!",
alignment: Alignment.center);
addShoppingCar(); addShoppingCar();
}, },
child: Container( child: Container(
@ -680,17 +682,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
/// ///
if(pageType == "2") if (pageType == "2")
Row( Row(
children: [ children: [
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
toDownOrder(); toDownOrder();
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
width: 120.w, width: 120.w,
height:40.h, height: 40.h,
margin: EdgeInsets.only(left: 6.w), margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
@ -714,7 +716,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
TextSpan( TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "", text:
activityDetails?.actProduct?.productPrice ??
"",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -724,8 +728,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
], ],
), ),
), ),
Expanded(child: Expanded(
Text( child: Text(
"原价购买", "原价购买",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
@ -738,7 +742,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
toDownOrder(); toDownOrder();
}, },
child: Container( child: Container(
@ -772,7 +776,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
TextSpan( TextSpan(
text: activityDetails?.actProduct?.promotionPrice ?? "", text: activityDetails
?.actProduct?.promotionPrice ??
"",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -782,15 +788,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
], ],
), ),
), ),
Expanded(child: Expanded(
Text( child: Text(
"我要秒杀", "我要秒杀",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Colors.white, color: Colors.white,
), ),
),), ),
),
], ],
), ),
)), )),
@ -798,17 +805,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
/// ///
if(pageType == "3") if (pageType == "3")
Row( Row(
children: [ children: [
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
toDownOrder(); toDownOrder();
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
width: 120.w, width: 120.w,
height:40.h, height: 40.h,
margin: EdgeInsets.only(left: 6.w), margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
@ -832,7 +839,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
TextSpan( TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "", text:
activityDetails?.actProduct?.productPrice ??
"",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -842,8 +851,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
], ],
), ),
), ),
Expanded(child: Expanded(
Text( child: Text(
"原价购买", "原价购买",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
@ -856,8 +865,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
Navigator.of(context).popAndPushNamed('/router/bargain_details'); if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
}
Navigator.of(context)
.popAndPushNamed('/router/bargain_details',arguments: {
// "actRecordId": activityDetails.actRecordAndJoinlDTOList[0]
// .actRecordJoinList[index].actRecordId,
"actProduct":activityDetails.actProduct,
});
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
@ -890,7 +908,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
TextSpan( TextSpan(
text:activityDetails?.actProduct?.promotionPrice ?? "", text: activityDetails
?.actProduct?.promotionPrice ??
"",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -900,34 +920,34 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
], ],
), ),
), ),
Expanded(child: Expanded(
Text( child: Text(
"我要砍价", "我要砍价",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Colors.white, color: Colors.white,
), ),
),), ),
),
], ],
), ),
)), )),
], ],
), ),
/// ///
if(pageType == "1") if (pageType == "1")
Row( Row(
children: [ children: [
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
toDownOrder(); toDownOrder();
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
width: 120.w, width: 120.w,
height:40.h, height: 40.h,
margin: EdgeInsets.only(left: 6.w), margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
@ -951,7 +971,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
TextSpan( TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "", text:
activityDetails?.actProduct?.productPrice ??
"",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -961,8 +983,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
], ],
), ),
), ),
Expanded(child: Expanded(
Text( child: Text(
"单人购买", "单人购买",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
@ -975,7 +997,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
toDownOrder(); toDownOrder();
}, },
child: Container( child: Container(
@ -1009,7 +1031,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
TextSpan( TextSpan(
text:activityDetails?.actProduct?.promotionPrice ?? "", text: activityDetails
?.actProduct?.promotionPrice ??
"",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -1019,15 +1043,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
], ],
), ),
), ),
Expanded(child: Expanded(
Text( child: Text(
"我要开团", "我要开团",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Colors.white, color: Colors.white,
), ),
),), ),
),
], ],
), ),
)), )),
@ -1342,7 +1367,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
height: 1.h, height: 1.h,
color: Color(0xFFF1F1F1), color: Color(0xFFF1F1F1),
), ),
Row( GestureDetector(
onTap: () {
setState(() {
if (pageType == null) {
showStoreSelector(miNiDetail, id, 1);
} else {
showStoreSelector(miNiDetail, productId, 1);
}
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -1369,24 +1404,13 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
), ),
GestureDetector( Icon(
onTap: () {
setState(() {
if(pageType == null){
showStoreSelector(miNiDetail, id, 1);
}else {
showStoreSelector(miNiDetail, productId, 1);
}
});
},
child: Icon(
Icons.arrow_forward_ios, Icons.arrow_forward_ios,
color: Colors.black, color: Colors.black,
size: 16.sp, size: 16.sp,
), ),
),
], ],
), )),
Container( Container(
margin: EdgeInsets.only(left: 32.w, top: 8.h, bottom: 8.h), margin: EdgeInsets.only(left: 32.w, top: 8.h, bottom: 8.h),
width: double.infinity, width: double.infinity,
@ -1467,9 +1491,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
GestureDetector( GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
Navigator.of(context) Navigator.of(context).popAndPushNamed(
.popAndPushNamed('/router/group_page_details', '/router/group_page_details',
arguments: {"actRecordAndJoinlDTOList":json.encode(activityDetails.actRecordAndJoinlDTOList),}); arguments: {
"actRecordAndJoinlDTOList": json
.encode(activityDetails.actRecordAndJoinlDTOList),
});
}); });
}, },
child: Text( child: Text(
@ -1491,7 +1518,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
SizedBox(height: 12.h), SizedBox(height: 12.h),
ListView.builder( ListView.builder(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount:activityDetails?.actRecordAndJoinlDTOList?.length ?? 0, itemCount: activityDetails?.actRecordAndJoinlDTOList?.length ?? 0,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -1500,7 +1527,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
onTap: () { onTap: () {
setState(() {}); setState(() {});
}, },
child: groupItem(activityDetails.actRecordAndJoinlDTOList[position],position), child: groupItem(
activityDetails.actRecordAndJoinlDTOList[position],
position),
); );
}, },
), ),
@ -1509,7 +1538,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
); );
} }
Widget groupItem(ActRecordAndJoinlDTOList actRecordAndJoinlDTOList,index) { Widget groupItem(ActRecordAndJoinlDTOList actRecordAndJoinlDTOList, index) {
return Container( return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h), margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row( child: Row(
@ -1517,9 +1546,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
MImage( MImage(
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ??"", actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ?? "",
width:30, width: 30,
height:30, height: 30,
fit: BoxFit.cover, fit: BoxFit.cover,
isCircle: true, isCircle: true,
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
@ -1528,7 +1557,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
SizedBox(width: 4.w), SizedBox(width: 4.w),
Expanded( Expanded(
child: Text( child: Text(
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ??"", actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ??
"",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -1551,7 +1581,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
TextSpan( TextSpan(
text:activityDetails.actRecordAndJoinlDTOList[0].actRecord.joinNum.toString(), text: (limitNumber - (activityDetails.actRecordAndJoinlDTOList[0].actRecord.joinNum)).toString(),
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -1570,7 +1600,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
), ),
Text( Text(
"剩余${(actRecordAndJoinlDTOList?.actRecord?.tempDay != 0)?actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}", "剩余${(actRecordAndJoinlDTOList?.actRecord?.tempDay != 0) ? actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -1580,9 +1610,14 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
], ],
), ),
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
Navigator.of(context).popAndPushNamed('/router/group_details', Navigator.of(context)
arguments: {"actRecordId":activityDetails.actRecordAndJoinlDTOList[0].actRecordJoinList[index].actRecordId}); .popAndPushNamed('/router/group_details', arguments: {
"actRecordId": activityDetails.actRecordAndJoinlDTOList[0]
.actRecordJoinList[index].actRecordId,
"actProduct":activityDetails.actProduct,
"limitNumber":limitNumber,
});
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
@ -1615,9 +1650,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
color: Colors.white, color: Colors.white,
), ),
), ),
) ,
), ),
),
], ],
), ),
); );

143
lib/store/shopping/shopping_home/group_details.dart

@ -6,6 +6,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/retrofit/data/activity_actRecord_details.dart'; import 'package:huixiang/retrofit/data/activity_actRecord_details.dart';
import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
@ -30,6 +31,7 @@ class GroupDetails extends StatefulWidget {
class _GroupDetails extends State<GroupDetails> { class _GroupDetails extends State<GroupDetails> {
MinApiService minService; MinApiService minService;
String actRecordId; String actRecordId;
// ActProduct actProduct;
ActivityActRecordDetails activityActRecordDetails; ActivityActRecordDetails activityActRecordDetails;
bool isDispose = false; bool isDispose = false;
Timer _timer; Timer _timer;
@ -38,6 +40,7 @@ class _GroupDetails extends State<GroupDetails> {
int tempHour = 0; int tempHour = 0;
int tempM = 0; int tempM = 0;
int tempS = 0; int tempS = 0;
int limitNumber = 0;
@override @override
void dispose() { void dispose() {
@ -54,7 +57,8 @@ class _GroupDetails extends State<GroupDetails> {
void initState() { void initState() {
super.initState(); super.initState();
actRecordId = widget.arguments["actRecordId"]; actRecordId = widget.arguments["actRecordId"];
// actProduct = widget.arguments["actProduct"];
limitNumber = widget.arguments["limitNumber"];
startCountdownTimer(); startCountdownTimer();
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
String minToken = value.getString("minToken"); String minToken = value.getString("minToken");
@ -216,7 +220,7 @@ class _GroupDetails extends State<GroupDetails> {
), ),
), ),
// MImage( // MImage(
// "", // actProduct?.productImg??"",
// width: double.infinity, // width: double.infinity,
// height: 166, // height: 166,
// fit: BoxFit.cover, // fit: BoxFit.cover,
@ -381,7 +385,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E), color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) || tempDay == 0) ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.circular(4)),
child: Text( child: Text(
tempDay.toString(), tempDay.toString(),
@ -401,7 +405,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E), color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
), ),
)), )),
], ],
@ -414,7 +418,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E), color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.circular(4)),
child: Text( child: Text(
tempHour.toString(), tempHour.toString(),
@ -434,7 +438,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E), color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
), ),
)), )),
InkWell( InkWell(
@ -445,7 +449,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E), color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.circular(4)),
child: Text( child: Text(
tempM.toString(), tempM.toString(),
@ -465,7 +469,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E), color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
), ),
)), )),
InkWell( InkWell(
@ -476,7 +480,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E), color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.circular(4)),
child: Text( child: Text(
tempS.toString(), tempS.toString(),
@ -493,14 +497,16 @@ class _GroupDetails extends State<GroupDetails> {
SizedBox( SizedBox(
height: 24, height: 24,
), ),
// Text( if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber)
// "恭喜您拼团成功", Text(
// style: TextStyle( "恭喜您拼团成功",
// fontSize: 18.sp, style: TextStyle(
// fontWeight: MyFontWeight.semi_bold, fontSize: 18.sp,
// color: Colors.black, fontWeight: MyFontWeight.semi_bold,
// ), color: Colors.black,
// ), ),
),
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber)
Text.rich( Text.rich(
TextSpan( TextSpan(
children: [ children: [
@ -513,7 +519,7 @@ class _GroupDetails extends State<GroupDetails> {
), ),
), ),
TextSpan( TextSpan(
text:(activityActRecordDetails?.actRecord?.joinNum ?? 0).toString(), text:(limitNumber - (activityActRecordDetails?.actRecord?.joinNum ?? 0)).toString(),
style: TextStyle( style: TextStyle(
fontSize: 18.sp, fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
@ -531,14 +537,6 @@ class _GroupDetails extends State<GroupDetails> {
], ],
), ),
), ),
// Text(
// "很遗憾,拼团失败",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Colors.black,
// ),
// ),
SizedBox( SizedBox(
height: 32, height: 32,
), ),
@ -551,11 +549,11 @@ class _GroupDetails extends State<GroupDetails> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemCount:activityActRecordDetails?.actRecord?.joinNum ?? 0, itemCount:limitNumber,
itemBuilder: (context, position) { itemBuilder: (context, position) {
return GestureDetector( return GestureDetector(
onTap: () {}, onTap: () {},
child: groupItem(activityActRecordDetails.actRecordJoinList[position]), child: groupItem(position),
); );
}, },
), ),
@ -563,6 +561,7 @@ class _GroupDetails extends State<GroupDetails> {
SizedBox( SizedBox(
height:54.h, height:54.h,
), ),
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber)
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
@ -585,44 +584,44 @@ class _GroupDetails extends State<GroupDetails> {
), ),
)), )),
), ),
// InkWell( if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber)
// onTap: () { InkWell(
// setState(() { onTap: () {
// }); setState(() {
// }, });
// child:Container( },
// width:double.infinity, child:Container(
// height:54.h, width:double.infinity,
// margin: EdgeInsets.only(bottom: 28), height:54.h,
// alignment: Alignment.center, margin: EdgeInsets.only(bottom: 28),
// decoration: BoxDecoration( alignment: Alignment.center,
// color: Color(0xFF00A359), decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(27)), color: Color(0xFF00A359),
// child: Row( borderRadius: BorderRadius.circular(27)),
// mainAxisAlignment: MainAxisAlignment.center, child: Row(
// crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
// children: [ crossAxisAlignment: CrossAxisAlignment.center,
// Image.asset( children: [
// "assets/image/wx.png", Image.asset(
// width:24, "assets/image/wx.png",
// height:24, width:24,
// fit: BoxFit.cover, height:24,
// ), fit: BoxFit.cover,
// SizedBox( ),
// width:8, SizedBox(
// ), width:8,
// Text( ),
// "邀请微信好友一起拼团", Text(
// style: TextStyle( "邀请微信好友一起拼团",
// fontSize: 16.sp, style: TextStyle(
// fontWeight: MyFontWeight.medium, fontSize: 16.sp,
// color: Colors.white, fontWeight: MyFontWeight.medium,
// ), color: Colors.white,
// ) ),
// ], )
// )), ],
// ), )),
// ),
// InkWell( // InkWell(
// onTap: () { // onTap: () {
// setState(() { // setState(() {
@ -650,16 +649,19 @@ class _GroupDetails extends State<GroupDetails> {
); );
} }
Widget groupItem(ActRecordJoinList actRecordJoinList) { Widget groupItem(position) {
return Container( return Container(
margin: EdgeInsets.only(right:25), margin: EdgeInsets.only(right:25),
child:Row( child:Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
if(position < (activityActRecordDetails?.actRecord?.joinNum ?? 0))
Stack( Stack(
children: [ children: [
Container( Container(
width:70,
height:70,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60), borderRadius: BorderRadius.circular(60),
@ -670,7 +672,7 @@ class _GroupDetails extends State<GroupDetails> {
), ),
), ),
child:MImage( child:MImage(
actRecordJoinList?.memberAvatar ?? "", activityActRecordDetails.actRecordJoinList[position]?.memberAvatar ?? "",
width:60, width:60,
height:60, height:60,
fit: BoxFit.cover, fit: BoxFit.cover,
@ -679,7 +681,7 @@ class _GroupDetails extends State<GroupDetails> {
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
), ),
), ),
actRecordJoinList.isLeader ? activityActRecordDetails.actRecordJoinList[position].isLeader ?
Align( Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child:Container( child:Container(
@ -705,8 +707,7 @@ class _GroupDetails extends State<GroupDetails> {
):Container(), ):Container(),
], ],
), ),
if( if(position >= (activityActRecordDetails?.actRecord?.joinNum ?? 0))
activityActRecordDetails.actRecord.joinNum != 0)
Container( Container(
width: 60, width: 60,
height: 67, height: 67,

1
lib/store/shopping/shopping_home/recommend_goods_list_view.dart

@ -42,6 +42,7 @@ class _RecommendGoodsListView extends State<RecommendGoodsListView> {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top:5.h),
color: Color(0xFF32A060), color: Color(0xFF32A060),
width: 35.w, width: 35.w,
height: 5.h, height: 5.h,

2
lib/store/shopping/shopping_mall_home.dart

@ -121,7 +121,7 @@ class _ShoppingMallHome extends State<ShoppingMallHome>
children: [ children: [
Container( Container(
// padding: EdgeInsets.only(top: 40.h), // padding: EdgeInsets.only(top: 40.h),
height: 260.h, height: 230.h,
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: new LinearGradient( gradient: new LinearGradient(
begin: Alignment.centerRight, begin: Alignment.centerRight,

1
lib/store/store_view/store_activity.dart

@ -30,6 +30,7 @@ class _StoreActivity extends State<StoreActivity> {
), ),
color: Colors.white, color: Colors.white,
child: NoDataView( child: NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false, isShowBtn: false,
text: "还没有活动~", text: "还没有活动~",
iconWidth: 220, iconWidth: 220,

6
lib/view_widget/no_data_view.dart

@ -3,6 +3,7 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class NoDataView extends StatelessWidget { class NoDataView extends StatelessWidget {
final String src;
final bool isShowBtn; final bool isShowBtn;
final String text; final String text;
final double fontSize; final double fontSize;
@ -11,6 +12,7 @@ class NoDataView extends StatelessWidget {
final EdgeInsets margin; final EdgeInsets margin;
NoDataView({ NoDataView({
this.src,
this.isShowBtn = true, this.isShowBtn = true,
this.text, this.text,
this.fontSize, this.fontSize,
@ -27,7 +29,7 @@ class NoDataView extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
Image( Image(
image: AssetImage("assets/image/icon_empty.png"), image: AssetImage(src),
width: iconWidth, width: iconWidth,
height: iconHeight, height: iconHeight,
), ),
@ -36,8 +38,10 @@ class NoDataView extends StatelessWidget {
), ),
Text( Text(
text, text,
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: fontSize, fontSize: fontSize,
height: 1.5,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), ),

2
pubspec.lock

@ -867,7 +867,7 @@ packages:
name: xdg_directories name: xdg_directories
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.2.0" version: "0.2.0+1"
xml: xml:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save