Browse Source

Merge branch 'dev' into new_revision_app

# Conflicts:
#	lib/community/community_child_page.dart
#	lib/community/headlines/article_page.dart
#	lib/generated/l10n.dart
#	lib/l10n/intl_en.arb
#	lib/l10n/intl_zh_CN.arb
#	lib/l10n/intl_zh_Hans_CN.arb
#	lib/l10n/intl_zh_Hant_CN.arb
#	lib/l10n/intl_zh_TW.arb
#	lib/mine/mine_page.dart
#	lib/retrofit/min_api.dart
#	lib/retrofit/min_api.g.dart
#	lib/retrofit/retrofit_api.dart
#	lib/retrofit/retrofit_api.g.dart
#	lib/settlement/settlement.dart
#	lib/utils/flutter_utils.dart
zyh
w-R 3 years ago
parent
commit
82a6a8e641
  1. BIN
      assets/image/2x/goods_cart.webp
  2. BIN
      assets/image/2x/goods_phone.webp
  3. BIN
      assets/image/2x/jg.webp
  4. BIN
      assets/image/2x/kan_jia.webp
  5. BIN
      assets/image/2x/ms.webp
  6. BIN
      assets/image/2x/ms_t.webp
  7. BIN
      assets/image/2x/pin_t.webp
  8. BIN
      assets/image/2x/pin_tuan.webp
  9. BIN
      assets/image/2x/shopping_cart.webp
  10. BIN
      assets/image/2x/shopping_cart_h.webp
  11. BIN
      assets/image/2x/shopping_home.webp
  12. BIN
      assets/image/2x/shopping_home_h.webp
  13. BIN
      assets/image/2x/wx.webp
  14. BIN
      assets/image/2x/yq_zt.webp
  15. BIN
      assets/image/2x/zt_m.webp
  16. BIN
      assets/image/2x/zt_zf.webp
  17. BIN
      assets/image/2x/zu_tuan.webp
  18. BIN
      assets/image/3x/goods_cart.webp
  19. BIN
      assets/image/3x/goods_phone.webp
  20. BIN
      assets/image/3x/jg.webp
  21. BIN
      assets/image/3x/kan_jia.webp
  22. BIN
      assets/image/3x/ms.webp
  23. BIN
      assets/image/3x/ms_t.webp
  24. BIN
      assets/image/3x/pin_t.webp
  25. BIN
      assets/image/3x/pin_tuan.webp
  26. BIN
      assets/image/3x/shopping_cart.webp
  27. BIN
      assets/image/3x/shopping_cart_h.webp
  28. BIN
      assets/image/3x/shopping_home.webp
  29. BIN
      assets/image/3x/shopping_home_h.webp
  30. BIN
      assets/image/3x/yq_zt.webp
  31. BIN
      assets/image/3x/zt_m.webp
  32. BIN
      assets/image/3x/zt_zf.webp
  33. BIN
      assets/image/3x/zu_tuan.webp
  34. BIN
      assets/image/goods_cart.webp
  35. BIN
      assets/image/goods_phone.webp
  36. BIN
      assets/image/jg.webp
  37. BIN
      assets/image/kan_jia.webp
  38. BIN
      assets/image/ms.webp
  39. BIN
      assets/image/ms_t.webp
  40. BIN
      assets/image/pin_t.webp
  41. BIN
      assets/image/pin_tuan.webp
  42. BIN
      assets/image/shopping_cart.webp
  43. BIN
      assets/image/shopping_cart_h.webp
  44. BIN
      assets/image/shopping_home.webp
  45. BIN
      assets/image/shopping_home_h.webp
  46. BIN
      assets/image/wx.webp
  47. BIN
      assets/image/yq_zt.webp
  48. BIN
      assets/image/zt_m.webp
  49. BIN
      assets/image/zt_zf.webp
  50. BIN
      assets/image/zu_tuan.webp
  51. 16
      lib/community/community_course.dart
  52. 2
      lib/community/community_details.dart
  53. 9
      lib/community/community_list.dart
  54. 1
      lib/community/headlines/article_page.dart
  55. 6
      lib/community/headlines/headlines_collection.dart
  56. 8
      lib/community/new_community_details.dart
  57. 4
      lib/generated/intl/messages_en.dart
  58. 4
      lib/generated/intl/messages_zh_CN.dart
  59. 4
      lib/generated/intl/messages_zh_Hans_CN.dart
  60. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  61. 2
      lib/generated/intl/messages_zh_TW.dart
  62. 24
      lib/generated/l10n.dart
  63. 16
      lib/home/home_view/shortcut_operation.dart
  64. 7
      lib/l10n/intl_en.arb
  65. 4
      lib/l10n/intl_zh_CN.arb
  66. 4
      lib/l10n/intl_zh_Hans_CN.arb
  67. 4
      lib/l10n/intl_zh_Hant_CN.arb
  68. 4
      lib/l10n/intl_zh_TW.arb
  69. 24
      lib/main.dart
  70. 20
      lib/message/system_details.dart
  71. 6
      lib/mine/coupons_page.dart
  72. 1
      lib/mine/follow_page.dart
  73. 2
      lib/mine/manage_address_page.dart
  74. 127
      lib/mine/mine_view/mine_item.dart
  75. 4
      lib/mine/mine_view/mine_order.dart
  76. 2
      lib/mine/release_page.dart
  77. 2
      lib/mine/vip_detail_page.dart
  78. 476
      lib/order/bargain_group_order.dart
  79. 4
      lib/order/exchange_history_page.dart
  80. 4
      lib/order/order_detail_page.dart
  81. 79
      lib/order/order_history_page.dart
  82. 2
      lib/order/order_view/order_status.dart
  83. 536
      lib/retrofit/data/activity_actRecord_details.dart
  84. 498
      lib/retrofit/data/activity_area_list.dart
  85. 657
      lib/retrofit/data/activity_details.dart
  86. 111
      lib/retrofit/data/activity_order_list.dart
  87. 416
      lib/retrofit/data/home_recommend_list.dart
  88. 148
      lib/retrofit/data/launch_join_act.dart
  89. 6
      lib/retrofit/data/miNiDetail.dart
  90. 4
      lib/retrofit/data/product.dart
  91. 740
      lib/retrofit/data/shopping_home_config.dart
  92. 51
      lib/retrofit/min_api.dart
  93. 205
      lib/retrofit/min_api.g.dart
  94. 3
      lib/retrofit/retrofit_api.dart
  95. 284
      lib/settlement/settlement.dart
  96. 15
      lib/settlement/settlement_model.dart
  97. 30
      lib/settlement/settlement_view/distribution.dart
  98. 136
      lib/settlement/settlement_view/settlement_order_commodity.dart
  99. 1097
      lib/store/shopping/activity_prefecture_details.dart
  100. 599
      lib/store/shopping/shopping_cart/shopping_cart_page.dart
  101. Some files were not shown because too many files have changed in this diff Show More

BIN
assets/image/2x/goods_cart.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

BIN
assets/image/2x/goods_phone.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

BIN
assets/image/2x/jg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

BIN
assets/image/2x/kan_jia.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

BIN
assets/image/2x/ms.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/image/2x/ms_t.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/2x/pin_t.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/pin_tuan.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

BIN
assets/image/2x/shopping_cart.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

BIN
assets/image/2x/shopping_cart_h.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

BIN
assets/image/2x/shopping_home.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

BIN
assets/image/2x/shopping_home_h.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

BIN
assets/image/2x/wx.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

BIN
assets/image/2x/yq_zt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

BIN
assets/image/2x/zt_m.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/2x/zt_zf.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/zu_tuan.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

BIN
assets/image/3x/goods_cart.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/3x/goods_phone.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
assets/image/3x/jg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
assets/image/3x/kan_jia.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/image/3x/ms.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
assets/image/3x/ms_t.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
assets/image/3x/pin_t.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
assets/image/3x/pin_tuan.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/image/3x/shopping_cart.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
assets/image/3x/shopping_cart_h.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
assets/image/3x/shopping_home.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/3x/shopping_home_h.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
assets/image/3x/yq_zt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
assets/image/3x/zt_m.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
assets/image/3x/zt_zf.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets/image/3x/zu_tuan.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
assets/image/goods_cart.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

BIN
assets/image/goods_phone.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

BIN
assets/image/jg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

BIN
assets/image/kan_jia.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

BIN
assets/image/ms.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/ms_t.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

BIN
assets/image/pin_t.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

BIN
assets/image/pin_tuan.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

BIN
assets/image/shopping_cart.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

BIN
assets/image/shopping_cart_h.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

BIN
assets/image/shopping_home.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

BIN
assets/image/shopping_home_h.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

BIN
assets/image/wx.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

BIN
assets/image/yq_zt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

BIN
assets/image/zt_m.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

BIN
assets/image/zt_zf.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

BIN
assets/image/zu_tuan.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

16
lib/community/community_course.dart

@ -16,7 +16,6 @@ import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/store_title_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'community_view/class_list_view.dart';
@ -245,21 +244,6 @@ class _CommunityCourse extends State<CommunityCourse>
left: 0,
right: 0,
),
if (brands != null && brands.length > 0)
Positioned(
child: Container(
color: Colors.white,
child: StoreTitleTab(
brands,
globaKeys,
scrollController,
isScroll: true,
),
),
top: 0,
left: 0,
right: 0,
),
],
);
}

2
lib/community/community_details.dart

@ -127,7 +127,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
exitFull: () {
setState(() {});
},
userId:widget.arguments !=null ? widget.arguments["userId"] : widget.arguments["mid"],
userId:widget.arguments !=null ? widget.arguments["userId"] :widget.arguments["mid"],
itemCount: 3,
isDetails: true,
heightFun: (height) {

9
lib/community/community_list.dart

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

1
lib/community/headlines/article_page.dart

@ -18,7 +18,6 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/store_title_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';

6
lib/community/headlines/headlines_collection.dart

@ -16,7 +16,7 @@ class HeadlinesCollection extends StatefulWidget {
final List<HeadlinesList> headlines;
final List<Article> articles;
HeadlinesCollection(this.headlines,this.articles);
HeadlinesCollection(this.headlines, this.articles);
@override
State<StatefulWidget> createState() {
@ -44,13 +44,13 @@ class _HeadlinesCollection extends State<HeadlinesCollection> {
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
padding: EdgeInsets.symmetric(horizontal: 10),
itemCount:widget.headlines == null ? 0 : widget.headlines.length,
itemCount: widget.headlines == null ? 0 : widget.headlines.length,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/headlines_column_details',
arguments: {"id":widget.headlines[position].id});
arguments: {"id": widget.headlines[position].id});
},
child: headlinesCollectionItem(widget.headlines[position]),
);

8
lib/community/new_community_details.dart

@ -357,8 +357,8 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
fit: BoxFit.contain,
width: MediaQuery.of(context).size.width / 1.5,
height: MediaQuery.of(context).size.width,
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",
errorSrc: "assets/image/default_2_1.webp",
fadeSrc: "assets/image/default_2_1.webp",
)),
);
} else {
@ -395,8 +395,8 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
fit: BoxFit.cover,
aspectRatio: 1,
radius: BorderRadius.circular(1),
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",
errorSrc: "assets/image/default_2_1.webp",
fadeSrc: "assets/image/default_2_1.webp",
),
),
);

4
lib/generated/intl/messages_en.dart

@ -190,7 +190,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dingdanyisongda" : MessageLookupByLibrary.simpleMessage("订单送达"),
"dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("订单已退款"),
"dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("订单已完成"),
"dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单支付"),
"dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单支付"),
"dingwei" : MessageLookupByLibrary.simpleMessage("定位"),
"dizhi" : MessageLookupByLibrary.simpleMessage("地址"),
"dongtai" : MessageLookupByLibrary.simpleMessage("动态"),
@ -565,8 +565,10 @@ class MessageLookup extends MessageLookupByLibrary {
"wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"),
"wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"),
"wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍价"),
"wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"),
"wodenianling" : MessageLookupByLibrary.simpleMessage("我的年龄"),
"wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼团"),
"wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"),
"wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"),
"wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"),

4
lib/generated/intl/messages_zh_CN.dart

@ -190,7 +190,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dingdanyisongda" : MessageLookupByLibrary.simpleMessage("订单送达"),
"dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("订单已退款"),
"dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("订单已完成"),
"dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单支付"),
"dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单支付"),
"dingwei" : MessageLookupByLibrary.simpleMessage("定位"),
"dizhi" : MessageLookupByLibrary.simpleMessage("地址"),
"dongtai" : MessageLookupByLibrary.simpleMessage("动态"),
@ -563,8 +563,10 @@ class MessageLookup extends MessageLookupByLibrary {
"wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"),
"wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"),
"wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍价"),
"wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"),
"wodenianling" : MessageLookupByLibrary.simpleMessage("我的年龄"),
"wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼团"),
"wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"),
"wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"),
"wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"),

4
lib/generated/intl/messages_zh_Hans_CN.dart

@ -190,7 +190,7 @@ class MessageLookup extends MessageLookupByLibrary {
"dingdanyisongda" : MessageLookupByLibrary.simpleMessage("订单送达"),
"dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("订单已退款"),
"dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("订单已完成"),
"dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单支付"),
"dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单支付"),
"dingwei" : MessageLookupByLibrary.simpleMessage("定位"),
"dizhi" : MessageLookupByLibrary.simpleMessage("地址"),
"dongtai" : MessageLookupByLibrary.simpleMessage("动态"),
@ -563,8 +563,10 @@ class MessageLookup extends MessageLookupByLibrary {
"wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"),
"wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"),
"wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍价"),
"wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"),
"wodenianling" : MessageLookupByLibrary.simpleMessage("我的年龄"),
"wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼团"),
"wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"),
"wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"),
"wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -560,8 +560,10 @@ class MessageLookup extends MessageLookupByLibrary {
"wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"),
"wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的積分值"),
"wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍價"),
"wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"),
"wodenianling" : MessageLookupByLibrary.simpleMessage("我的年齡"),
"wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼團"),
"wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的錢包"),
"wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"),
"wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"),

2
lib/generated/intl/messages_zh_TW.dart

@ -563,8 +563,10 @@ class MessageLookup extends MessageLookupByLibrary {
"wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"),
"wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"),
"wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的積分值"),
"wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍價"),
"wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"),
"wodenianling" : MessageLookupByLibrary.simpleMessage("我的年齡"),
"wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼團"),
"wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的錢包"),
"wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"),
"wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"),

24
lib/generated/l10n.dart

@ -3165,10 +3165,10 @@ class S {
);
}
/// ``
/// ``
String get dingdanyizhifu {
return Intl.message(
'订单支付',
'订单支付',
name: 'dingdanyizhifu',
desc: '',
args: [],
@ -5635,6 +5635,26 @@ class S {
);
}
/// ``
String get wodekanjia {
return Intl.message(
'我的砍价',
name: 'wodekanjia',
desc: '',
args: [],
);
}
/// ``
String get wodepintuan {
return Intl.message(
'我的拼团',
name: 'wodepintuan',
desc: '',
args: [],
);
}
/// ``
String get bofangcishu {
return Intl.message(

16
lib/home/home_view/shortcut_operation.dart

@ -1,15 +1,9 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
class ShortcutOperation extends StatefulWidget {
final Function goToOrder;
@ -46,6 +40,8 @@ class _ShortcutOperation extends State<ShortcutOperation> {
},
child: Container(
width: 106,
margin: EdgeInsets.only(right:10),
padding: EdgeInsets.only(top: 8,bottom: 8),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
@ -58,8 +54,6 @@ class _ShortcutOperation extends State<ShortcutOperation> {
],
borderRadius: BorderRadius.circular(4),
),
margin: EdgeInsets.only(right:10),
padding: EdgeInsets.only(top: 8,bottom: 8),
child: Column(
children: [
Text(
@ -95,6 +89,8 @@ class _ShortcutOperation extends State<ShortcutOperation> {
},
child: Container(
width: 106,
margin: EdgeInsets.only(right:10),
padding: EdgeInsets.only(top: 8,bottom: 8),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
@ -107,8 +103,6 @@ class _ShortcutOperation extends State<ShortcutOperation> {
],
borderRadius: BorderRadius.circular(4),
),
margin: EdgeInsets.only(right:10),
padding: EdgeInsets.only(top: 8,bottom: 8),
child: Column(
children: [
Text(
@ -144,6 +138,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
},
child:Container(
width: 106,
padding: EdgeInsets.only(top: 8,bottom: 8),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
@ -156,7 +151,6 @@ class _ShortcutOperation extends State<ShortcutOperation> {
],
borderRadius: BorderRadius.circular(4),
),
padding: EdgeInsets.only(top: 8,bottom: 8),
child: Column(
children: [
Text(

7
lib/l10n/intl_en.arb

@ -335,7 +335,7 @@
"dingdanyisongda": "订单送达",
"dingdanyiwancheng": "订单已完成",
"dingdandaizhifu": "订单待支付",
"dingdanyizhifu": "订单支付",
"dingdanyizhifu": "订单支付",
"shangjiayifahuo": "商家已发货",
"huopinyisongda": "货品已送达",
"zhengzaipeisong": "正在配送",
@ -584,6 +584,11 @@
"invite_code_error": "邀请码输入错误",
"yaoqingwancheng": "邀请完成",
"xuanji": "选集",
"wodekanjia": "我的砍价",
"wodepintuan": "我的拼团",
"bofangcishu": "播放次数",
"jiangshi" : "讲师",
"quedingyaoshanchudongtai": "确定要删除这条动态?",

4
lib/l10n/intl_zh_CN.arb

@ -336,7 +336,7 @@
"dingdanyisongda": "订单送达",
"dingdanyiwancheng": "订单已完成",
"dingdandaizhifu": "订单待支付",
"dingdanyizhifu": "订单支付",
"dingdanyizhifu": "订单支付",
"shangjiayifahuo": "商家已发货",
"huopinyisongda": "货品已送达",
"zhengzaipeisong": "正在配送",
@ -581,6 +581,8 @@
"qingshuruyaoqingma": "请输入邀请码",
"invite_code_error": "邀请码输入错误",
"xuanji": "选集",
"wodekanjia": "我的砍价",
"wodepintuan": "我的拼团",
"bofangcishu": "播放次数",
"jiangshi" : "讲师",
"quedingyaoshanchudongtai": "确定要删除这条动态?",

4
lib/l10n/intl_zh_Hans_CN.arb

@ -336,7 +336,7 @@
"dingdanyisongda": "订单送达",
"dingdanyiwancheng": "订单已完成",
"dingdandaizhifu": "订单待支付",
"dingdanyizhifu": "订单支付",
"dingdanyizhifu": "订单支付",
"shangjiayifahuo": "商家已发货",
"huopinyisongda": "货品已送达",
"zhengzaipeisong": "正在配送",
@ -581,6 +581,8 @@
"qingshuruyaoqingma": "请输入邀请码",
"invite_code_error": "邀请码输入错误",
"xuanji": "选集",
"wodekanjia": "我的砍价",
"wodepintuan": "我的拼团",
"bofangcishu": "播放次数",
"jiangshi" : "讲师",
"quedingyaoshanchudongtai": "确定要删除这条动态?",

4
lib/l10n/intl_zh_Hant_CN.arb

@ -315,7 +315,7 @@
"gongjijianshangpin": "共{jian}件商品",
"dingdanyiwancheng": "订单已完成",
"peisongfangshi": "配送方式",
"dingdandaizhifu": "訂單支付",
"dingdandaizhifu": "訂單支付",
"dingdanyizhifu": "訂單已支付",
"shangjiazhengzaipeican": "商家正在配餐",
"dengdaiyonghuqucan": "等待用戶取餐",
@ -575,6 +575,8 @@
"qingshuruyaoqingma": "請輸入邀請碼",
"invite_code_error": "邀請碼輸入錯誤",
"xuanji": "選集",
"wodekanjia": "我的砍價",
"wodepintuan": "我的拼團",
"jiangshi" : "講師",
"quedingyaoshanchudongtai": "確定要刪除這條動態?",
"fenxiang": "分享",

4
lib/l10n/intl_zh_TW.arb

@ -315,7 +315,7 @@
"gongjijianshangpin": "共{jian}件商品",
"dingdanyiwancheng": "订单已完成",
"peisongfangshi": "配送方式",
"dingdandaizhifu": "訂單支付",
"dingdandaizhifu": "訂單支付",
"dingdanyizhifu": "訂單已支付",
"shangjiazhengzaipeican": "商家正在配餐",
"dengdaiyonghuqucan": "等待用戶取餐",
@ -575,6 +575,8 @@
"qingshuruyaoqingma": "請輸入邀請碼",
"invite_code_error": "邀請碼輸入錯誤",
"xuanji": "選集",
"wodekanjia": "我的砍價",
"wodepintuan": "我的拼團",
"bofangcishu": "播放次數",
"jiangshi" : "講師",
"quedingyaoshanchudongtai": "確定要刪除這條動態?",

24
lib/main.dart

@ -53,6 +53,13 @@ import 'package:huixiang/setting/logout_page.dart';
import 'package:huixiang/setting/permission_setting_page.dart';
import 'package:huixiang/setting/setting_page.dart';
import 'package:huixiang/setting/treaty_page.dart';
import 'package:huixiang/store/shopping/activity_prefecture_details.dart';
import 'package:huixiang/store/shopping/shopping_goods_details.dart';
import 'package:huixiang/store/shopping/shopping_home/bargain_details.dart';
import 'package:huixiang/store/shopping/shopping_home/group_details.dart';
import 'package:huixiang/store/shopping/shopping_home/group_page_details.dart';
import 'package:huixiang/store/shopping/shopping_home/search_page.dart';
import 'package:huixiang/store/shopping/shopping_mall_home.dart';
import 'package:huixiang/setting/user_service_page.dart';
import 'package:huixiang/store/store_order.dart';
import 'package:huixiang/settlement/settlement.dart';
@ -93,6 +100,7 @@ import 'mine/mine_vip/binding_assistant_card.dart';
import 'mine/mine_vip/legal_right_details.dart';
import 'mine/mine_vip/mine_attainment_page.dart';
import 'mine/mine_vip/mine_vip_core.dart';
import 'order/bargain_group_order.dart';
import 'mine/personal_page.dart';
import 'order/exchange_write_off_page.dart';
import 'mine/release_page.dart';
@ -241,6 +249,8 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
BindingAssistantCard(),
'/router/order_history_page': (context, {arguments}) =>
OrderHistoryPage(arguments: arguments),
'/router/bargain_group_order': (context, {arguments}) =>
BargainGroupOrder(arguments:arguments),
'/router/union_detail_page': (context, {arguments}) =>
UnionDetailsPage(arguments: arguments),
'/router/address_edit_page': (context, {arguments}) =>
@ -256,6 +266,14 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
HotArticleDetailsPage(),
'/router/store_order': (context, {arguments}) =>
StoreOrderPage(arguments: arguments),
'/router/shopping_mall_home': (context, {arguments}) =>
ShoppingMallHome(arguments: arguments),
'/router/activity_prefecture_details': (context, {arguments}) =>
ActivityPrefectureDetails(arguments: arguments),
'/router/shopping_goods_details': (context, {arguments}) =>
ShoppingGoodsDetails(arguments: arguments),
'/router/search_page': (context, {arguments}) =>
SearchPage(arguments:arguments),
'/router/vip_balance': (context, {arguments}) =>
VipBalancePage(arguments: arguments),
'/router/exchange_order_details': (context, {arguments}) =>
@ -318,6 +336,12 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
MineAttainmentPage(arguments: arguments),
'/router/headlines_column_details': (context, {arguments}) =>
HeadlinesColumnDetails(arguments: arguments),
'/router/group_details': (context, {arguments}) =>
GroupDetails(arguments:arguments),
'/router/bargain_details': (context, {arguments}) =>
BargainDetails(arguments:arguments),
'/router/group_page_details': (context, {arguments}) =>
GroupPageDetails(arguments:arguments),
'/router/photo_view_gallery_screen': (context, {arguments}) =>
PhotoViewGalleryScreen(),
'/router/system_details': (context, {arguments}) =>

20
lib/message/system_details.dart

@ -502,8 +502,8 @@ class _SystemDetails extends State<SystemDetails> {
height: 44,
isCircle: true,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 8,),
Expanded(child:Column(
@ -563,8 +563,8 @@ class _SystemDetails extends State<SystemDetails> {
isCircle: true,
fit: BoxFit.cover,
radius: BorderRadius.circular(2),
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width:2.w),
Expanded(child:Text(
@ -649,8 +649,8 @@ class _SystemDetails extends State<SystemDetails> {
height: 44,
isCircle: true,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 8,),
Expanded(child:Column(
@ -807,8 +807,8 @@ class _SystemDetails extends State<SystemDetails> {
isCircle: true,
fit: BoxFit.cover,
radius: BorderRadius.circular(2),
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width:2.w),
Expanded(child:Text(
@ -892,8 +892,8 @@ class _SystemDetails extends State<SystemDetails> {
height: 44,
isCircle: true,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 8,),
Expanded(child:Column(

6
lib/mine/coupons_page.dart

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

1
lib/mine/follow_page.dart

@ -131,7 +131,6 @@ class _FollowPage extends State<FollowPage> {
},
)
),
),
);
}

2
lib/mine/manage_address_page.dart

@ -68,7 +68,7 @@ class _ManageAddressPage extends State<ManageAddressPage> {
? NoDataView(
src:"assets/image/di_zhi.webp",
isShowBtn: false,
text: "目前暂无送货地址,请添加",
text: "目前暂无收货地址,请添加~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)

127
lib/mine/mine_view/mine_item.dart

@ -35,22 +35,6 @@ class _MineItem extends State<MineItem> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// InkWell(
// onTap: () {
// SharedPreferences.getInstance().then((value) {
// if (value.getString("token") == null ||
// value.getString("token") == "") {
// LoginTipsDialog().show(context);
// return;
// }
// Navigator.of(context).pushNamed('/router/mine_wallet');
// });
// },
// child: mineItem(
// S.of(context).wodeqianbao,
// "assets/image/icon_mine_wallet.webp",
// ),
// ),
Container(
padding: EdgeInsets.only(left: 16,top:16,bottom:4),
child: Text(
@ -85,6 +69,8 @@ class _MineItem extends State<MineItem> {
// ),
// ),
// ),
///
Expanded(child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
@ -102,6 +88,7 @@ class _MineItem extends State<MineItem> {
"assets/image/icon_mine_records_of_consumption.webp",
),
),),
///
Expanded(child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
@ -118,6 +105,7 @@ class _MineItem extends State<MineItem> {
"assets/image/icon_mine_card.webp",
),
),),
///
Expanded(child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
@ -134,48 +122,66 @@ class _MineItem extends State<MineItem> {
"assets/image/icon_location_address.webp",
),
),),
Expanded(child:InkWell(
///
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/qr_share', arguments: {});
showCallMobile();
},
child: mineItem(
S.of(context).tuiguangma,
"assets/image/icon_mine_promotion_code.webp",
"联系客服",
"assets/image/icon_mine_online_service.webp",
),
),),
],
),
SizedBox(height: 10.h,),
Row(
children: [
Expanded(child:InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/invitation_record', arguments: {});
},
child: mineItem(
"邀请记录",
"assets/image/yao_q.webp",
),
),),
///
Expanded(child: InkWell(
onTap: () {
showCallMobile();
},
child: mineItem(
"联系客服",
"assets/image/icon_mine_online_service.webp",
),
),),
Expanded(child:Container()),
Expanded(child:Container())
],
children: [
Expanded(child:
InkWell(
onTap: () {
Navigator.of(context)
.pushNamed('/router/bargain_group_order',
arguments: {"type":3});
},
child: mineItem(
S.of(context).wodekanjia,
"assets/image/icon_mine_records_of_consumption.webp",
),
),),
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/bargain_group_order',
arguments: {"type":1});
},
child: mineItem(
S.of(context).wodepintuan,
"assets/image/kan_jia.webp",
),
),),
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/qr_share', arguments: {});
},
child: mineItem(
S.of(context).tuiguangma,
"assets/image/pin_tuan.webp",
),
),),
Expanded(child:InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/invitation_record', arguments: {});
},
child: mineItem(
"邀请记录",
"assets/image/yao_q.webp",
),
),),
],
),
SizedBox(height: 10.h,),
],
),
// mineItem(
// S.of(context).bangzhuyufankui,
// "assets/image/icon_mine_feedback.webp",
// ),
],
),
);
}
@ -204,11 +210,6 @@ class _MineItem extends State<MineItem> {
color: Color(0xFF353535),
),
),
// Icon(
// Icons.keyboard_arrow_right,
// size: 20,
// color: Colors.black,
// )
],
),
);
@ -221,15 +222,15 @@ class _MineItem extends State<MineItem> {
return CupertinoActionSheet(
title: Text(S.of(context).bodadianhua),
actions: [
CupertinoActionSheetAction(
child: Text("15392949097"),
onPressed: () {
callMobile("15392949097");
Navigator.of(context).pop();
},
isDefaultAction: true,
isDestructiveAction: false,
),
CupertinoActionSheetAction(
child: Text("15392949097"),
onPressed: () {
callMobile("15392949097");
Navigator.of(context).pop();
},
isDefaultAction: true,
isDestructiveAction: false,
),
],
cancelButton: CupertinoActionSheetAction(
onPressed: () {

4
lib/mine/mine_view/mine_order.dart

@ -115,8 +115,8 @@ class _MineOrderView extends State<MineOrderView> {
Image.asset(
orderStatusImg[status],
fit: BoxFit.contain,
width: 32.w,
height: 32.w,
width: 36.w,
height: 36.w,
),
SizedBox(height: 4.h,),
Text(

2
lib/mine/release_page.dart

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

2
lib/mine/vip_detail_page.dart

@ -550,7 +550,7 @@ class _VipDetailPage extends State<VipDetailPage> {
return "$totalPrice";
}
List<Widget> goodsItem(List<ProductList> products) {
List<Widget> goodsItem(List<ProductsList> products) {
if (products == null) return [];
if (products.length > 3) {
products = products.sublist(0, 3);

476
lib/order/bargain_group_order.dart

@ -0,0 +1,476 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/activity_order_list.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
class BargainGroupOrder extends StatefulWidget {
final Map<String, dynamic> arguments;
BargainGroupOrder({this.arguments});
@override
State<StatefulWidget> createState() {
return _BargainGroupOrder();
}
}
class _BargainGroupOrder extends State<BargainGroupOrder>
with SingleTickerProviderStateMixin {
List<Widget> tabs;
List<Widget> _pages;
TabController tabcontroller;
int type = 0;
@override
void initState() {
super.initState();
type = widget.arguments["type"];
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
if (tabcontroller == null)
tabcontroller = TabController(length: 4, vsync: this);
tabs = [
MyTab(
text: S.of(context).quanbu,
),
MyTab(
text: "进行中",
),
MyTab(
text: "成功",
),
MyTab(
text: "失败",
)
];
_pages = [
ExchangeHistoryList(0,type),
ExchangeHistoryList(2,type),
ExchangeHistoryList(3,type),
ExchangeHistoryList(4,type)
];
}
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 4,
child: Scaffold(
appBar: MyAppBar(
title:type == 1 ? S.of(context).wodepintuan :S.of(context).wodekanjia,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top,
bottom: PreferredSize(
preferredSize: Size(double.infinity, 38.h),
child: TabBar(
controller: tabcontroller,
indicatorWeight: 2,
indicatorColor: Color(0xFF39B54A),
indicatorSize: TabBarIndicatorSize.label,
indicatorPadding: EdgeInsets.only(top: 3),
unselectedLabelStyle: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.normal,
),
labelStyle: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold),
labelColor: Colors.black,
tabs: tabs,
),
),
),
body: TabBarView(
children: _pages,
controller: tabcontroller,
),
),
);
}
}
class ExchangeHistoryList extends StatefulWidget {
final int orderStatus;
final int type;
ExchangeHistoryList(this.orderStatus,this.type);
@override
State<StatefulWidget> createState() {
return _ExchangeHistoryList();
}
}
class _ExchangeHistoryList extends State<ExchangeHistoryList> {
MinApiService minService;
List<ActivityOrderList> activityOrderList = [];
RefreshController _refreshController = RefreshController(initialRefresh: false);
ApiService apiService;
StoreInfo storeInfo;
List<Activity> activitys;
String storeId;
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) {
String minToken = value.getString("minToken");
String tenant = value.getString("tenant");
String storeId = value.getString("storeId");
minService = MinApiService(
Dio(),
context: context,
token: minToken,
tenant: tenant,
storeId: storeId,
showLoading: true
);
queryShowMyActList();
});
}
///
queryShowMyActList() async {
BaseData<List<ActivityOrderList>> baseData =
await minService.showMyActList({
"state":widget.orderStatus,
"type" :widget.type,
}).catchError((error) {
_refreshController.loadFailed();
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
_refreshController.refreshCompleted();
setState(() {
activityOrderList.clear();
if(baseData.data.length > 0)
activityOrderList.addAll(baseData.data);
queryStoreInfo();
});
} else {
_refreshController.refreshFailed();
_refreshController.loadFailed();
}
}
///
queryStoreInfo() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData baseData =
await apiService.queryStoreInfo(activityOrderList[0].storeId).catchError((error) {
debugPrint(error.toString());
});
if (baseData != null && baseData.isSuccess) {
storeInfo = StoreInfo.fromJson(baseData.data);
activitys = storeInfo.informationVOPageVO.list
.map((e) => Activity.fromJson(e))
.toList();
if (mounted) {
setState(() {});
}
}
EasyLoading.dismiss();
}
_refresh() {
queryShowMyActList();
}
@override
Widget build(BuildContext context) {
return Container(
child: SmartRefresher(
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (BuildContext context, LoadStatus mode) {
return MyFooter(mode);
},
),
controller: _refreshController,
physics: BouncingScrollPhysics(),
// onLoading: _refresh,
onRefresh: _refresh,
child: (activityOrderList != null && activityOrderList.length > 0)
?
ListView.builder(
itemCount: activityOrderList?.length ?? 0,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return bargainOrder(activityOrderList[position]);
},
):NoDataView(
src: "assets/image/ding_dan.webp",
isShowBtn: false,
text: "还没有订单,快去下一单吧~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
),
),
);
}
Widget bargainOrder(ActivityOrderList activityOrderList) {
return Container(
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 1),
blurRadius: 12,
spreadRadius: 0,
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Container(
// width: 19.w,
// height:21.h,
// margin: EdgeInsets.only(left: 12.w, top: 12.h),
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: Color(0xff32A060),
// borderRadius: BorderRadius.circular(2),
// ),
// child: Text(
// (orderInfo != null && orderInfo.isTakeOut == 0) ? "" : "",
// // "",
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: FontWeight.bold,
// color: Colors.white,
// ),
// ),
// ),
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(left: 6.w, top: 12.h),
alignment: Alignment.centerLeft,
child: Text(
activityOrderList?.storeName ?? "",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
),
flex: 1,
),
Padding(
padding: EdgeInsets.only(top: 12.h, right: 12.w),
child:Text(
(widget.type == 1)?(widget.orderStatus == 4 ? "拼团失败" :(activityOrderList.howManyMore != 0 ? "还差${activityOrderList?.howManyMore ?? 0}人拼团成功" : "拼团成功"))
:(activityOrderList.actRecordState == 1 ? "待支付" :(widget.orderStatus == 4 ? "砍价失败" : (activityOrderList.howManyMoney != "0.00" ? "还差¥${activityOrderList?.howManyMoney ?? 0}砍价成功" : "砍价成功"))),
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: widget.orderStatus == 4 ? Color(0xff32A060) : Color(0xffFE951E),
),
),
),
],
),
Container(
margin: EdgeInsets.only(left: 37.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).xiadanshijian_(activityOrderList?.joinTime ?? ""),
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF727272),
),
),
SizedBox(
height: 8.h,
),
Container(
height: 81.h,
margin: EdgeInsets.only(right: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MImage(
activityOrderList?.productImg ?? "",
width: 81.w,
height: 81.h,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
activityOrderList?.storeName ?? "",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
),
Text(
activityOrderList?.productSkuName ?? "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF727272),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"x1",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF727272),
),
),
Text.rich(
TextSpan(
children: [
TextSpan(
// text: "已砍至:",
text: S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF868686),
),
),
TextSpan(
text:activityOrderList?.orderSum ?? "0",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
TextSpan(
text: "",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF868686),
),
),
],
),
),
],
),
],
)),
],
),
),
],
),
),
SizedBox(
height: 12.h,
),
Container(
margin: EdgeInsets.only(right: 12.w, bottom: 16.h),
child: Directionality(
textDirection: TextDirection.rtl,
child: Row(
children: [
GestureDetector(
onTap: () {
if(widget.type == 1) {
Navigator.of(context)
.pushNamed('/router/group_details', arguments: {
"actRecordId": activityOrderList.actRecordId,
"limitNumber":activityOrderList.successNumber,
});
}else{
Navigator.of(context)
.pushNamed('/router/bargain_details',arguments: {
"actRecordId": activityOrderList.actRecordId,
"limitNumber":activityOrderList.successNumber,
"storeInfo":storeInfo,
}).then((value) {
_refresh();
setState(() {});
});
}
},
child: RoundButton(
height: 25.h,
text: "查看详情",
textColor: Colors.white,
fontSize: 12.sp,
backgroup: Color(0xFF32A060),
radius: 2,
padding: EdgeInsets.fromLTRB(17.w,0, 17.w,0),
),
),
],
),
),
),
],
),
);
}
}

4
lib/order/exchange_history_page.dart

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

4
lib/order/order_detail_page.dart

@ -350,9 +350,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
),
),
Text(
S
.of(context)
.yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
S.of(context).yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
style: TextStyle(
fontSize: 20.sp,
color: Color(0xFF32A060),

79
lib/order/order_history_page.dart

@ -156,9 +156,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
);
})
: NoDataView(
src: "assets/image/ding_dan.webp",
src: "assets/image/ding_dan.webp",
isShowBtn: false,
text: "还没有订单,快去下一单吧~",
text: "目前暂无订单,快去下一单吧~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120),
),
@ -194,6 +194,10 @@ class _OrderHistoryList extends State<OrderHistoryList>
orderInfos.clear();
}
orderInfos.addAll(baseData.data.records);
// baseData.data.records.forEach((element) {
// if(element.orderType==0||(element.orderType==1 && element.payStatus==1 && element.refundStatus == 0)||(element.orderType==2 && element.payStatus==1&& element.refundStatus == 0)||(element.orderType==3 && element.payStatus==1&& element.refundStatus == 0))
// orderInfos.add(element);
// });
refreshController.refreshCompleted();
refreshController.loadComplete();
if (current * 10 > int.tryParse(baseData.data.total)) {
@ -215,7 +219,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
showLoading: true,
context: context, token: value.getString("token")),
context: context,
token: value.getString("token")),
queryOrder(),
});
}
@ -243,17 +248,49 @@ class _OrderHistoryList extends State<OrderHistoryList>
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(orderInfo != null && orderInfo.orderType == 0)
? Container()
: Container(
width: 19,
height: 21,
margin: EdgeInsets.only(left: 12.w, top: 12.h),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(2),
border: Border.all(
width: 1,
color: Color(0xFF32A060),
style: BorderStyle.solid,
)),
child: Text(
(orderInfo != null && orderInfo.orderType == 1)
? ""
: ((orderInfo != null && orderInfo.orderType == 2)
? ""
: ""),
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.bold,
color: Color(0xFF32A060),
),
),
),
Container(
width: 19.w,
height: 19.h,
margin: EdgeInsets.only(left: 12.w, top: 12.h),
width: 19,
height: 21,
margin: EdgeInsets.only(left: 7.w, top: 12.h),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(2),
),
child: Text(
(orderInfo != null && orderInfo.isTakeOut == 0) ? "" : "",
(orderInfo != null && orderInfo.isTakeOut == 0)
? ""
: ((orderInfo != null && orderInfo.isTakeOut == 1)
? ""
: ""),
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.bold,
@ -413,7 +450,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
),
TextSpan(
// text: totalPrice(orderInfo),
text:orderInfo.finalPayPrice,
text: orderInfo.finalPayPrice,
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.bold,
@ -522,21 +559,25 @@ class _OrderHistoryList extends State<OrderHistoryList>
},
);
if (payChannel != null && payChannel > 0) {
OrderUtils.carryOnPay(payChannel, minService, orderInfo, () {
SmartDialog.showToast("订单支付成功");
Future.delayed(Duration(seconds: 1), () {
_onRefresh();
});
},);
OrderUtils.carryOnPay(
payChannel,
minService,
orderInfo,
() {
SmartDialog.showToast("订单支付成功");
Future.delayed(Duration(seconds: 1), () {
_onRefresh();
});
},
);
}
}
payResult(BaseData baseData) {
}
payResult(BaseData baseData) {}
orderCancel(String orderId) async {
BaseData baseData = await apiService.orderCancel(orderId).catchError((onError) {});
BaseData baseData =
await apiService.orderCancel(orderId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("订单取消成功");
_onRefresh();
@ -553,7 +594,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
// ? (orderInfo.storeVO.id ?? "")
// : "";
if(orderInfo.storeVO.posType.code == "NORMALSTORE") {
if (orderInfo.storeVO.posType.code == "NORMALSTORE") {
Scan.toScan(
context,
orderInfo.storeVO.id,

2
lib/order/order_view/order_status.dart

@ -68,7 +68,7 @@ class _OrderStatus extends State<OrderStatus> {
? S.of(context).ziqu
: widget.isTakeOut == 1
? S.of(context).waimai
: S.of(context).kuaidi,
: "物流",
width: 42.w * AppUtils.textScale(context),
height: 20.h * AppUtils.textScale(context),
textColor: Colors.white,

536
lib/retrofit/data/activity_actRecord_details.dart

@ -0,0 +1,536 @@
/// actRecord : {"id":"1496692045555695616","createTime":"2022-02-24 11:42:46","createUser":"1496056013827080192","updateTime":"2022-02-24 11:42:46","updateUser":"1496056013827080192","storeId":"1460885296764682240","type":3,"actTemplateId":"1490572026815971328","actTimeId":"1490572027034075136","actProductId":"1494198261018263552","mid":"1496056013827080192","isDirectBuy":false,"joinNum":1,"startTime":"2022-02-24 11:42:46","endTime":"2022-02-24 13:42:46","state":4,"isDelete":0}
/// actRecordJoinList : [{"id":"1496692045677330432","createTime":"2022-02-24 11:42:46","createUser":"1496056013827080192","updateTime":"2022-02-24 11:42:46","updateUser":"1496056013827080192","storeId":"1460885296764682240","type":3,"actTemplateId":"1490572026815971328","actTimeId":"1490572027034075136","actRecordId":"1496692045555695616","mid":"1496056013827080192","orderId":null,"isLeader":true,"memberAvatar":"","memberNickname":"","productId":"1494198261018263552","actPrice":"54.45","state":true,"isDelete":0}]
/// actProduct : {"id":"1494198261018263552","createTime":"2022-02-17 14:33:21","createUser":"1364043181062094848","updateTime":"2022-02-17 14:33:21","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1490572026815971328","timeId":"1490572027034075136","productId":"1461246266586431488","productName":"野生羊肚菌","productImg":"https://pos.upload.gznl.top/1179/2021/11/298d1e1c-2a5f-4b9d-95a7-87b3f88a9cd1.jpg","productPrice":"150.00","promotionPrice":"11.00","productStock":200,"sellCount":0,"skuJson":[{"skuId":"1461246266661928960","skuPrice":11,"skuStock":100},{"skuId":"1461246266687094784","skuPrice":100,"skuStock":100}],"isDelete":0}
/// skuName : null
/// isBargain : true
class ActivityActRecordDetails {
ActivityActRecordDetails({
ActRecord actRecord,
List<ActRecordJoinList> actRecordJoinList,
ActProduct actProduct,
dynamic skuName,
String skuId,
bool isBargain,
int successNumber}){
_actRecord = actRecord;
_actRecordJoinList = actRecordJoinList;
_actProduct = actProduct;
_skuName = skuName;
_skuId = skuId;
_isBargain = isBargain;
_successNumber = successNumber;
}
ActivityActRecordDetails.fromJson(dynamic json) {
_actRecord = json['actRecord'] != null ? ActRecord.fromJson(json['actRecord']) : null;
if (json['actRecordJoinList'] != null) {
_actRecordJoinList = [];
json['actRecordJoinList'].forEach((v) {
_actRecordJoinList.add(ActRecordJoinList.fromJson(v));
});
}
_actProduct = json['actProduct'] != null ? ActProduct.fromJson(json['actProduct']) : null;
_skuName = json['skuName'];
_skuId = json['skuId'];
_isBargain = json['isBargain'];
_successNumber = json['successNumber'];
}
ActRecord _actRecord;
List<ActRecordJoinList> _actRecordJoinList;
ActProduct _actProduct;
dynamic _skuName;
String _skuId;
bool _isBargain;
int _successNumber;
ActRecord get actRecord => _actRecord;
List<ActRecordJoinList> get actRecordJoinList => _actRecordJoinList;
ActProduct get actProduct => _actProduct;
dynamic get skuName => _skuName;
String get skuId => _skuId;
bool get isBargain => _isBargain;
int get successNumber => _successNumber;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_actRecord != null) {
map['actRecord'] = _actRecord.toJson();
}
if (_actRecordJoinList != null) {
map['actRecordJoinList'] = _actRecordJoinList.map((v) => v.toJson()).toList();
}
if (_actProduct != null) {
map['actProduct'] = _actProduct.toJson();
}
map['skuId'] = _skuId;
map['isBargain'] = _isBargain;
map['successNumber'] = _successNumber;
return map;
}
}
/// id : "1494198261018263552"
/// createTime : "2022-02-17 14:33:21"
/// createUser : "1364043181062094848"
/// updateTime : "2022-02-17 14:33:21"
/// updateUser : "1364043181062094848"
/// storeId : "1460885296764682240"
/// templateId : "1490572026815971328"
/// timeId : "1490572027034075136"
/// productId : "1461246266586431488"
/// productName : "野生羊肚菌"
/// productImg : "https://pos.upload.gznl.top/1179/2021/11/298d1e1c-2a5f-4b9d-95a7-87b3f88a9cd1.jpg"
/// productPrice : "150.00"
/// promotionPrice : "11.00"
/// productStock : 200
/// sellCount : 0
/// skuJson : [{"skuId":"1461246266661928960","skuPrice":11,"skuStock":100},{"skuId":"1461246266687094784","skuPrice":100,"skuStock":100}]
/// isDelete : 0
class ActProduct {
ActProduct({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String templateId,
String timeId,
String productId,
String productName,
String productImg,
String productPrice,
String promotionPrice,
int productStock,
int sellCount,
List<SkuJson> skuJson,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_templateId = templateId;
_timeId = timeId;
_productId = productId;
_productName = productName;
_productImg = productImg;
_productPrice = productPrice;
_promotionPrice = promotionPrice;
_productStock = productStock;
_sellCount = sellCount;
_skuJson = skuJson;
_isDelete = isDelete;
}
ActProduct.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_templateId = json['templateId'];
_timeId = json['timeId'];
_productId = json['productId'];
_productName = json['productName'];
_productImg = json['productImg'];
_productPrice = json['productPrice'];
_promotionPrice = json['promotionPrice'];
_productStock = json['productStock'];
_sellCount = json['sellCount'];
if (json['skuJson'] != null) {
_skuJson = [];
json['skuJson'].forEach((v) {
_skuJson.add(SkuJson.fromJson(v));
});
}
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _templateId;
String _timeId;
String _productId;
String _productName;
String _productImg;
String _productPrice;
String _promotionPrice;
int _productStock;
int _sellCount;
List<SkuJson> _skuJson;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
String get templateId => _templateId;
String get timeId => _timeId;
String get productId => _productId;
String get productName => _productName;
String get productImg => _productImg;
String get productPrice => _productPrice;
String get promotionPrice => _promotionPrice;
int get productStock => _productStock;
int get sellCount => _sellCount;
List<SkuJson> get skuJson => _skuJson;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['templateId'] = _templateId;
map['timeId'] = _timeId;
map['productId'] = _productId;
map['productName'] = _productName;
map['productImg'] = _productImg;
map['productPrice'] = _productPrice;
map['promotionPrice'] = _promotionPrice;
map['productStock'] = _productStock;
map['sellCount'] = _sellCount;
if (_skuJson != null) {
map['skuJson'] = _skuJson.map((v) => v.toJson()).toList();
}
map['isDelete'] = _isDelete;
return map;
}
}
/// skuId : "1461246266661928960"
/// skuPrice : 11
/// skuStock : 100
class SkuJson {
SkuJson({
String skuId,
int skuPrice,
int skuStock,}){
_skuId = skuId;
_skuPrice = skuPrice;
_skuStock = skuStock;
}
SkuJson.fromJson(dynamic json) {
_skuId = json['skuId'];
_skuPrice = json['skuPrice'];
_skuStock = json['skuStock'];
}
String _skuId;
int _skuPrice;
int _skuStock;
String get skuId => _skuId;
int get skuPrice => _skuPrice;
int get skuStock => _skuStock;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['skuId'] = _skuId;
map['skuPrice'] = _skuPrice;
map['skuStock'] = _skuStock;
return map;
}
}
/// id : "1496692045677330432"
/// createTime : "2022-02-24 11:42:46"
/// createUser : "1496056013827080192"
/// updateTime : "2022-02-24 11:42:46"
/// updateUser : "1496056013827080192"
/// storeId : "1460885296764682240"
/// type : 3
/// actTemplateId : "1490572026815971328"
/// actTimeId : "1490572027034075136"
/// actRecordId : "1496692045555695616"
/// mid : "1496056013827080192"
/// orderId : null
/// isLeader : true
/// memberAvatar : ""
/// memberNickname : ""
/// productId : "1494198261018263552"
/// actPrice : "54.45"
/// state : true
/// isDelete : 0
class ActRecordJoinList {
ActRecordJoinList({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
int type,
String actTemplateId,
String actTimeId,
String actRecordId,
String mid,
dynamic orderId,
bool isLeader,
String memberAvatar,
String memberNickname,
String productId,
String actPrice,
bool state,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actRecordId = actRecordId;
_mid = mid;
_orderId = orderId;
_isLeader = isLeader;
_memberAvatar = memberAvatar;
_memberNickname = memberNickname;
_productId = productId;
_actPrice = actPrice;
_state = state;
_isDelete = isDelete;
}
ActRecordJoinList.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actRecordId = json['actRecordId'];
_mid = json['mid'];
_orderId = json['orderId'];
_isLeader = json['isLeader'];
_memberAvatar = json['memberAvatar'];
_memberNickname = json['memberNickname'];
_productId = json['productId'];
_actPrice = json['actPrice'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
int _type;
String _actTemplateId;
String _actTimeId;
String _actRecordId;
String _mid;
dynamic _orderId;
bool _isLeader;
String _memberAvatar;
String _memberNickname;
String _productId;
String _actPrice;
bool _state;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
int get type => _type;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actRecordId => _actRecordId;
String get mid => _mid;
dynamic get orderId => _orderId;
bool get isLeader => _isLeader;
String get memberAvatar => _memberAvatar;
String get memberNickname => _memberNickname;
String get productId => _productId;
String get actPrice => _actPrice;
bool get state => _state;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['type'] = _type;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actRecordId'] = _actRecordId;
map['mid'] = _mid;
map['orderId'] = _orderId;
map['isLeader'] = _isLeader;
map['memberAvatar'] = _memberAvatar;
map['memberNickname'] = _memberNickname;
map['productId'] = _productId;
map['actPrice'] = _actPrice;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
}
/// id : "1496692045555695616"
/// createTime : "2022-02-24 11:42:46"
/// createUser : "1496056013827080192"
/// updateTime : "2022-02-24 11:42:46"
/// updateUser : "1496056013827080192"
/// storeId : "1460885296764682240"
/// type : 3
/// actTemplateId : "1490572026815971328"
/// actTimeId : "1490572027034075136"
/// actProductId : "1494198261018263552"
/// mid : "1496056013827080192"
/// isDirectBuy : false
/// joinNum : 1
/// startTime : "2022-02-24 11:42:46"
/// endTime : "2022-02-24 13:42:46"
/// state : 4
/// isDelete : 0
class ActRecord {
ActRecord({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
int type,
String actTemplateId,
String actTimeId,
String actProductId,
String mid,
bool isDirectBuy,
int joinNum,
String startTime,
String endTime,
int state,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actProductId = actProductId;
_mid = mid;
_isDirectBuy = isDirectBuy;
_joinNum = joinNum;
_startTime = startTime;
_endTime = endTime;
_state = state;
_isDelete = isDelete;
}
ActRecord.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actProductId = json['actProductId'];
_mid = json['mid'];
_isDirectBuy = json['isDirectBuy'];
_joinNum = json['joinNum'];
_startTime = json['startTime'];
_endTime = json['endTime'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
int _type;
String _actTemplateId;
String _actTimeId;
String _actProductId;
String _mid;
bool _isDirectBuy;
int _joinNum;
String _startTime;
String _endTime;
int _state;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
int get type => _type;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actProductId => _actProductId;
String get mid => _mid;
bool get isDirectBuy => _isDirectBuy;
int get joinNum => _joinNum;
String get startTime => _startTime;
String get endTime => _endTime;
int get state => _state;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['type'] = _type;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actProductId'] = _actProductId;
map['mid'] = _mid;
map['isDirectBuy'] = _isDirectBuy;
map['joinNum'] = _joinNum;
map['startTime'] = _startTime;
map['endTime'] = _endTime;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
}

498
lib/retrofit/data/activity_area_list.dart

File diff suppressed because one or more lines are too long

657
lib/retrofit/data/activity_details.dart

@ -0,0 +1,657 @@
/// actProduct : {"id":"1479377402042777600","createTime":"2022-01-07 17:00:33","createUser":"1364043181062094848","updateTime":"2022-01-07 17:00:33","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1479377328797646848","timeId":"1479377329099636736","productId":"1460886580993458176","productName":"无花果礼盒","productImg":"https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png","productPrice":"88.00","promotionPrice":"88.00","productStock":0,"sellCount":0,"skuJson":[{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}],"isDelete":0}
/// actRecordAndJoinlDTOList : [{"actRecord":{"id":"1479399513473941504","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1478548720785031168","joinNum":0,"startTime":"2022-01-07 18:28:25","endTime":"2022-01-08 16:28:25","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479399514073726976","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479399513473941504","mid":"1478548720785031168","orderId":"1479399514677706752","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]},{"actRecord":{"id":"1479401111025614848","createTime":"2022-01-07 18:34:45","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:45","updateUser":"1468903135782109184","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1468903135782109184","joinNum":0,"startTime":"2022-01-07 18:34:45","endTime":"2022-01-08 16:34:45","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479401111688314880","createTime":"2022-01-07 18:34:46","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:46","updateUser":"1468903135782109184","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479401111025614848","mid":"1468903135782109184","orderId":"1479401112292294656","isLeader":true,"memberAvatar":"https://pos.upload.gznl.top/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg","memberNickname":"哈哈哈","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]}]
class ActivityDetails {
ActivityDetails({
String endTime,
ActProduct actProduct,
List<ActRecordAndJoinlDTOList> actRecordAndJoinlDTOList,
}) {
_endTime = endTime;
_actProduct = actProduct;
_actRecordAndJoinlDTOList = actRecordAndJoinlDTOList;
}
ActivityDetails.fromJson(dynamic json) {
_endTime = json['endTime'];
_actProduct = json['actProduct'] != null
? ActProduct.fromJson(json['actProduct'])
: null;
if (json['actRecordAndJoinlDTOList'] != null) {
_actRecordAndJoinlDTOList = [];
json['actRecordAndJoinlDTOList'].forEach((v) {
_actRecordAndJoinlDTOList.add(ActRecordAndJoinlDTOList.fromJson(v));
});
}
}
String _endTime;
ActProduct _actProduct;
List<ActRecordAndJoinlDTOList> _actRecordAndJoinlDTOList;
String get endTime => _endTime;
ActProduct get actProduct => _actProduct;
List<ActRecordAndJoinlDTOList> get actRecordAndJoinlDTOList =>
_actRecordAndJoinlDTOList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['endTime'] = _endTime;
if (_actProduct != null) {
map['actProduct'] = _actProduct.toJson();
}
if (_actRecordAndJoinlDTOList != null) {
map['actRecordAndJoinlDTOList'] =
_actRecordAndJoinlDTOList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// actRecord : {"id":"1479399513473941504","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1478548720785031168","joinNum":0,"startTime":"2022-01-07 18:28:25","endTime":"2022-01-08 16:28:25","state":2,"isDelete":0}
/// actRecordJoinList : [{"id":"1479399514073726976","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479399513473941504","mid":"1478548720785031168","orderId":"1479399514677706752","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]
class ActRecordAndJoinlDTOList {
ActRecordAndJoinlDTOList({
ActRecord actRecord,
List<ActRecordJoinList> actRecordJoinList,
}) {
_actRecord = actRecord;
_actRecordJoinList = actRecordJoinList;
}
ActRecordAndJoinlDTOList.fromJson(dynamic json) {
_actRecord = json['actRecord'] != null
? ActRecord.fromJson(json['actRecord'])
: null;
if (json['actRecordJoinList'] != null) {
_actRecordJoinList = [];
json['actRecordJoinList'].forEach((v) {
_actRecordJoinList.add(ActRecordJoinList.fromJson(v));
});
}
}
ActRecord _actRecord;
List<ActRecordJoinList> _actRecordJoinList;
ActRecord get actRecord => _actRecord;
List<ActRecordJoinList> get actRecordJoinList => _actRecordJoinList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_actRecord != null) {
map['actRecord'] = _actRecord.toJson();
}
if (_actRecordJoinList != null) {
map['actRecordJoinList'] =
_actRecordJoinList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// id : "1479399514073726976"
/// createTime : "2022-01-07 18:28:25"
/// createUser : "1478548720785031168"
/// updateTime : "2022-01-07 18:28:25"
/// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240"
/// actTemplateId : "1479377328797646848"
/// actTimeId : "1479377329099636736"
/// actRecordId : "1479399513473941504"
/// mid : "1478548720785031168"
/// orderId : "1479399514677706752"
/// isLeader : true
/// memberAvatar : ""
/// memberNickname : "斯基"
/// productId : "1479377402042777600"
/// actPrice : "88.00"
/// state : false
/// isDelete : 0
class ActRecordJoinList {
ActRecordJoinList({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String actTemplateId,
String actTimeId,
String actRecordId,
String mid,
String orderId,
bool isLeader,
String memberAvatar,
String memberNickname,
String productId,
String actPrice,
bool state,
int isDelete,
}) {
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actRecordId = actRecordId;
_mid = mid;
_orderId = orderId;
_isLeader = isLeader;
_memberAvatar = memberAvatar;
_memberNickname = memberNickname;
_productId = productId;
_actPrice = actPrice;
_state = state;
_isDelete = isDelete;
}
ActRecordJoinList.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actRecordId = json['actRecordId'];
_mid = json['mid'];
_orderId = json['orderId'];
_isLeader = json['isLeader'];
_memberAvatar = json['memberAvatar'];
_memberNickname = json['memberNickname'];
_productId = json['productId'];
_actPrice = json['actPrice'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _actTemplateId;
String _actTimeId;
String _actRecordId;
String _mid;
String _orderId;
bool _isLeader;
String _memberAvatar;
String _memberNickname;
String _productId;
String _actPrice;
bool _state;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actRecordId => _actRecordId;
String get mid => _mid;
String get orderId => _orderId;
bool get isLeader => _isLeader;
String get memberAvatar => _memberAvatar;
String get memberNickname => _memberNickname;
String get productId => _productId;
String get actPrice => _actPrice;
bool get state => _state;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actRecordId'] = _actRecordId;
map['mid'] = _mid;
map['orderId'] = _orderId;
map['isLeader'] = _isLeader;
map['memberAvatar'] = _memberAvatar;
map['memberNickname'] = _memberNickname;
map['productId'] = _productId;
map['actPrice'] = _actPrice;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
}
/// id : "1479399513473941504"
/// createTime : "2022-01-07 18:28:25"
/// createUser : "1478548720785031168"
/// updateTime : "2022-01-07 18:28:25"
/// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240"
/// type : 1
/// actTemplateId : "1479377328797646848"
/// actTimeId : "1479377329099636736"
/// actProductId : "1479377402042777600"
/// mid : "1478548720785031168"
/// joinNum : 0
/// startTime : "2022-01-07 18:28:25"
/// endTime : "2022-01-08 16:28:25"
/// state : 2
/// isDelete : 0
class ActRecord {
ActRecord({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
int type,
String actTemplateId,
String actTimeId,
String actProductId,
String mid,
int joinNum,
String startTime,
String endTime,
int state,
int isDelete,
}) {
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actProductId = actProductId;
_mid = mid;
_joinNum = joinNum;
_startTime = startTime;
_endTime = endTime;
_state = state;
_isDelete = isDelete;
}
ActRecord.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actProductId = json['actProductId'];
_mid = json['mid'];
_joinNum = json['joinNum'];
_startTime = json['startTime'];
_endTime = json['endTime'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
int _type;
String _actTemplateId;
String _actTimeId;
String _actProductId;
String _mid;
int _joinNum;
String _startTime;
String _endTime;
int _state;
int _isDelete;
int _tempDay;
int _tempHour;
int _tempM;
int _tempS;
int get tempDay => _tempDay;
set tempDay(int value) {
_tempDay = value;
}
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
int get type => _type;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actProductId => _actProductId;
String get mid => _mid;
int get joinNum => _joinNum;
String get startTime => _startTime;
String get endTime => _endTime;
int get state => _state;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['type'] = _type;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actProductId'] = _actProductId;
map['mid'] = _mid;
map['joinNum'] = _joinNum;
map['startTime'] = _startTime;
map['endTime'] = _endTime;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
int get tempHour => _tempHour;
set tempHour(int value) {
_tempHour = value;
}
int get tempM => _tempM;
set tempM(int value) {
_tempM = value;
}
int get tempS => _tempS;
set tempS(int value) {
_tempS = value;
}
}
/// id : "1479377402042777600"
/// createTime : "2022-01-07 17:00:33"
/// createUser : "1364043181062094848"
/// updateTime : "2022-01-07 17:00:33"
/// updateUser : "1364043181062094848"
/// storeId : "1460885296764682240"
/// templateId : "1479377328797646848"
/// timeId : "1479377329099636736"
/// productId : "1460886580993458176"
/// productName : "无花果礼盒"
/// productImg : "https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png"
/// productPrice : "88.00"
/// promotionPrice : "88.00"
/// productStock : 0
/// sellCount : 0
/// skuJson : [{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}]
/// isDelete : 0
class ActProduct {
ActProduct({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String templateId,
String timeId,
String productId,
String productName,
String productImg,
String productPrice,
String promotionPrice,
int productStock,
int sellCount,
List<SkuJson> skuJson,
int isDelete,
String shortName,
String supplierName,
String detail,
String rightImg,
}) {
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_templateId = templateId;
_timeId = timeId;
_productId = productId;
_productName = productName;
_productImg = productImg;
_productPrice = productPrice;
_promotionPrice = promotionPrice;
_productStock = productStock;
_sellCount = sellCount;
_skuJson = skuJson;
_isDelete = isDelete;
_shortName = shortName;
_supplierName =supplierName;
_detail = detail;
_rightImg = rightImg;
}
ActProduct.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_templateId = json['templateId'];
_timeId = json['timeId'];
_productId = json['productId'];
_productName = json['productName'];
_productImg = json['productImg'];
_productPrice = json['productPrice'];
_promotionPrice = json['promotionPrice'];
_productStock = json['productStock'];
_sellCount = json['sellCount'];
if (json['skuJson'] != null) {
_skuJson = [];
json['skuJson'].forEach((v) {
_skuJson.add(SkuJson.fromJson(v));
});
}
_isDelete = json['isDelete'];
_shortName = json['shortName'];
_supplierName = json['supplierName'];
_detail = json['detail'];
_rightImg = json['rightImg'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _templateId;
String _timeId;
String _productId;
String _productName;
String _productImg;
String _productPrice;
String _promotionPrice;
int _productStock;
int _sellCount;
List<SkuJson> _skuJson;
int _isDelete;
String _shortName;
String _supplierName;
String _detail;
String _rightImg;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
String get templateId => _templateId;
String get timeId => _timeId;
String get productId => _productId;
String get productName => _productName;
String get productImg => _productImg;
String get productPrice => _productPrice;
String get promotionPrice => _promotionPrice;
int get productStock => _productStock;
int get sellCount => _sellCount;
List<SkuJson> get skuJson => _skuJson;
int get isDelete => _isDelete;
String get shortName => _shortName;
String get supplierName => _supplierName;
String get detail => _detail;
String get rightImg => _rightImg;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['templateId'] = _templateId;
map['timeId'] = _timeId;
map['productId'] = _productId;
map['productName'] = _productName;
map['productImg'] = _productImg;
map['productPrice'] = _productPrice;
map['promotionPrice'] = _promotionPrice;
map['productStock'] = _productStock;
map['sellCount'] = _sellCount;
if (_skuJson != null) {
map['skuJson'] = _skuJson.map((v) => v.toJson()).toList();
}
map['isDelete'] = _isDelete;
map['shortName'] = _shortName;
map['supplierName'] = _supplierName;
map['detail'] = _detail;
map['rightImg'] = _rightImg;
return map;
}
}
/// skuId : "1460886581089927168"
/// skuPrice : 88
/// skuStock : 0
class SkuJson {
SkuJson({
String skuId,
String skuPrice,
int skuStock,
}) {
_skuId = skuId;
_skuPrice = skuPrice;
_skuStock = skuStock;
}
SkuJson.fromJson(dynamic json) {
_skuId = json['skuId'];
_skuPrice = json['skuPrice'];
_skuStock = json['skuStock'];
}
String _skuId;
String _skuPrice;
int _skuStock;
String get skuId => _skuId;
String get skuPrice => _skuPrice;
int get skuStock => _skuStock;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['skuId'] = _skuId;
map['skuPrice'] = _skuPrice;
map['skuStock'] = _skuStock;
return map;
}
}

111
lib/retrofit/data/activity_order_list.dart

@ -0,0 +1,111 @@
/// storeName : "一心回乡商城"
/// joinTime : "2022-01-07 18:28:25"
/// productImg : "https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png"
/// productName : "无花果礼盒"
/// productSkuName : ""
/// actRecordId : "1479399513473941504"
/// actRecordState : 4
/// actRecordJoinState : false
/// howManyMore : 2
/// orderSum : null
/// bargainMoney : null
/// howManyMoney : null
class ActivityOrderList {
ActivityOrderList({
String storeName,
String storeId,
String joinTime,
String productImg,
String productName,
String productSkuName,
String actRecordId,
int actRecordState,
bool actRecordJoinState,
int howManyMore,
int successNumber,
dynamic orderSum,
dynamic bargainMoney,
dynamic howManyMoney,}){
_storeName = storeName;
_storeId = storeId;
_joinTime = joinTime;
_productImg = productImg;
_productName = productName;
_productSkuName = productSkuName;
_actRecordId = actRecordId;
_actRecordState = actRecordState;
_actRecordJoinState = actRecordJoinState;
_howManyMore = howManyMore;
_successNumber = successNumber;
_orderSum = orderSum;
_bargainMoney = bargainMoney;
_howManyMoney = howManyMoney;
}
ActivityOrderList.fromJson(dynamic json) {
_storeName = json['storeName'];
_storeId = json['storeId'];
_joinTime = json['joinTime'];
_productImg = json['productImg'];
_productName = json['productName'];
_productSkuName = json['productSkuName'];
_actRecordId = json['actRecordId'];
_actRecordState = json['actRecordState'];
_actRecordJoinState = json['actRecordJoinState'];
_howManyMore = json['howManyMore'];
_successNumber = json['successNumber'];
_orderSum = json['orderSum'];
_bargainMoney = json['bargainMoney'];
_howManyMoney = json['howManyMoney'];
}
String _storeName;
String _storeId;
String _joinTime;
String _productImg;
String _productName;
String _productSkuName;
String _actRecordId;
int _actRecordState;
bool _actRecordJoinState;
int _howManyMore;
int _successNumber;
dynamic _orderSum;
dynamic _bargainMoney;
dynamic _howManyMoney;
String get storeName => _storeName;
String get storeId => _storeId;
String get joinTime => _joinTime;
String get productImg => _productImg;
String get productName => _productName;
String get productSkuName => _productSkuName;
String get actRecordId => _actRecordId;
int get actRecordState => _actRecordState;
bool get actRecordJoinState => _actRecordJoinState;
int get howManyMore => _howManyMore;
int get successNumber => _successNumber;
dynamic get orderSum => _orderSum;
dynamic get bargainMoney => _bargainMoney;
dynamic get howManyMoney => _howManyMoney;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['storeName'] = _storeName;
map['storeId'] = _storeId;
map['joinTime'] = _joinTime;
map['productImg'] = _productImg;
map['productName'] = _productName;
map['productSkuName'] = _productSkuName;
map['actRecordId'] = _actRecordId;
map['actRecordState'] = _actRecordState;
map['actRecordJoinState'] = _actRecordJoinState;
map['howManyMore'] = _howManyMore;
map ['successNumber'] = _successNumber;
map['orderSum'] = _orderSum;
map['bargainMoney'] = _bargainMoney;
map['howManyMoney'] = _howManyMoney;
return map;
}
}

416
lib/retrofit/data/home_recommend_list.dart

@ -0,0 +1,416 @@
/// id : "1473532263365869568"
/// createTime : "2021-12-22 13:54:03"
/// createUser : "1364043181062094848"
/// updateTime : "2021-12-22 13:54:03"
/// updateUser : "1364043181062094848"
/// supplierName : "测试"
/// storeId : "1364043181120815104"
/// categoryId : "1343391656220557312"
/// groupId : "1473531667711787008"
/// shortName : "可爱"
/// productName : "回乡牛公仔"
/// sellDesc : ""
/// productCode : "PRO202112221354030000000000004"
/// weight : "0"
/// applyPrice : "0.00"
/// price : "49.00"
/// stock : 0
/// sellCount : 0
/// needLogistics : 1
/// oversold : 1
/// organic : 0
/// status : 1
/// posShow : true
/// productType : 0
/// productNumber : 1
/// setMeal : 1
/// attrStyle : 0
/// detail : ""
/// isDelete : 0
/// printerFlag : "DEFAULT"
/// materialId : null
/// imgs : ["https://pos.upload.gznl.top/1179/2021/12/1bff0936-f2a2-401e-befd-e00b416763ad.png"]
/// productSkuList : [{"id":"1473532264519303168","createTime":"2021-12-22 13:54:03","createUser":"1364043181062094848","updateTime":"2021-12-22 13:54:03","updateUser":"1364043181062094848","storeId":"1364043181120815104","skuCode":"P202112221354035","skuNameStr":"","productId":"1473532263365869568","skuPrice":"49.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":0,"sort":50,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":0}]
class HomeRecommendList {
HomeRecommendList({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String supplierName,
String storeId,
String categoryId,
String groupId,
String shortName,
String productName,
String sellDesc,
String productCode,
String weight,
String applyPrice,
String price,
int stock,
int sellCount,
int needLogistics,
int oversold,
int organic,
int status,
bool posShow,
int productType,
int productNumber,
int setMeal,
int attrStyle,
String detail,
int isDelete,
String printerFlag,
dynamic materialId,
List<String> imgs,
List<ProductSkuList> productSkuList,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_supplierName = supplierName;
_storeId = storeId;
_categoryId = categoryId;
_groupId = groupId;
_shortName = shortName;
_productName = productName;
_sellDesc = sellDesc;
_productCode = productCode;
_weight = weight;
_applyPrice = applyPrice;
_price = price;
_stock = stock;
_sellCount = sellCount;
_needLogistics = needLogistics;
_oversold = oversold;
_organic = organic;
_status = status;
_posShow = posShow;
_productType = productType;
_productNumber = productNumber;
_setMeal = setMeal;
_attrStyle = attrStyle;
_detail = detail;
_isDelete = isDelete;
_printerFlag = printerFlag;
_materialId = materialId;
_imgs = imgs;
_productSkuList = productSkuList;
}
HomeRecommendList.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_supplierName = json['supplierName'];
_storeId = json['storeId'];
_categoryId = json['categoryId'];
_groupId = json['groupId'];
_shortName = json['shortName'];
_productName = json['productName'];
_sellDesc = json['sellDesc'];
_productCode = json['productCode'];
_weight = json['weight'];
_applyPrice = json['applyPrice'];
_price = json['price'];
_stock = json['stock'];
_sellCount = json['sellCount'];
_needLogistics = json['needLogistics'];
_oversold = json['oversold'];
_organic = json['organic'];
_status = json['status'];
_posShow = json['posShow'];
_productType = json['productType'];
_productNumber = json['productNumber'];
_setMeal = json['setMeal'];
_attrStyle = json['attrStyle'];
_detail = json['detail'];
_isDelete = json['isDelete'];
_printerFlag = json['printerFlag'];
_materialId = json['materialId'];
_imgs = json['imgs'] != null ? json['imgs'].cast<String>() : [];
if (json['productSkuList'] != null) {
_productSkuList = [];
json['productSkuList'].forEach((v) {
_productSkuList.add(ProductSkuList.fromJson(v));
});
}
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _supplierName;
String _storeId;
String _categoryId;
String _groupId;
String _shortName;
String _productName;
String _sellDesc;
String _productCode;
String _weight;
String _applyPrice;
String _price;
int _stock;
int _sellCount;
int _needLogistics;
int _oversold;
int _organic;
int _status;
bool _posShow;
int _productType;
int _productNumber;
int _setMeal;
int _attrStyle;
String _detail;
int _isDelete;
String _printerFlag;
dynamic _materialId;
List<String> _imgs;
List<ProductSkuList> _productSkuList;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get supplierName => _supplierName;
String get storeId => _storeId;
String get categoryId => _categoryId;
String get groupId => _groupId;
String get shortName => _shortName;
String get productName => _productName;
String get sellDesc => _sellDesc;
String get productCode => _productCode;
String get weight => _weight;
String get applyPrice => _applyPrice;
String get price => _price;
int get stock => _stock;
int get sellCount => _sellCount;
int get needLogistics => _needLogistics;
int get oversold => _oversold;
int get organic => _organic;
int get status => _status;
bool get posShow => _posShow;
int get productType => _productType;
int get productNumber => _productNumber;
int get setMeal => _setMeal;
int get attrStyle => _attrStyle;
String get detail => _detail;
int get isDelete => _isDelete;
String get printerFlag => _printerFlag;
dynamic get materialId => _materialId;
List<String> get imgs => _imgs;
List<ProductSkuList> get productSkuList => _productSkuList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['supplierName'] = _supplierName;
map['storeId'] = _storeId;
map['categoryId'] = _categoryId;
map['groupId'] = _groupId;
map['shortName'] = _shortName;
map['productName'] = _productName;
map['sellDesc'] = _sellDesc;
map['productCode'] = _productCode;
map['weight'] = _weight;
map['applyPrice'] = _applyPrice;
map['price'] = _price;
map['stock'] = _stock;
map['sellCount'] = _sellCount;
map['needLogistics'] = _needLogistics;
map['oversold'] = _oversold;
map['organic'] = _organic;
map['status'] = _status;
map['posShow'] = _posShow;
map['productType'] = _productType;
map['productNumber'] = _productNumber;
map['setMeal'] = _setMeal;
map['attrStyle'] = _attrStyle;
map['detail'] = _detail;
map['isDelete'] = _isDelete;
map['printerFlag'] = _printerFlag;
map['materialId'] = _materialId;
map['imgs'] = _imgs;
if (_productSkuList != null) {
map['productSkuList'] = _productSkuList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// id : "1473532264519303168"
/// createTime : "2021-12-22 13:54:03"
/// createUser : "1364043181062094848"
/// updateTime : "2021-12-22 13:54:03"
/// updateUser : "1364043181062094848"
/// storeId : "1364043181120815104"
/// skuCode : "P202112221354035"
/// skuNameStr : ""
/// productId : "1473532263365869568"
/// skuPrice : "49.00"
/// applyPrice : "0.00"
/// vipPrice : null
/// skuImg : null
/// skuStock : 0
/// sort : 50
/// setMeal : ""
/// weight : 0.0
/// volume : 0.0
/// isDelete : 0
/// material : null
/// version : 0
class ProductSkuList {
ProductSkuList({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String skuCode,
String skuNameStr,
String productId,
String skuPrice,
String applyPrice,
dynamic vipPrice,
dynamic skuImg,
int skuStock,
int sort,
String setMeal,
double weight,
double volume,
int isDelete,
dynamic material,
int version,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_skuCode = skuCode;
_skuNameStr = skuNameStr;
_productId = productId;
_skuPrice = skuPrice;
_applyPrice = applyPrice;
_vipPrice = vipPrice;
_skuImg = skuImg;
_skuStock = skuStock;
_sort = sort;
_setMeal = setMeal;
_weight = weight;
_volume = volume;
_isDelete = isDelete;
_material = material;
_version = version;
}
ProductSkuList.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_skuCode = json['skuCode'];
_skuNameStr = json['skuNameStr'];
_productId = json['productId'];
_skuPrice = json['skuPrice'];
_applyPrice = json['applyPrice'];
_vipPrice = json['vipPrice'];
_skuImg = json['skuImg'];
_skuStock = json['skuStock'];
_sort = json['sort'];
_setMeal = json['setMeal'];
_weight = json['weight'];
_volume = json['volume'];
_isDelete = json['isDelete'];
_material = json['material'];
_version = json['version'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _skuCode;
String _skuNameStr;
String _productId;
String _skuPrice;
String _applyPrice;
dynamic _vipPrice;
dynamic _skuImg;
int _skuStock;
int _sort;
String _setMeal;
double _weight;
double _volume;
int _isDelete;
dynamic _material;
int _version;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
String get skuCode => _skuCode;
String get skuNameStr => _skuNameStr;
String get productId => _productId;
String get skuPrice => _skuPrice;
String get applyPrice => _applyPrice;
dynamic get vipPrice => _vipPrice;
dynamic get skuImg => _skuImg;
int get skuStock => _skuStock;
int get sort => _sort;
String get setMeal => _setMeal;
double get weight => _weight;
double get volume => _volume;
int get isDelete => _isDelete;
dynamic get material => _material;
int get version => _version;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['skuCode'] = _skuCode;
map['skuNameStr'] = _skuNameStr;
map['productId'] = _productId;
map['skuPrice'] = _skuPrice;
map['applyPrice'] = _applyPrice;
map['vipPrice'] = _vipPrice;
map['skuImg'] = _skuImg;
map['skuStock'] = _skuStock;
map['sort'] = _sort;
map['setMeal'] = _setMeal;
map['weight'] = _weight;
map['volume'] = _volume;
map['isDelete'] = _isDelete;
map['material'] = _material;
map['version'] = _version;
return map;
}
}

148
lib/retrofit/data/launch_join_act.dart

@ -0,0 +1,148 @@
/// id : "1491606527402835968"
/// createTime : "2022-02-10 10:54:43"
/// createUser : "1478548720785031168"
/// updateTime : "2022-02-10 10:54:43"
/// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240"
/// type : 1
/// actTemplateId : "1490571620652154880"
/// actTimeId : "1490571620887035904"
/// actRecordId : "1491606526735941632"
/// mid : "1478548720785031168"
/// orderId : "1491606528052953088"
/// isLeader : true
/// memberAvatar : ""
/// memberNickname : "斯基"
/// productId : "1490571670107193344"
/// actPrice : "60"
/// state : false
/// isDelete : null
class LaunchJoinAct {
LaunchJoinAct({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
int type,
String actTemplateId,
String actTimeId,
String actRecordId,
String mid,
String orderId,
bool isLeader,
String memberAvatar,
String memberNickname,
String productId,
String actPrice,
bool state,
dynamic isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actRecordId = actRecordId;
_mid = mid;
_orderId = orderId;
_isLeader = isLeader;
_memberAvatar = memberAvatar;
_memberNickname = memberNickname;
_productId = productId;
_actPrice = actPrice;
_state = state;
_isDelete = isDelete;
}
LaunchJoinAct.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actRecordId = json['actRecordId'];
_mid = json['mid'];
_orderId = json['orderId'];
_isLeader = json['isLeader'];
_memberAvatar = json['memberAvatar'];
_memberNickname = json['memberNickname'];
_productId = json['productId'];
_actPrice = json['actPrice'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
int _type;
String _actTemplateId;
String _actTimeId;
String _actRecordId;
String _mid;
String _orderId;
bool _isLeader;
String _memberAvatar;
String _memberNickname;
String _productId;
String _actPrice;
bool _state;
dynamic _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
int get type => _type;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actRecordId => _actRecordId;
String get mid => _mid;
String get orderId => _orderId;
bool get isLeader => _isLeader;
String get memberAvatar => _memberAvatar;
String get memberNickname => _memberNickname;
String get productId => _productId;
String get actPrice => _actPrice;
bool get state => _state;
dynamic get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['type'] = _type;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actRecordId'] = _actRecordId;
map['mid'] = _mid;
map['orderId'] = _orderId;
map['isLeader'] = _isLeader;
map['memberAvatar'] = _memberAvatar;
map['memberNickname'] = _memberNickname;
map['productId'] = _productId;
map['actPrice'] = _actPrice;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
}

6
lib/retrofit/data/miNiDetail.dart

@ -61,12 +61,14 @@ class MiNiDetail {
int sellCount;
int needLogistics;
int oversold;
int organic;
int status;
bool posShow;
int productType;
int productNumber;
int setMeal;
int attrStyle;
String detail;
int isDelete;
String printerFlag;
dynamic materialId;
@ -106,12 +108,14 @@ class MiNiDetail {
miNiDetailBean.sellCount = map['sellCount'];
miNiDetailBean.needLogistics = map['needLogistics'];
miNiDetailBean.oversold = map['oversold'];
miNiDetailBean.organic = map['organic'];
miNiDetailBean.status = map['status'];
miNiDetailBean.posShow = map['posShow'];
miNiDetailBean.productType = map['productType'];
miNiDetailBean.productNumber = map['productNumber'];
miNiDetailBean.setMeal = map['setMeal'];
miNiDetailBean.attrStyle = map['attrStyle'];
miNiDetailBean.detail = map['detail'];
miNiDetailBean.isDelete = map['isDelete'];
miNiDetailBean.printerFlag = map['printerFlag'];
miNiDetailBean.materialId = map['materialId'];
@ -157,12 +161,14 @@ class MiNiDetail {
"sellCount": sellCount,
"needLogistics": needLogistics,
"oversold": oversold,
"organic" : organic,
"status": status,
"posShow": posShow,
"productType": productType,
"productNumber": productNumber,
"setMeal": setMeal,
"attrStyle": attrStyle,
"detail" :detail,
"isDelete": isDelete,
"printerFlag": printerFlag,
"materialId": materialId,

4
lib/retrofit/data/product.dart

@ -1,5 +1,5 @@
class ProductList {
class ProductsList {
String _id;
String _createTime;
String _createUser;
@ -124,7 +124,7 @@ class ProductList {
_batch = batch;
}
ProductList.fromJson(dynamic json) {
ProductsList.fromJson(dynamic json) {
_id = json["id"];
_createTime = json["createTime"];
_createUser = json["createUser"];

740
lib/retrofit/data/shopping_home_config.dart

File diff suppressed because one or more lines are too long

51
lib/retrofit/min_api.dart

@ -14,10 +14,17 @@ import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
import 'data/activity_actRecord_details.dart';
import 'data/activity_area_list.dart';
import 'data/activity_details.dart';
import 'data/activity_order_list.dart';
import 'data/findMiNiGroupList.dart';
import 'data/home_recommend_list.dart';
import 'data/launch_join_act.dart';
import 'data/miNiDetail.dart';
import 'data/settleOrderInfo.dart';
import 'data/shoppingCart.dart';
import 'data/shopping_home_config.dart';
part 'min_api.g.dart';
@ -58,8 +65,8 @@ abstract class MinApiService {
}
headers["Environment"] = "app";
dio.options = BaseOptions(
connectTimeout: 10000,
receiveTimeout: 10000,
connectTimeout: 15000,
receiveTimeout: 15000,
headers: headers,
responseType: ResponseType.json,
);
@ -119,7 +126,7 @@ abstract class MinApiService {
);
if (kReleaseMode) {
baseUrl = serviceBaseUrl;
baseUrl = base_url;
}
return _MinApiService(dio, baseUrl: baseUrl);
}
@ -202,4 +209,42 @@ abstract class MinApiService {
@GET("order/getParentInfo?tableId={tableId}")
Future<BaseData> getParentInfo(@Path("tableId") String tableId);
/// /
@GET("product/recommendList")
Future<BaseData<List<HomeRecommendList>>> recommendList();
///
@GET("store/homeConfig")
Future<BaseData<ShoppingHomeConfig>> homeConfig();
///,,,
@GET("actTemplate/findActListByType?allDay={allDay}&type={type}")
Future<BaseData<ActivityAreaList>> findActListByType(@Path("allDay") bool allDay,
@Path("type") String type);
/// APP
@GET("actTemplate/viewProduct?actProductId={actProductId}&type={type}")
Future<BaseData<ActivityDetails>> viewProduct(@Path("actProductId") String actProductId,
@Path("type") String type);
///
@POST("actTemplate/launchAct")
Future<BaseData<LaunchJoinAct>> launchAct(@Body() Map<String, dynamic> param);
///
@POST("actTemplate/joinAct")
Future<BaseData<LaunchJoinAct>> joinAct(@Body() Map<String, dynamic> param);
///
@POST("actTemplate/actPay")
Future<BaseData> actPay(@Body() Map<String, dynamic> param);
///
@POST("actTemplate/showMyActList")
Future<BaseData<List<ActivityOrderList>>> showMyActList(@Body() Map<String, dynamic> param);
///
@GET("actTemplate/showOneAct?actRecordId={actRecordId}")
Future<BaseData<ActivityActRecordDetails>> showOneAct(@Path("actRecordId") String actRecordId);
}

205
lib/retrofit/min_api.g.dart

@ -400,4 +400,209 @@ class _MinApiService implements MinApiService {
);
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<LaunchJoinAct>> 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<LaunchJoinAct>.fromJson(
_result.data,
(json) => LaunchJoinAct.fromJson(json),
);
return value;
}
@override
Future<BaseData<LaunchJoinAct>> 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<LaunchJoinAct>.fromJson(
_result.data,
(json) => LaunchJoinAct.fromJson(json),
);
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;
}
}

3
lib/retrofit/retrofit_api.dart

@ -55,6 +55,7 @@ import 'data/vip_badges_list.dart';
import 'data/vip_benefit_list.dart';
import 'data/vip_card.dart';
import 'data/vip_rule_details.dart';
import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
@ -144,7 +145,7 @@ abstract class ApiService {
);
if (kReleaseMode) {
baseUrl = serviceBaseUrl;
baseUrl = base_url;
}
return _ApiService(dio, baseUrl: baseUrl);
}

284
lib/settlement/settlement.dart

@ -9,15 +9,18 @@ import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:fluwx/fluwx.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/address.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/down_order.dart';
import 'package:huixiang/retrofit/data/launch_join_act.dart';
import 'package:huixiang/retrofit/data/min_order_info.dart';
import 'package:huixiang/retrofit/data/placeOrderFirst.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/settlement/settlement_model.dart';
import 'package:huixiang/settlement/settlement_view/activity_coupon_remarks.dart';
import 'package:huixiang/settlement/settlement_view/distribution.dart';
import 'package:huixiang/settlement/settlement_view/pay_method.dart';
@ -47,8 +50,6 @@ class _Settlement extends State<Settlement> {
MinApiService minService;
Function(int type) callback;
StoreInfo storeInfo;
// ShoppingCart shopCarGoods;
SettleOrderInfo settleOrderInfo;
MinOrderInfo minOrderInfo;
int selectedBtn = 0;
@ -58,12 +59,23 @@ class _Settlement extends State<Settlement> {
int payChannel = 1;
int tableId = 0;
int numberOfPeople = 0;
String pageType;
Address address;
CouponListBean couponListBean;
PromotionInfoListBean promotion;
String mobile;
bool placeOrder = false;
String actProductId;
String actProductSkuId;
ActivityDetails activityDetails;
BargainType bargainType = BargainType.BargainZBug;
LaunchJoinAct launchJoinAct;
String skuPrice1;
JoinActivity joinA = JoinActivity.GoJoin;
String bargainOrderId;
String productSkuId;
int count1 = 0;
String productId;
@override
void initState() {
@ -75,6 +87,17 @@ class _Settlement extends State<Settlement> {
numberOfPeople = widget.arguments["numberOfPeople"] ?? 0;
promotions = widget.arguments["pName"] ?? "";
coupons = widget.arguments["cName"] ?? "";
pageType = widget.arguments["pageType"];
actProductId = widget.arguments["actProductId"];
actProductSkuId = widget.arguments["actProductSkuId"];
activityDetails = widget.arguments["activityDetails"];
bargainType = widget.arguments["bargainType"];
skuPrice1 = widget.arguments["skuPrice1"];
joinA = widget.arguments["joinA"];
bargainOrderId = widget.arguments["bargainOrderId"];
productSkuId = widget.arguments["productSkuId"];
count1 = widget.arguments["buyNum"];
productId = widget.arguments["productId"];
if (tableId == 0) {
placeOrder = true;
}
@ -95,7 +118,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
widget.arguments["pid"],
widget.arguments["pid"] ?? (productId?? ""),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
);
} else if (coupons != null && coupons != "" || tableId <= 0) {
queryOrderInfo(
@ -103,10 +130,24 @@ class _Settlement extends State<Settlement> {
selectedBtn,
widget.arguments["cid"],
0,
null,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
);
} else
queryOrderInfo(null, selectedBtn, null, 0, null);
queryOrderInfo(
null,
selectedBtn,
null,
0,
productId ?? "",
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
);
});
weChatResponseEventHandler.listen((event) async {
@ -122,13 +163,21 @@ class _Settlement extends State<Settlement> {
memberCouponId,
orderId,
promotionId,
productSkuId,
actProductId,
actProductSkuId,
buyNum,
) async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId
"promotionId": promotionId,
"productSkuId":productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"buyNum":buyNum
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
@ -136,7 +185,8 @@ class _Settlement extends State<Settlement> {
if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
placeOrder = true;
queryOrderDetails(parentId);
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
});
}
@ -146,14 +196,14 @@ class _Settlement extends State<Settlement> {
queryOrderDetails(id) async {
print("ididididididid: $id");
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
"id": id,
"id": widget.arguments["orderId"],
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
minOrderInfo = baseData.data;
});
}else{
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center);
}
}
@ -162,7 +212,17 @@ class _Settlement extends State<Settlement> {
this.selectedBtn = selectedBtn;
});
if (address != null) {
queryOrderInfo(address.id, selectedBtn, null, 0, null);
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
return;
}
BaseData<List<Address>> baseDate =
@ -206,7 +266,17 @@ class _Settlement extends State<Settlement> {
}
}
queryOrderInfo(address.id, selectedBtn, null, 0, null);
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}
@ -222,13 +292,82 @@ class _Settlement extends State<Settlement> {
});
});
queryOrderInfo(address.id, selectedBtn, null, 0, null);
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}
PlaceOrderFirst placeOrderFirst;
DownOrder downOrder;
///
queryLaunchAct() async {
BaseData baseData = await minService.launchAct({
"actProductId": activityDetails.actProduct.id,
"actRecordId": 0,
"actTemplateId": activityDetails.actProduct.templateId,
"actTimeId": activityDetails.actProduct.timeId,
"addressId": address == null ? null : address.id,
"isDirectBuy": (bargainType == BargainType.BargainBug ||
bargainType == BargainType.CollageBug)
? false
: true,
"getType": selectedBtn,
"productId": activityDetails.actProduct.productId,
"skuId": actProductSkuId ?? "",
"skuPrice": settleOrderInfo.price,
"templateType": pageType,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
launchJoinAct = baseData.data;
if (bargainType == BargainType.BargainBug) {
toBargain();
} else {
activityPay();
}
});
} else {
if ((activityDetails?.actProduct?.productStock ?? 0) == 0)
SmartDialog.showToast("活动商品售罄", alignment: Alignment.center);
}
}
///
queryJoinAct() async {
BaseData baseData = await minService.joinAct({
"actProductId": activityDetails.actProduct.id,
"actRecordId": widget.arguments["indexP"],
"actTemplateId": activityDetails.actProduct.templateId,
"actTimeId": activityDetails.actProduct.timeId,
"addressId": address == null ? null : address.id,
"isDirectBuy": (bargainType == BargainType.BargainBug ||
bargainType == BargainType.CollageBug)
? false
: true,
"getType": selectedBtn,
"productId": activityDetails.actProduct.productId,
"skuId": actProductSkuId ?? "",
"skuPrice": skuPrice1,
"templateType": pageType
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
launchJoinAct = baseData.data;
activityPay();
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
///
queryPlaceOrderFirst() async {
for (int i = 0; i < settleOrderInfo.orderProductList.length; i++) {
@ -385,6 +524,66 @@ class _Settlement extends State<Settlement> {
}
}
///
activityPay() async {
if (payChannel == 1) {
if (Platform.isAndroid) {
if (!(await Min.isInitialize())) {
// app的充值支付使用同一个WXPayEntryActivity回调
// getPackage空指针
//
await Min.initialize();
}
}
BaseData<WxPay> baseData = await minService.actPay({
"orderId":
bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId,
"payChannel": placeOrderFirst.payChannel
}).catchError((error) {
print(error);
});
if (baseData != null && baseData.isSuccess) {
WxPay wxPay = baseData.data;
await registerWxApi(
appId: wxPay.appId,
doOnAndroid: true,
universalLink: "https://hx.lotus-wallet.com/app/",
);
payWithWeChat(
appId: wxPay.appId,
partnerId: wxPay.partnerId,
prepayId: wxPay.prepayId,
packageValue: wxPay.packageValue,
nonceStr: wxPay.nonceStr,
timeStamp: int.tryParse(wxPay.timeStamp),
sign: wxPay.sign,
);
}
} else {
BaseData baseData = await minService.actPay({
"orderId":
bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId,
"payChannel": payChannel
}).catchError((error) {
print(error);
});
if (baseData != null && baseData.isSuccess) {
toOrderDetails(
bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId);
} else {
SmartDialog.show(
widget: Tips(
() {
toOrderDetails(bargainOrderId != null
? bargainOrderId
: launchJoinAct.orderId);
},
text: "${baseData.msg}",
));
}
}
}
toOrderDetails(String orderId) {
Navigator.of(context).popAndPushNamed(
'/router/order_details',
@ -395,6 +594,16 @@ class _Settlement extends State<Settlement> {
// Navigator.of(context).pop();
}
///
toBargain() async {
await Navigator.of(context)
.popAndPushNamed('/router/bargain_details', arguments: {
"actRecordId": launchJoinAct.actRecordId,
// "limitNumber": limitNumber,
"storeInfo": storeInfo,
});
}
@override
Widget build(BuildContext context) {
return Container(
@ -437,10 +646,19 @@ class _Settlement extends State<Settlement> {
setState(() {
this.selectedBtn = 0;
});
queryOrderInfo(addressId, isTake,
memberCouponId, orderId, promotionId);
queryOrderInfo(
addressId,
isTake,
memberCouponId,
orderId,
promotionId ?? (productId?? ""),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}, queryAddress, storeInfo, address,
selectedAddress),
selectedAddress, pageType),
SizedBox(
height: 16,
@ -458,6 +676,7 @@ class _Settlement extends State<Settlement> {
settleOrderInfo,
minOrderInfo,
tableId,
pageType,
),
/////
@ -483,7 +702,8 @@ class _Settlement extends State<Settlement> {
tableId,
),
if (placeOrder)
if (placeOrder &&
joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck),
@ -510,9 +730,9 @@ class _Settlement extends State<Settlement> {
),
),
Text(
minOrderInfo != null
(minOrderInfo != null
? "${minOrderInfo.orderSumPrice}"
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}",
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}"),
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
@ -525,7 +745,9 @@ class _Settlement extends State<Settlement> {
RoundButton(
width: 103.w,
height: 54.h,
text: placeOrder ? S.current.jiesuan : "下单",
text: joinA == JoinActivity.BargainBug
? "发起砍价"
: (placeOrder ? S.current.jiesuan : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
@ -534,7 +756,13 @@ class _Settlement extends State<Settlement> {
vertical: 5.h,
),
callback: () {
queryPlaceOrderFirst();
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
},
),
],
@ -597,7 +825,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
couponListBean != null ? couponListBean.id : null,
0,
null,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}
@ -621,7 +853,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
promotion != null ? promotion.id : null,
promotion != null ? promotion.id : (productId?? null),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}

15
lib/settlement/settlement_model.dart

@ -0,0 +1,15 @@
enum BargainType {
BargainZBug,
BargainBug,
CollageBug,
}
enum JoinActivity {
GoJoin,
CollageBug,
CollageZBug,
BargainZBug,
MZBug,
MBug,
BargainBug,
}

30
lib/settlement/settlement_view/distribution.dart

@ -23,9 +23,10 @@ class DistributionMode extends StatefulWidget {
final Function(String addId) selectedNewAddress;
final StoreInfo storeInfo;
final Address address;
final String pageType;
DistributionMode(this.queryOrderInfo, this.queryAddress, this.storeInfo,
this.address, this.selectedNewAddress);
this.address, this.selectedNewAddress, this.pageType);
@override
State<StatefulWidget> createState() {
@ -153,10 +154,13 @@ class _DistributionMode extends State<DistributionMode> {
flex: 1,
child: GestureDetector(
onTap: () {
setState(() {
selectedBtn = 1;
widget.queryAddress(selectedBtn);
});
if (widget.storeInfo.storeName == "一心回乡商城") {
SmartDialog.showToast("该功能暂未开放!",
alignment: Alignment.center);
return;
}
selectedBtn = 1;
widget.queryAddress(selectedBtn);
},
child: Container(
height: 50.h,
@ -176,6 +180,11 @@ class _DistributionMode extends State<DistributionMode> {
flex: 1,
child: GestureDetector(
onTap: () {
if (widget.storeInfo.storeName == "一心回乡商城") {
selectedBtn = 2;
widget.queryAddress(selectedBtn);
return;
}
SmartDialog.showToast("该功能暂未开放!",
alignment: Alignment.center);
},
@ -307,11 +316,17 @@ class _DistributionMode extends State<DistributionMode> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
(widget.storeInfo.storeName == "一心回乡商城") ?
Icon(
Icons.local_shipping,
color: Color(0xFF727272),
size: 24,
):Image.asset(
"assets/image/icon_permission_location.webp",
height: 24.h,
width: 24.w,
),
SizedBox(width: 5),
Text(
widget?.address?.username ?? "",
overflow: TextOverflow.ellipsis,
@ -350,7 +365,8 @@ class _DistributionMode extends State<DistributionMode> {
});
},
child: Container(
padding:EdgeInsets.symmetric(horizontal:15.w,vertical: 5.h),
padding: EdgeInsets.symmetric(
horizontal: 15.w, vertical: 5.h),
child: Icon(
Icons.keyboard_arrow_right,
size: 24,

136
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/min_order_info.dart';
import 'package:huixiang/retrofit/data/order_product_vo.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
@ -14,9 +15,10 @@ class SettlementOrderCommodity extends StatefulWidget {
final SettleOrderInfo settleOrderInfo;
final MinOrderInfo minOrderInfo;
final String pageType;
SettlementOrderCommodity(
this.isTakeOut, this.settleOrderInfo, this.minOrderInfo,this.tableId);
this.isTakeOut, this.settleOrderInfo, this.minOrderInfo,this.tableId,this.pageType,);
@override
State<StatefulWidget> createState() {
@ -111,7 +113,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
color: Colors.grey,
),
));
widgets.add(buildTotalPrice());
// widgets.add(buildTotalPrice());
return widgets;
}
@ -315,71 +317,71 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
);
}
Widget buildTotalPrice() {
return Container(
margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Expanded(
child: Text(
S.of(context).gongjijianshangpin((widget.minOrderInfo != null)
? ((widget.minOrderInfo != null)
? widget.minOrderInfo.orderProductVOList.length
: "0")
: (widget.settleOrderInfo != null)
? widget.settleOrderInfo.orderProductList.length
: "0"),
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
fontWeight: MyFontWeight.semi_bold,
),
),
flex: 1,
),
Container(
child: Text(
"已优惠:¥${discountPrice()}",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7B7B7B),
fontWeight: MyFontWeight.medium,
),
),
),
SizedBox(
width: 15.w,
),
Container(
child: Text(
S.of(context).jiesuanjine,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold,
),
),
),
SizedBox(
width: 5.w,
),
Text(
totalPrice(),
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
);
}
// Widget buildTotalPrice() {
// return Container(
// margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.end,
// crossAxisAlignment: CrossAxisAlignment.baseline,
// textBaseline: TextBaseline.alphabetic,
// children: [
// Expanded(
// child: Text(
// S.of(context).gongjijianshangpin((widget.minOrderInfo != null)
// ? ((widget.minOrderInfo != null)
// ? widget.minOrderInfo.orderProductVOList.length
// : "0")
// : (widget.settleOrderInfo != null)
// ? widget.settleOrderInfo.orderProductList.length
// : "0"),
// style: TextStyle(
// fontSize: 10.sp,
// color: Color(0xFFA29E9E),
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
// flex: 1,
// ),
// Container(
// child: Text(
// "已优惠:¥${discountPrice()}",
// style: TextStyle(
// fontSize: 12.sp,
// color: Color(0xFF7B7B7B),
// fontWeight: MyFontWeight.medium,
// ),
// ),
// ),
// SizedBox(
// width: 15.w,
// ),
//
// Container(
// child: Text(
// S.of(context).jiesuanjine,
// style: TextStyle(
// fontSize: 12.sp,
// color: Color(0xFF353535),
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
// ),
// SizedBox(
// width: 5.w,
// ),
// Text(
// totalPrice(),
// textAlign: TextAlign.end,
// style: TextStyle(
// fontSize: 14.sp,
// color: Color(0xFF32A060),
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
// ],
// ),
// );
// }
String discountPrice(){
if(widget.minOrderInfo != null){

1097
lib/store/shopping/activity_prefecture_details.dart

File diff suppressed because it is too large Load Diff

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

@ -0,0 +1,599 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/shoppingCart.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.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:flutter_screenutil/flutter_screenutil.dart';
class ShoppingCartPage extends StatefulWidget {
final String minToken;
final String storeId;
final String tenant;
final StoreInfo storeInfo;
ShoppingCartPage(this.minToken, this.storeId, this.tenant, this.storeInfo);
@override
State<StatefulWidget> createState() {
return _ShoppingCartPage();
}
}
class _ShoppingCartPage extends State<ShoppingCartPage>
with AutomaticKeepAliveClientMixin {
ApiService apiService;
MinApiService minService;
List<ShoppingCart> shopCarGoods = [];
String pName;
String pid;
String cName;
String cid;
int tableId = 0;
bool topIndex = false;
bool isAllSelect = false;
int bIndex = 0;
@override
void initState() {
super.initState();
queryShopCar();
}
///
clearShopCar() async {
shopCarGoods[0].shoppingCartSkuItemList.forEach((element) {
if (element.selected == 1) {
shopCartAdd(element, -element.buyNum, element.selected);
}
});
queryShopCar();
}
///
toDownOrder() async {
await Navigator.of(context).pushNamed(
'/router/settlement',
arguments: {
"storeInfo": widget.storeInfo,
"tableId": tableId,
"pName": pName,
"pid": pid,
"cName": cName,
"cid": cid,
},
);
queryShopCar();
}
///
queryShopCar() async {
if (widget.minToken == null) return;
if (minService == null)
minService = MinApiService(
Dio(),
context: context,
token: widget.minToken,
tenant: widget.tenant,
storeId: widget.storeId,
showLoading: false,
);
BaseData<List<ShoppingCart>> baseData =
await minService.getShoppingCart(tableId).catchError((error) {
refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
setState(() {
shopCarGoods.clear();
shopCarGoods.addAll(baseData.data);
refreshController.refreshCompleted();
});
} else {
refreshController.refreshFailed();
}
}
///
shopCartAdd(
ShoppingCartSkuItemListBean cartSkuItem, int count, int selected) async {
Map<String, dynamic> shopCarTemp = shopCarGoods[0].toJson();
cartSkuItem.buyNum += count;
cartSkuItem.selected = selected;
shopCarTemp["selected"] = selected;
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()];
BaseData baseDate = await minService.shoppingCartSingle(shopCarTemp);
if (baseDate.isSuccess) {
setState(() {
queryShopCar();
});
}
refreshController.refreshFailed();
}
final SwiperController controller = SwiperController();
@override
void dispose() {
super.dispose();
if (refreshController != null) refreshController.dispose();
}
final RefreshController refreshController = RefreshController();
@override
Widget build(BuildContext context) {
super.build(context);
return Stack(
children: [
Column(
children: [
MyAppBar(
title: "购物车",
titleColor: Colors.black,
leadingColor: Colors.black,
background: Colors.transparent,
actions: [
GestureDetector(
onTap: () {
setState(() {
topIndex = !topIndex;
});
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(right: 12.w),
padding: EdgeInsets.only(left:35,),
child: Text(
!topIndex ? "管理" : S.of(context).quxiao,
style: TextStyle(
fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold,
color: Colors.black,
),
),
),
)
],
),
Expanded(
child: Container(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
setState(() {
queryShopCar();
});
},
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: FutureBuilder(
// future: queryShopCar(),
builder: (context, snapshot) {
return Column(
children: [
///
cartGoodsList(),
],
);
},
),
),
),
),
),
],
),
Align(
alignment: Alignment(0.8, 0.8),
child: Container(
height: 70.h,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
color: Color(0xFFFAFAFA),
),
padding: EdgeInsets.only(left: 16.w, right: 16.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
setState(() {
isAllSelect = !isAllSelect;
shopCarGoods[0]
.shoppingCartSkuItemList
.forEach((element) {
element.selected = isAllSelect ? 1 : 0;
shopCartAdd(element, 0, element.selected);
});
});
},
child: Container(
height:70,
child: Image.asset(
isAllSelect
? "assets/image/icon_radio_selected.webp"
: "assets/image/icon_radio_unselected.webp",
width: 16,
height: 16,
),),
),
SizedBox(width: 5.w),
Expanded(
child: Text(
"全选",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFA29E9E),
),
),
),
!topIndex
? Row(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "合计:",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
TextSpan(
text: ((shopCarGoods?.length ?? 0) > 0)
? (shopCarGoods[0]?.cartSum ?? "")
: "",
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
],
),
),
GestureDetector(
onTap: () {
toDownOrder();
},
child: Container(
alignment: Alignment.center,
width: 70.w,
height: 32.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Text(
"结算",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.regular,
color: Colors.white,
),
),
),
),
],
)
: GestureDetector(
onTap: () {
if(isAllItemUnSelected())
return;
clearShopCar();
},
child: Container(
alignment: Alignment.center,
width: 70.w,
height: 32.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
color:isAllItemUnSelected()?Color(0xFFE5E5E5):Color(0xFFFB312B),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Text(
"删除",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.regular,
color: Colors.white,
),
),
),
),
],
),
),
),
],
);
}
////
bool isAllItemUnSelected(){
bool unAllSelectedFlag = true;
bool allSelectedFlag = true;
if(shopCarGoods == null || shopCarGoods.length == 0){
setState(() {
isAllSelect = false;
});
return unAllSelectedFlag;
}
shopCarGoods[0]
.shoppingCartSkuItemList
.forEach((element) {
if(element.selected == 1)
unAllSelectedFlag = false;
else allSelectedFlag = false;
});
setState(() {
isAllSelect = allSelectedFlag;
});
return unAllSelectedFlag;
}
Widget cartGoodsList() {
return (shopCarGoods == null || shopCarGoods.length == 0)
? NoDataView(
src: "assets/image/shopping_k.webp",
isShowBtn: false,
text: "目前暂无商品,要快去买点好吃的哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 150.h),
)
: Container(
margin: EdgeInsets.only(bottom: 50.h),
child: ListView.builder(
itemCount: ((shopCarGoods?.length ?? 0) > 0)
? (shopCarGoods[0]?.shoppingCartSkuItemList?.length ?? 0)
: 0,
shrinkWrap: true,
padding: EdgeInsets.only(
top: 8.h,
bottom: 84.h, /* + (375.h - 88.h) + 4.h*/
),
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return InkWell(
onTap: () {
bIndex = position;
},
child: cartGoodsItem(position),
);
}),
);
}
Widget cartGoodsItem(index) {
return Container(
margin: EdgeInsets.all(16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
setState(() {
shopCarGoods[0].shoppingCartSkuItemList[index].selected =
(shopCarGoods[0].shoppingCartSkuItemList[index].selected ==
0)
? 1
: 0;
shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList[index], 0,
shopCarGoods[0].shoppingCartSkuItemList[index].selected);
});
},
child:Container(
height: 60,
child:Image.asset(
(shopCarGoods[0].shoppingCartSkuItemList[index].selected == 1)
? "assets/image/icon_radio_selected.webp"
: "assets/image/icon_radio_unselected.webp",
width: 16,
height: 16,
),),
),
SizedBox(width: 16.w),
MImage(
shopCarGoods[0].shoppingCartSkuItemList[index]?.skuImg ?? "",
isCircle: true,
width: 81,
height: 81,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 10.w),
Expanded(
child: Container(
height: 81.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
shopCarGoods[0]
.shoppingCartSkuItemList[index]
?.productName ??
"",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
),
// SizedBox(height: 5.h),
Text(
shopCarGoods[0].shoppingCartSkuItemList[index]?.skuName ??
"",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF727272),
),
),
// SizedBox(height: 5.h),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
TextSpan(
text: shopCarGoods[0]
.shoppingCartSkuItemList[index]
?.skuPrice ??
"",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
],
),
)),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkWell(
onTap: () {
setState(() {
if (shopCarGoods[0]
.shoppingCartSkuItemList[index]
.buyNum >
1)
shopCartAdd(
shopCarGoods[0]
.shoppingCartSkuItemList[index],
-1,
shopCarGoods[0]
.shoppingCartSkuItemList[index]
.selected);
});
},
child: Image.asset(
"assets/image/reduce.webp",
width: 22,
height: 22,
),
),
Container(
width: 30,
alignment: Alignment.center,
child: Text(
shopCarGoods[0]
.shoppingCartSkuItemList[index]
?.buyNum
.toString() ??
0,
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
),
),
InkWell(
onTap: () {
setState(() {
shopCartAdd(
shopCarGoods[0]
.shoppingCartSkuItemList[index],
1,
shopCarGoods[0]
.shoppingCartSkuItemList[index]
.selected);
});
},
child: Image.asset(
"assets/image/add.webp",
width: 22,
height: 22,
),
),
],
)
],
),
],
)),
),
],
),
);
}
@override
bool get wantKeepAlive => true;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save