Browse Source

Merge remote-tracking branch 'origin/dev' into dev

new_revision_app
fmk 2 years ago
parent
commit
4c3a0bfde9
  1. BIN
      assets/image/2x/channel_jt.webp
  2. BIN
      assets/image/2x/channel_logo.webp
  3. BIN
      assets/image/2x/channel_text.webp
  4. BIN
      assets/image/3x/channel_jt.webp
  5. BIN
      assets/image/3x/channel_logo.webp
  6. BIN
      assets/image/3x/channel_text.webp
  7. BIN
      assets/image/channel_jt.webp
  8. BIN
      assets/image/channel_logo.webp
  9. BIN
      assets/image/channel_text.webp
  10. 4
      lib/generated/intl/messages_en.dart
  11. 4
      lib/generated/intl/messages_en_US.dart
  12. 4
      lib/generated/intl/messages_zh_CN.dart
  13. 4
      lib/generated/intl/messages_zh_Hans_CN.dart
  14. 4
      lib/generated/intl/messages_zh_Hant_CN.dart
  15. 4
      lib/generated/intl/messages_zh_TW.dart
  16. 40
      lib/generated/l10n.dart
  17. 54
      lib/home/home_page.dart
  18. 17
      lib/home/start_page.dart
  19. 4
      lib/l10n/intl_en.arb
  20. 4
      lib/l10n/intl_en_US.arb
  21. 4
      lib/l10n/intl_zh_CN.arb
  22. 4
      lib/l10n/intl_zh_Hans_CN.arb
  23. 4
      lib/l10n/intl_zh_Hant_CN.arb
  24. 4
      lib/l10n/intl_zh_TW.arb
  25. 3
      lib/login/login_store_select.dart
  26. 2
      lib/main.dart
  27. 2
      lib/main_page.dart
  28. 2
      lib/mine/mine_page.dart
  29. 743
      lib/settlement/settlement.dart
  30. 4
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  31. 347
      lib/store/shop_details_page.dart
  32. 7
      lib/store/store_order.dart
  33. 6
      lib/store/store_view/product_meals_sku.dart
  34. 7
      lib/store/store_view/product_sku.dart
  35. 12
      lib/store/store_view/shop_goods.dart
  36. 208
      lib/view_widget/channel_dialog.dart
  37. 3
      pubspec.yaml

BIN
assets/image/2x/channel_jt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/channel_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
assets/image/2x/channel_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
assets/image/3x/channel_jt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
assets/image/3x/channel_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/image/3x/channel_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/image/channel_jt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

BIN
assets/image/channel_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
assets/image/channel_text.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

4
lib/generated/intl/messages_en.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
"qudanhao" : m26, "qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"),
"queding" : MessageLookupByLibrary.simpleMessage("确定"), "queding" : MessageLookupByLibrary.simpleMessage("确定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("数量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"),
"sui" : m31, "sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),

4
lib/generated/intl/messages_en_US.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("Please fill in the recipient\'s name"), "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("Please fill in the recipient\'s name"),
"qingtong" : MessageLookupByLibrary.simpleMessage("bronze"), "qingtong" : MessageLookupByLibrary.simpleMessage("bronze"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("Bronze Member"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("Bronze Member"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("please select specs"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("Please select a store to use"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("Please select a store to use"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please select the shipping address"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please select the shipping address"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("Please select a store"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("Please select a store"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("Equity Details"), "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("Equity Details"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("Picking number"), "qucanhao" : MessageLookupByLibrary.simpleMessage("Picking number"),
"qudanhao" : m26, "qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("channel source"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("Log in"), "qudenglu" : MessageLookupByLibrary.simpleMessage("Log in"),
"queding" : MessageLookupByLibrary.simpleMessage("OK"), "queding" : MessageLookupByLibrary.simpleMessage("OK"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("Are you sure you want to delete this dynamic?"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("Are you sure you want to delete this dynamic?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("Refresh failed"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("Refresh failed"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("Refresh Balance"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("Refresh Balance"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("Refreshing...."), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("Refreshing...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("number"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("Please enter the consignee address"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("Please enter the consignee address"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("Enter payment password"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("Enter payment password"),
"sui" : m31, "sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("Modification succeeded"), "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("Modification succeeded"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("Modify User Name"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("Modify User Name"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"), "xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("select success"),
"xuanji" : MessageLookupByLibrary.simpleMessage("Selection"), "xuanji" : MessageLookupByLibrary.simpleMessage("Selection"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("select recommended store"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("select recommended store"),

4
lib/generated/intl/messages_zh_CN.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
"qudanhao" : m26, "qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"),
"queding" : MessageLookupByLibrary.simpleMessage("确定"), "queding" : MessageLookupByLibrary.simpleMessage("确定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("数量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"),
"sui" : m31, "sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),

4
lib/generated/intl/messages_zh_Hans_CN.dart

@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"),
@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"),
"qudanhao" : m26, "qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"),
"queding" : MessageLookupByLibrary.simpleMessage("确定"), "queding" : MessageLookupByLibrary.simpleMessage("确定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"),
@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("数量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"),
"sui" : m31, "sui" : m31,
@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),

4
lib/generated/intl/messages_zh_Hant_CN.dart

@ -478,6 +478,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"),
@ -505,6 +506,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"), "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"),
"qudanhao" : m26, "qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"),
"queding" : MessageLookupByLibrary.simpleMessage("確定"), "queding" : MessageLookupByLibrary.simpleMessage("確定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"),
@ -584,6 +586,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("數量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"),
"sui" : m31, "sui" : m31,
@ -683,6 +686,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"), "xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"),

4
lib/generated/intl/messages_zh_TW.dart

@ -480,6 +480,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"),
"qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"),
"qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"),
"qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"),
"qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"),
"qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"),
"qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"),
@ -507,6 +508,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"), "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"),
"qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"),
"qudanhao" : m26, "qudanhao" : m26,
"qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"),
"qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"),
"queding" : MessageLookupByLibrary.simpleMessage("確定"), "queding" : MessageLookupByLibrary.simpleMessage("確定"),
"quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"),
@ -587,6 +589,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"),
"shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"),
"shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."),
"shuliang" : MessageLookupByLibrary.simpleMessage("數量"),
"shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"),
"shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"),
"sui" : m31, "sui" : m31,
@ -686,6 +689,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"), "xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"),

40
lib/generated/l10n.dart

@ -7045,6 +7045,46 @@ class S {
); );
} }
/// ``
String get qingxianxuanguige {
return Intl.message(
'请先选规格',
name: 'qingxianxuanguige',
desc: '',
args: [],
);
}
/// ``
String get xuanhaola {
return Intl.message(
'选好啦',
name: 'xuanhaola',
desc: '',
args: [],
);
}
/// ``
String get qudaolaiyuan {
return Intl.message(
'渠道来源',
name: 'qudaolaiyuan',
desc: '',
args: [],
);
}
/// ``
String get shuliang {
return Intl.message(
'数量',
name: 'shuliang',
desc: '',
args: [],
);
}
/// `使` /// `使`
String get privacy_policy4 { String get privacy_policy4 {
return Intl.message( return Intl.message(

54
lib/home/home_page.dart

@ -35,7 +35,6 @@ import 'package:huixiang/view_widget/activity_coupons.dart';
import 'package:huixiang/view_widget/activity_poster.dart'; import 'package:huixiang/view_widget/activity_poster.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/invite_success_dialog.dart'; import 'package:huixiang/view_widget/invite_success_dialog.dart';
import 'package:huixiang/view_widget/new_people_reward.dart';
import 'package:huixiang/view_widget/request_permission.dart'; import 'package:huixiang/view_widget/request_permission.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -44,6 +43,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../retrofit/data/user_info.dart'; import '../retrofit/data/user_info.dart';
import '../utils/flutter_utils.dart'; import '../utils/flutter_utils.dart';
import '../view_widget/channel_dialog.dart';
import 'home_view/happy_help_farmers.dart'; import 'home_view/happy_help_farmers.dart';
import 'home_view/shortcut_operation.dart'; import 'home_view/shortcut_operation.dart';
@ -116,6 +116,17 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}); });
} }
///
channelShowAlertDialog() {
//
showDialog(
context: context,
builder: (BuildContext context) {
return ChannelDialog();
},
);
}
final SwiperController controller = SwiperController(); final SwiperController controller = SwiperController();
String categoryId; String categoryId;
@ -280,6 +291,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
// } // }
} }
///
queryUserBalance() async { queryUserBalance() async {
BaseData<UserInfo> baseData = BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {}); await apiService.queryInfo().catchError((onError) {});
@ -291,26 +303,26 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
} }
/// ///
queryMsgStats() async { // queryMsgStats() async {
if (apiService == null) { // if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance(); // SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService( // apiService = ApiService(
Dio(), // Dio(),
context: context, // context: context,
token: value.getString("token"), // token: value.getString("token"),
); // );
} // }
BaseData<List<MsgStats>> baseData = await apiService.stats().catchError((onError) {}); // BaseData<List<MsgStats>> baseData = await apiService.stats().catchError((onError) {});
if (baseData != null && baseData.isSuccess) { // if (baseData != null && baseData.isSuccess) {
// setState(() { // // setState(() {
totalMsg = 0; // totalMsg = 0;
baseData.data.forEach((element) { // baseData.data.forEach((element) {
totalMsg += element.number; // totalMsg += element.number;
// }); // // });
}); // });
} // }
EasyLoading.dismiss(); // EasyLoading.dismiss();
} // }
/// ///
queryActivity() async { queryActivity() async {

17
lib/home/start_page.dart

@ -1,15 +1,10 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class StartPage extends StatefulWidget { class StartPage extends StatefulWidget {
final bool isFirst; // final bool isFirst;
//
StartPage(this.isFirst); // StartPage(this.isFirst);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _StartPage(); return _StartPage();
@ -36,8 +31,10 @@ class _StartPage extends State<StartPage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
Future.delayed(Duration(seconds:3), () { Future.delayed(Duration(seconds:2), () {
Navigator.of(context).popAndPushNamed((widget.isFirst ?? true) ? '/router/guide_Page' : '/router/new_login_page'); // Navigator.of(context).popAndPushNamed((widget.isFirst ?? true) ?
// '/router/guide_Page' : '/router/new_login_page');
Navigator.of(context).popAndPushNamed('/router/main_page');
}); });
} }
} }

4
lib/l10n/intl_en.arb

@ -732,6 +732,10 @@
"dianneiyongcan":"店内用餐", "dianneiyongcan":"店内用餐",
"waidai":"外带", "waidai":"外带",
"dabaodaodianqu":"打包到店取", "dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"请先选规格",
"xuanhaola":"选好啦",
"qudaolaiyuan":"渠道来源",
"shuliang":"数量",

4
lib/l10n/intl_en_US.arb

@ -733,6 +733,10 @@
"dianneiyongcan":"store dining", "dianneiyongcan":"store dining",
"waidai":"take away", "waidai":"take away",
"dabaodaodianqu":"pack to shop take away", "dabaodaodianqu":"pack to shop take away",
"qingxianxuanguige":"please select specs",
"xuanhaola":"select success",
"qudaolaiyuan":"channel source",
"shuliang":"number",

4
lib/l10n/intl_zh_CN.arb

@ -733,6 +733,10 @@
"dianneiyongcan":"店内用餐", "dianneiyongcan":"店内用餐",
"waidai":"外带", "waidai":"外带",
"dabaodaodianqu":"打包到店取", "dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"请先选规格",
"xuanhaola":"选好啦",
"qudaolaiyuan":"渠道来源",
"shuliang":"数量",

4
lib/l10n/intl_zh_Hans_CN.arb

@ -733,6 +733,10 @@
"dianneiyongcan":"店内用餐", "dianneiyongcan":"店内用餐",
"waidai":"外带", "waidai":"外带",
"dabaodaodianqu":"打包到店取", "dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"请先选规格",
"xuanhaola":"选好啦",
"qudaolaiyuan":"渠道来源",
"shuliang":"数量",

4
lib/l10n/intl_zh_Hant_CN.arb

@ -724,6 +724,10 @@
"dianneiyongcan":"店内用餐", "dianneiyongcan":"店内用餐",
"waidai":"外帶", "waidai":"外帶",
"dabaodaodianqu":"打包到店取", "dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"請先選規格",
"xuanhaola":"選好啦",
"qudaolaiyuan":"渠道來源",
"shuliang":"數量",

4
lib/l10n/intl_zh_TW.arb

@ -726,6 +726,10 @@
"dianneiyongcan":"店内用餐", "dianneiyongcan":"店内用餐",
"waidai":"外帶", "waidai":"外帶",
"dabaodaodianqu":"打包到店取", "dabaodaodianqu":"打包到店取",
"qingxianxuanguige":"請先選規格",
"xuanhaola":"選好啦",
"qudaolaiyuan":"渠道來源",
"shuliang":"數量",

3
lib/login/login_store_select.dart

@ -20,7 +20,6 @@ class LoginStoreSelect extends StatefulWidget {
} }
class _LoginStoreSelect extends State<LoginStoreSelect> { class _LoginStoreSelect extends State<LoginStoreSelect> {
ApiService apiService;
ChannelsList channelsList; ChannelsList channelsList;
int channelIndex = 0; int channelIndex = 0;
@ -35,7 +34,7 @@ class _LoginStoreSelect extends State<LoginStoreSelect> {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: MyAppBar( appBar: MyAppBar(
title: "渠道来源", title: S.of(context).qudaolaiyuan,
titleColor: Colors.black, titleColor: Colors.black,
titleSize: 18.sp, titleSize: 18.sp,
background: Color(0xFFFFFFFF), background: Color(0xFFFFFFFF),

2
lib/main.dart

@ -93,6 +93,7 @@ import 'community/report/report_success.dart';
import 'home/guide_page.dart'; import 'home/guide_page.dart';
import 'home/help_farmers/help_farmers_page.dart'; import 'home/help_farmers/help_farmers_page.dart';
import 'home/home_view/activity_list.dart'; import 'home/home_view/activity_list.dart';
import 'home/start_page.dart';
import 'home/welfare_exchange.dart'; import 'home/welfare_exchange.dart';
import 'home/welfare_page.dart'; import 'home/welfare_page.dart';
import 'login/login_store_select.dart'; import 'login/login_store_select.dart';
@ -352,6 +353,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/about_page': (context, {arguments}) => AboutPage(), '/router/about_page': (context, {arguments}) => AboutPage(),
'/router/qr_share': (context, {arguments}) => QrSharePage(), '/router/qr_share': (context, {arguments}) => QrSharePage(),
'/router/main_page': (context, {arguments}) => MainPage(arguments: arguments), '/router/main_page': (context, {arguments}) => MainPage(arguments: arguments),
'/router/start_page': (context, {arguments}) => StartPage(),
'/router/test_page': (context, {arguments}) => TestPage(), '/router/test_page': (context, {arguments}) => TestPage(),
'/router/communityFollow': (context, {arguments}) => CommunityFollow(arguments:arguments), '/router/communityFollow': (context, {arguments}) => CommunityFollow(arguments:arguments),
'/router/releasePage': (context, {arguments}) => ReleasePage(), '/router/releasePage': (context, {arguments}) => ReleasePage(),

2
lib/main_page.dart

@ -74,7 +74,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
case AppLifecycleState.resumed: // case AppLifecycleState.resumed: //
pushRoute(); pushRoute();
if(DateTime.now().millisecondsSinceEpoch - lastTime > 420000) if(DateTime.now().millisecondsSinceEpoch - lastTime > 420000)
Navigator.of(context).popAndPushNamed('/router/main_page'); Navigator.of(context).popAndPushNamed('/router/start_page');
break; break;
case AppLifecycleState.paused: // case AppLifecycleState.paused: //
lastTime = DateTime.now().millisecondsSinceEpoch; lastTime = DateTime.now().millisecondsSinceEpoch;

2
lib/mine/mine_page.dart

@ -9,7 +9,6 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.dart'; import 'package:huixiang/mine/mine_view/mine_calendar.dart';
import 'package:huixiang/mine/mine_view/mine_navbar.dart'; import 'package:huixiang/mine/mine_view/mine_navbar.dart';
import 'package:huixiang/mine/mine_view/mine_order.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart'; import 'package:huixiang/retrofit/data/examine_instance.dart';
import 'package:huixiang/retrofit/data/msg_stats.dart'; import 'package:huixiang/retrofit/data/msg_stats.dart';
@ -21,7 +20,6 @@ import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:huixiang/view_widget/mine_vip_entry.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';

743
lib/settlement/settlement.dart

@ -180,7 +180,11 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(isVips == false || !placeOrder ) ? ((vipLevelName == "黄金会员" && placeOrder) ? "MEMBER_RANK" :"NONE"):"VIP", (isVips == false || !placeOrder)
? ((vipLevelName == "黄金会员" && placeOrder)
? "MEMBER_RANK"
: "NONE")
: "AUTO",
// useVipPriceSelect, // useVipPriceSelect,
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, // (useVipPriceSelect == true && isVips) ? false:useBenefitSelect,
count1, count1,
@ -213,72 +217,79 @@ class _Settlement extends State<Settlement> {
try { try {
EasyLoading.show(status: S.current.zhengzaijiazai); EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId, "addressId": addressId,
"isTake": isTake, "isTake": isTake,
"memberCouponId": memberCouponId, "memberCouponId": memberCouponId,
"orderId": orderId, "orderId": orderId,
"promotionId": promotionId, "promotionId": promotionId,
"productSkuId": productSkuId, "productSkuId": productSkuId,
"actProductId": actProductId, "actProductId": actProductId,
"actProductSkuId": actProductSkuId, "actProductSkuId": actProductSkuId,
"discountType":discountType, "discountType": discountType,
// "useVipPrice":useVipPriceSelect, // "useVipPrice":useVipPriceSelect,
// "useBenefit": useBenefitSelect, // "useBenefit": useBenefitSelect,
"buyNum": buyNum, "buyNum": buyNum,
"payChannel":payChannel, "payChannel": payChannel,
"tableId": tableId "tableId": tableId
}).catchError((error) {}); }).catchError((error) {});
this.promotion = null; this.promotion = null;
promotions = ""; promotions = "";
this.couponListBean = null; this.couponListBean = null;
coupons = ""; coupons = "";
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
settleOrderInfo = baseData.data; settleOrderInfo = baseData.data;
if ((settleOrderInfo?.promotionId ?? "") != "") { if ((settleOrderInfo?.promotionId ?? "") != "") {
settleOrderInfo.promotionInfoList.forEach((element) { settleOrderInfo.promotionInfoList.forEach((element) {
if (element.id == settleOrderInfo.promotionId) { if (element.id == settleOrderInfo.promotionId) {
this.promotion = element; this.promotion = element;
promotions = promotion?.name ?? ""; promotions = promotion?.name ?? "";
} }
}); });
} }
if ((settleOrderInfo?.memberCouponId ?? "") != "") { if ((settleOrderInfo?.memberCouponId ?? "") != "") {
settleOrderInfo.couponList.forEach((element) { settleOrderInfo.couponList.forEach((element) {
if (element.id == settleOrderInfo.memberCouponId) { if (element.id == settleOrderInfo.memberCouponId) {
this.couponListBean = element; this.couponListBean = element;
coupons = couponListBean?.promotionName ?? ""; coupons = couponListBean?.promotionName ?? "";
} }
}); });
} }
if (settleOrderInfo.orderProductList == null || if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) { settleOrderInfo.orderProductList.length == 0) {
placeOrder = true; placeOrder = true;
queryOrderDetails( queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId); pageType != null ? widget.arguments["orderId"] : parentId);
} }
if(!isRaiseChannel && (tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false))){ if (!isRaiseChannel &&
isRaiseChannel = true; (tableId > 0
queryOrderInfo( ? (minOrderInfo?.isRaise ?? false)
address?.id, : (settleOrderInfo?.isRaise ?? false))) {
selectedBtn, isRaiseChannel = true;
couponListBean?.id, queryOrderInfo(
0, address?.id,
promotion?.id ?? productId, selectedBtn,
productSkuId ?? "", couponListBean?.id,
actProductId ?? "", 0,
actProductSkuId ?? "", promotion?.id ?? productId,
"NONE", productSkuId ?? "",
// useVipPriceSelect, actProductId ?? "",
// useBenefitSelect, actProductSkuId ?? "",
count1, "NONE",
(tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7 :payChannel, // useVipPriceSelect,
tableId); // useBenefitSelect,
count1,
(tableId > 0
? (minOrderInfo?.isRaise ?? false)
: (settleOrderInfo?.isRaise ?? false))
? 7
: payChannel,
tableId);
}
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
} }
} else { } finally {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
}finally{
setState(() {}); setState(() {});
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
@ -343,29 +354,29 @@ class _Settlement extends State<Settlement> {
} }
queryAddress(int selectedBtn) async { queryAddress(int selectedBtn) async {
setState(() { setState(() {
this.selectedBtn = selectedBtn; this.selectedBtn = selectedBtn;
}); });
if (address != null) { if (address != null) {
queryOrderInfo( queryOrderInfo(
address.id, address.id,
selectedBtn, selectedBtn,
null, null,
0, 0,
productId ?? null, productId ?? null,
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
"AUTO", "AUTO",
// useVipPriceSelect, // useVipPriceSelect,
// useBenefitSelect, // useBenefitSelect,
count1, count1,
payChannel, payChannel,
tableId); tableId);
return; return;
} }
BaseData<List<Address>> baseDate = BaseData<List<Address>> baseDate =
await minService.queryAddress().catchError((error) {}); await minService.queryAddress().catchError((error) {});
BMFCoordinate bmfCoordinate = BMFCoordinate( BMFCoordinate bmfCoordinate = BMFCoordinate(
double.tryParse(storeInfo.latitude), double.tryParse(storeInfo.latitude),
@ -393,30 +404,30 @@ class _Settlement extends State<Settlement> {
fromType: BMF_COORD_TYPE.COMMON, fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL); toType: BMF_COORD_TYPE.BD09LL);
double mi = await BMFCalculateUtils.getLocationDistance( double mi = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate); bmfCoordinate, coordinate);
double mi1 = await BMFCalculateUtils.getLocationDistance( double mi1 = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate1); bmfCoordinate, coordinate1);
if (mi1 < mi) { if (mi1 < mi) {
address = address1; address = address1;
}
} }
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId);
} }
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId);
}
} }
/// ///
@ -530,7 +541,13 @@ class _Settlement extends State<Settlement> {
((subscribeParam?.isEnableSubscribe ?? false) == true) ((subscribeParam?.isEnableSubscribe ?? false) == true)
? true ? true
: false; // : false; //
placeOrderFirst.isTakeOut = ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn!=1&&selectedBtn!=2) ? diningStatus : selectedBtn; placeOrderFirst.isTakeOut =
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true &&
(subscribeParam?.isEnableSubscribe ?? false) == false &&
selectedBtn != 1 &&
selectedBtn != 2)
? diningStatus
: selectedBtn;
placeOrderFirst.notes = remakers + placeOrderFirst.notes = remakers +
(reservationTime ?? "") + (reservationTime ?? "") +
((subscribeParam?.isEnableSubscribe ?? false) == true ((subscribeParam?.isEnableSubscribe ?? false) == true
@ -542,7 +559,13 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderTypeId = 0; placeOrderFirst.orderTypeId = 0;
placeOrderFirst.parentCode = parentCode; // placeOrderFirst.parentCode = parentCode; //
placeOrderFirst.parentId = parentId; // placeOrderFirst.parentId = parentId; //
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : ((tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7:payChannel)); placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00")
? payChannel = 0
: ((tableId > 0
? (minOrderInfo?.isRaise ?? false)
: (settleOrderInfo?.isRaise ?? false))
? 7
: payChannel));
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId = placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0) ? promotion.id : ""; (promotion != null && tableId <= 0) ? promotion.id : "";
@ -552,7 +575,8 @@ class _Settlement extends State<Settlement> {
// : widget.arguments["cid"] ?? ""; // : widget.arguments["cid"] ?? "";
// placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect; // placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect;
// placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect; // placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect;
placeOrderFirst.promotionInfoDTO.discountType = settleOrderInfo?.discountType ?? ""; placeOrderFirst.promotionInfoDTO.discountType =
settleOrderInfo?.discountType ?? "";
placeOrderFirst.recMobile = placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; (mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -561,7 +585,9 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.storeId = storeInfo.id; placeOrderFirst.storeId = storeInfo.id;
placeOrderFirst.subcribeTime = subTime ?? ""; // placeOrderFirst.subcribeTime = subTime ?? ""; //
placeOrderFirst.tableId = "$tableId"; placeOrderFirst.tableId = "$tableId";
for (int i = 0; i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); i++) { for (int i = 0;
i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0);
i++) {
placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList = placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList =
shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; shopCarGoods.shoppingCartSkuItemList[i].setMealDataList;
} }
@ -803,40 +829,49 @@ class _Settlement extends State<Settlement> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
DistributionMode((addressId, isTake, DistributionMode(
memberCouponId, orderId, promotionId) { (addressId, isTake, memberCouponId, orderId,
setState(() { promotionId) {
this.selectedBtn = 0; setState(() {
}); this.selectedBtn = 0;
queryOrderInfo( });
addressId, queryOrderInfo(
isTake, addressId,
memberCouponId, isTake,
orderId, memberCouponId,
promotionId ?? (productId ?? 0), orderId,
productSkuId ?? "", promotionId ?? (productId ?? 0),
actProductId ?? "", productSkuId ?? "",
actProductSkuId ?? "", actProductId ?? "",
"AUTO", actProductSkuId ?? "",
// useVipPriceSelect, "AUTO",
// useBenefitSelect, // useVipPriceSelect,
count1, // useBenefitSelect,
payChannel, count1,
tableId ?? 0); payChannel,
}, tableId ?? 0);
queryAddress, },
storeInfo, queryAddress,
address, storeInfo,
selectedAddress, address,
pageType, selectedAddress,
widget.arguments["distance"],), pageType,
widget.arguments["distance"],
),
SizedBox( SizedBox(
height: 16.h, height: 16.h,
), ),
if((storeInfo?.pickupType?.dineInTakeStatus?? false) ==true && (subscribeParam?.isEnableSubscribe ?? false) == false if ((storeInfo?.pickupType?.dineInTakeStatus ??
&& selectedBtn != 1 && selectedBtn != 2&& settleOrderInfo !=null) false) ==
true &&
(subscribeParam?.isEnableSubscribe ??
false) ==
false &&
selectedBtn != 1 &&
selectedBtn != 2 &&
settleOrderInfo != null)
takeStatus(), takeStatus(),
/// ///
@ -857,7 +892,9 @@ class _Settlement extends State<Settlement> {
(coupons != "" || promotions != "") (coupons != "" || promotions != "")
? false ? false
: useVipPriceSelect, : useVipPriceSelect,
this.showVipTips,useBenefitSelect,placeOrder), this.showVipTips,
useBenefitSelect,
placeOrder),
///// /////
if (settleOrderInfo != null || if (settleOrderInfo != null ||
@ -872,20 +909,20 @@ class _Settlement extends State<Settlement> {
couponCount(), couponCount(),
placeOrder, placeOrder,
remakers, remakers,
() { () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/edit_remarks_page', '/router/edit_remarks_page',
arguments: { arguments: {
"remake": remakers "remake": remakers
}).then((value) => { }).then((value) => {
setState(() { setState(() {
if (value != null) remakers = value; if (value != null) remakers = value;
}) })
}); });
}, },
tableId, tableId,
vipPriceSelect, vipPriceSelect,
() { () {
setState(() { setState(() {
this.showVipTips = true; this.showVipTips = true;
}); });
@ -900,9 +937,20 @@ class _Settlement extends State<Settlement> {
subscribeStoresName, subscribeStoresName,
), ),
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug) if (settleOrderInfo != null &&
/// placeOrder &&
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect,tableId,minOrderInfo), joinA != JoinActivity.BargainBug)
///
PayMethod(
payChannelCheck,
coupons,
promotions,
useVipPriceSelect,
settleOrderInfo,
useBenefitSelect,
tableId,
minOrderInfo),
], ],
), ),
), ),
@ -970,10 +1018,14 @@ class _Settlement extends State<Settlement> {
// return; // return;
// } else // } else
// orderButton = true; // orderButton = true;
if (subscribeParam != null && ((subscribeParam.isEnableSubscribe ?? false) == if (subscribeParam != null &&
true) && ((subscribeParam.isEnableSubscribe ?? false) ==
(reservationTime == null || true) &&
((subscribeParam.stores.length ==1 ? subscribeParam.stores[0] : subscribeStoresName) == null))) { (reservationTime == null ||
((subscribeParam.stores.length == 1
? subscribeParam.stores[0]
: subscribeStoresName) ==
null))) {
SmartDialog.showToast( SmartDialog.showToast(
(reservationTime == null) (reservationTime == null)
? S.of(context).qingxuanzeyuyeushijian ? S.of(context).qingxuanzeyuyeushijian
@ -1006,161 +1058,190 @@ class _Settlement extends State<Settlement> {
} }
//// ////
Widget takeStatus(){ Widget takeStatus() {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0x0D000000), color: Color(0x0D000000),
offset: Offset(0, 1), offset: Offset(0, 1),
blurRadius: 8, blurRadius: 8,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
margin: EdgeInsets.only(left: 16.w, right: 16.w,top:6.h,bottom:6.h), margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 6.h, bottom: 6.h),
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical:10.h), padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h),
child: child: Row(
Row(children: [ children: [
Expanded(child:GestureDetector( Expanded(
onTap: (){ child: GestureDetector(
setState((){ onTap: () {
diningStatus = 4; setState(() {
}); diningStatus = 4;
}, });
child: Container( },
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.all(Radius.circular(6)), decoration: BoxDecoration(
border: Border.all( borderRadius: BorderRadius.all(Radius.circular(6)),
width: diningStatus == 4? 2.w:1.w, border: Border.all(
color: diningStatus == 4? Color(0xFF32A060):Color(0xFFDEDEDE), width: diningStatus == 4 ? 2.w : 1.w,
style: BorderStyle.solid, color:
), diningStatus == 4 ? Color(0xFF32A060) : Color(0xFFDEDEDE),
color: diningStatus == 4?Color(0xFFEEFFF5):Color(0xFFFFFFFF), style: BorderStyle.solid,
),
padding: EdgeInsets.only(top:11.h,bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_he.webp",
fit: BoxFit.fill,
width: 21.w,
height: 31.h,
), ),
SizedBox(width:10.w,), color:
Column( diningStatus == 4 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF),
crossAxisAlignment: CrossAxisAlignment.start, ),
mainAxisAlignment: MainAxisAlignment.center, padding: EdgeInsets.only(top: 11.h, bottom: 14.h),
children: [ child: Row(
Text( crossAxisAlignment: CrossAxisAlignment.center,
S.of(context).tangshi, mainAxisAlignment: MainAxisAlignment.center,
style: TextStyle( children: [
color: Color(0xFF353535), Image.asset(
fontSize: 14.sp, "assets/image/home_he.webp",
fontWeight: FontWeight.bold, fit: BoxFit.fill,
width: 21.w,
height: 31.h,
),
SizedBox(
width: 10.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
S.of(context).tangshi,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
), ),
), SizedBox(
SizedBox(height: 6.h,), height: 6.h,
Text(
S.of(context).dianneiyongcan,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
), ),
), Text(
], S.of(context).dianneiyongcan,
) style: TextStyle(
], color: Color(0xFF32A060),
), fontSize: 12.sp,
), fontWeight: MyFontWeight.regular,
)), ),
SizedBox(width: 12.w,), ),
Expanded(child: GestureDetector( ],
onTap: (){ )
setState((){ ],
diningStatus = 3;
});
},
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 3? 2.w : 1.w,
color: diningStatus == 3?Color(0xFF32A060):Color(0xFFDEDEDE),
style: BorderStyle.solid,
), ),
color: diningStatus == 3 ?Color(0xFFEEFFF5):Color(0xFFFFFFFF),
), ),
padding: EdgeInsets.only(top:11.h,bottom: 14.h), )),
child: Row( SizedBox(
crossAxisAlignment: CrossAxisAlignment.center, width: 12.w,
mainAxisAlignment: MainAxisAlignment.center, ),
children: [ Expanded(
Image.asset( child: GestureDetector(
"assets/image/dining_w.webp", onTap: () {
fit: BoxFit.fill, setState(() {
width: 24.w, diningStatus = 3;
height: 26.h, });
},
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 3 ? 2.w : 1.w,
color:
diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE),
style: BorderStyle.solid,
), ),
SizedBox(width:9.w,), color:
Column( diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF),
crossAxisAlignment: CrossAxisAlignment.start, ),
mainAxisAlignment: MainAxisAlignment.center, padding: EdgeInsets.only(top: 11.h, bottom: 14.h),
children: [ child: Row(
Text( crossAxisAlignment: CrossAxisAlignment.center,
S.of(context).waidai, mainAxisAlignment: MainAxisAlignment.center,
style: TextStyle( children: [
color: Color(0xFF353535), Image.asset(
fontSize: 14.sp, "assets/image/dining_w.webp",
fontWeight: FontWeight.bold, fit: BoxFit.fill,
width: 24.w,
height: 26.h,
),
SizedBox(
width: 9.w,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
S.of(context).waidai,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
), ),
), SizedBox(
SizedBox(height: 6.h,), height: 6.h,
Text(
S.of(context).dabaodaodianqu,
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
), ),
), Text(
], S.of(context).dabaodaodianqu,
) style: TextStyle(
], color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)
],
),
), ),
), )),
)), ],
],), ),
); );
} }
payChannelCheck(int payChannel) { payChannelCheck(int payChannel) {
this.payChannel = payChannel; this.payChannel = payChannel;
if (tableId > 0) { if (tableId > 0) {
queryOrderDetails(parentId); queryOrderDetails(parentId);
} else { } else {
queryOrderInfo( queryOrderInfo(
address?.id, address?.id,
selectedBtn, selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5) ? "" :couponListBean?.id, (settleOrderInfo.isRaise || payChannel == 5)
0, ? ""
(settleOrderInfo.isRaise || payChannel == 5) ? "" :promotion?.id ?? productId, : couponListBean?.id,
productSkuId ?? "", 0,
actProductId ?? "", (settleOrderInfo.isRaise || payChannel == 5)
actProductSkuId ?? "", ? ""
(settleOrderInfo.isRaise || payChannel == 5) ?"NONE" : ((useVipPriceSelect == false && couponListBean?.id!="" && ((promotion?.id ?? productId )!= "")) ? "MEMBER_RANK" : (isVips == false &&vipLevelName == "黄金会员")?"MEMBER_RANK":"AUTO"), : promotion?.id ?? productId,
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect, productSkuId ?? "",
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect, actProductId ?? "",
count1, actProductSkuId ?? "",
payChannel, (settleOrderInfo.isRaise || payChannel == 5)
tableId);} ? "NONE"
: ((useVipPriceSelect == false &&
couponListBean?.id != "" &&
((promotion?.id ?? productId) != ""))
? "MEMBER_RANK"
: (isVips == false && vipLevelName == "黄金会员")
? "MEMBER_RANK"
: "AUTO"),
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect,
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect,
count1,
payChannel,
tableId);
}
} }
vipPriceSelect(bool useVipPriceSelect) { vipPriceSelect(bool useVipPriceSelect) {
@ -1177,12 +1258,13 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(useVipPriceSelect == true) ? "VIP": "MEMBER_RANK", (useVipPriceSelect == true) ? "VIP" : "MEMBER_RANK",
// useVipPriceSelect, // useVipPriceSelect,
// useVipPriceSelect == true ? false :useBenefitSelect, // useVipPriceSelect == true ? false :useBenefitSelect,
count1, count1,
payChannel, payChannel,
tableId);} tableId);
}
} }
/// ///
@ -1258,7 +1340,11 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(couponBean?.id ?? 0) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"COUPON", (couponBean?.id ?? 0) == 0
? ((isVips == false && vipLevelName == "黄金会员")
? "MEMBER_RANK"
: "AUTO")
: "COUPON",
// useVipPriceSelect, // useVipPriceSelect,
// useBenefitSelect, // useBenefitSelect,
count1, count1,
@ -1293,7 +1379,11 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
((pro?.id ?? 0) ?? productId) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"ACTIVITY", ((pro?.id ?? 0) ?? productId) == 0
? ((isVips == false && vipLevelName == "黄金会员")
? "MEMBER_RANK"
: "AUTO")
: "ACTIVITY",
// useVipPriceSelect, // useVipPriceSelect,
// useBenefitSelect, // useBenefitSelect,
count1, count1,
@ -1324,7 +1414,7 @@ class _Settlement extends State<Settlement> {
date.timeZoneOffset.inHours.toString()); date.timeZoneOffset.inHours.toString());
}, onConfirm: (date) { }, onConfirm: (date) {
reservationTime = date.toString().substring(0, 16); reservationTime = date.toString().substring(0, 16);
subTime = date.add(Duration(hours:8)).toUtc().toIso8601String(); subTime = date.add(Duration(hours: 8)).toUtc().toIso8601String();
setState(() {}); setState(() {});
}, currentTime: minTime, locale: LocaleType.zh); }, currentTime: minTime, locale: LocaleType.zh);
} }
@ -1358,17 +1448,17 @@ class _Settlement extends State<Settlement> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical:5.h), margin: EdgeInsets.symmetric(vertical: 5.h),
child: Text( child: Text(
S.of(context).qingxuanzeyuyuemendian, S.of(context).qingxuanzeyuyuemendian,
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
fontSize: 15.sp, fontSize: 15.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), ),
)), )),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
@ -1399,9 +1489,10 @@ class _Settlement extends State<Settlement> {
}), }),
), ),
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
setState(() { setState(() {
subscribeStoresName = subscribeParam.stores[storesIndex]; subscribeStoresName =
subscribeParam.stores[storesIndex];
}); });
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -1410,10 +1501,12 @@ class _Settlement extends State<Settlement> {
height: 40.h, height: 40.h,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
color:Color(0xFF32A060), color: Color(0xFF32A060),
), ),
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 10.h,), margin: EdgeInsets.only(
bottom: 10.h,
),
child: Text( child: Text(
S.of(context).queding, S.of(context).queding,
style: TextStyle( style: TextStyle(
@ -1436,17 +1529,17 @@ class _Settlement extends State<Settlement> {
Widget storesNameItem(index) { Widget storesNameItem(index) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.symmetric(vertical:8.h), margin: EdgeInsets.symmetric(vertical: 8.h),
padding: EdgeInsets.symmetric(vertical: 10.h), padding: EdgeInsets.symmetric(vertical: 10.h),
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius:BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
border: Border.all( border: Border.all(
color: storesIndex == index ? Color(0xFF32A060):Color(0xFFF7F7F7), color: storesIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7),
width: storesIndex == index ? 1 :0, width: storesIndex == index ? 1 : 0,
),
color: storesIndex == index ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7),
), ),
color: storesIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7),
),
child: Text( child: Text(
subscribeParam.stores[index], subscribeParam.stores[index],
style: TextStyle( style: TextStyle(

4
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -122,7 +122,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
(widget.coupons != null && widget.coupons != "" || (widget.coupons != null && widget.coupons != "" ||
widget.promotions != null && widget.promotions != null &&
widget.promotions != "" || widget.promotions != "" ||
widget.payChannell == 5 || widget.payChannell == 7) widget.payChannell == 5 || widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" ||(widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false ? false
: vipSelect, : vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@ -179,7 +179,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
widget.promotions != null && widget.promotions != null &&
widget.promotions != "" || widget.promotions != "" ||
widget.payChannell == 5 || widget.payChannell == 5 ||
widget.payChannell == 7 || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0)) widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK"|| (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false ? false
: vipSelect) : vipSelect)
? "assets/image/vip_price.webp" ? "assets/image/vip_price.webp"

347
lib/store/shop_details_page.dart

@ -24,8 +24,6 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../utils/flutter_utils.dart';
import '../view_widget/border_text.dart'; import '../view_widget/border_text.dart';
import '../view_widget/request_permission.dart'; import '../view_widget/request_permission.dart';
@ -94,6 +92,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
/// ///
queryStoreInfo() async { queryStoreInfo() async {
EasyLoading.show(status: S.current.zhengzaijiazai);
SharedPreferences value = await SharedPreferences.getInstance(); SharedPreferences value = await SharedPreferences.getInstance();
if (apiService == null) if (apiService == null)
apiService = ApiService( apiService = ApiService(
@ -115,7 +114,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
} }
minLogin(); minLogin();
} }
EasyLoading.dismiss(); // EasyLoading.dismiss();
} }
/// ///
@ -147,7 +146,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
this.shopCarGoods = value; this.shopCarGoods = value;
setState(() {}); setState(() {});
}); });
EasyLoading.dismiss(); // EasyLoading.dismiss();
} }
}); });
} }
@ -165,6 +164,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
selectSkus.add(element.attrValueList[0].attrValue); selectSkus.add(element.attrValueList[0].attrValue);
}); });
}); });
EasyLoading.dismiss();
refreshController.refreshCompleted(); refreshController.refreshCompleted();
} else { } else {
refreshController.refreshFailed(); refreshController.refreshFailed();
@ -603,190 +603,187 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: Container( body: Column(
child: Column( children: [
children: [ Expanded(
Expanded( child: SmartRefresher(
child: SmartRefresher( controller: refreshController,
controller: refreshController, enablePullDown: true,
enablePullDown: true, enablePullUp: false,
enablePullUp: false, header: MyHeader(),
header: MyHeader(), footer: CustomFooter(
footer: CustomFooter( builder: (context, mode) {
builder: (context, mode) { return MyFooter(mode);
return MyFooter(mode);
},
),
onRefresh: () {
setState(() {
_onRefresh();
});
}, },
physics: BouncingScrollPhysics(), ),
scrollController: scrollController, onRefresh: () {
child: Container( setState(() {
child: SingleChildScrollView( _onRefresh();
physics: BouncingScrollPhysics(), });
child: Column( },
mainAxisAlignment: MainAxisAlignment.start, physics: BouncingScrollPhysics(),
crossAxisAlignment: CrossAxisAlignment.start, scrollController: scrollController,
children: [ child: Container(
buildProduct(), child: SingleChildScrollView(
SizedBox( physics: BouncingScrollPhysics(),
height: 16.h, child: Column(
), mainAxisAlignment: MainAxisAlignment.start,
Container( crossAxisAlignment: CrossAxisAlignment.start,
width: double.infinity, children: [
// padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16.h), buildProduct(),
color: Colors.white, SizedBox(
child: Column( height: 16.h,
mainAxisAlignment: MainAxisAlignment.start, ),
crossAxisAlignment: CrossAxisAlignment.start, Container(
children: [ width: double.infinity,
Padding( color: Colors.white,
padding: EdgeInsets.only(left: 14.w, top: 16.h), child: Column(
child: Text( mainAxisAlignment: MainAxisAlignment.start,
"商品详情", crossAxisAlignment: CrossAxisAlignment.start,
style: TextStyle( children: [
fontSize: 15.sp, Padding(
fontWeight: MyFontWeight.semi_bold, padding: EdgeInsets.only(left: 14.w, top: 16.h),
color: Color(0xFF000000), child: Text(
), "商品详情",
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF000000),
), ),
), ),
SizedBox( ),
height: 14.h, SizedBox(
), height: 14.h,
Container( ),
color: Colors.white, Container(
child: Html( color: Colors.white,
data: miNiDetail?.details ?? "", child: Html(
style: { data: miNiDetail?.details ?? "",
'body': Style( style: {
backgroundColor: Colors.white, 'body': Style(
padding: EdgeInsets.all(0), backgroundColor: Colors.white,
margin: EdgeInsets.all(0)),
'p': Style(
margin: EdgeInsets.all(0),
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
), margin: EdgeInsets.all(0)),
}, 'p': Style(
customImageRenders: { margin: EdgeInsets.all(0),
networkSourceMatcher(): networkImageRender( padding: EdgeInsets.all(0),
loadingWidget: () { ),
return Container(); },
}, customImageRenders: {
), networkSourceMatcher(): networkImageRender(
}, loadingWidget: () {
), return Container();
},
),
},
), ),
], ),
), ],
) ),
], )
), ],
), ),
), ),
), ),
flex: 1,
), ),
if (count() != 0) flex: 1,
Stack( ),
alignment: Alignment.bottomLeft, if (count() != 0)
children: [ Stack(
Container( alignment: Alignment.bottomLeft,
margin: EdgeInsets.symmetric(horizontal: 14), children: [
height: 45.h, Container(
// color: Color(0xFFFAFAFA), margin: EdgeInsets.symmetric(horizontal: 14),
decoration: BoxDecoration( height: 45.h,
color: Color(0xFF383A38), // color: Color(0xFFFAFAFA),
borderRadius: BorderRadius.circular(100), decoration: BoxDecoration(
), color: Color(0xFF383A38),
child: Row( borderRadius: BorderRadius.circular(100),
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 45.w,
),
Text.rich(
TextSpan(children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFFFFFFFF),
fontWeight: MyFontWeight.bold),
),
TextSpan(
text: shopCarGoods != null
? shopCarGoods.cartSum
: "0.0",
style: TextStyle(
fontSize: 20.sp,
color: Color(0xFFFFFFFF),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium),
),
]),
),
Spacer(),
GestureDetector(
onTap: () {
toDownOrder();
},
child: RoundButton(
width: 103.w,
height: 54.h,
text: S.current.jiesuan,
textColor: Colors.white,
fontWeight: MyFontWeight.bold,
backgroup: Color(0xFF32A060),
radius: 100,
fontSize: 16.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
),
),
],
),
), ),
Stack( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
InkWell( SizedBox(
width: 45.w,
),
Text.rich(
TextSpan(children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFFFFFFFF),
fontWeight: MyFontWeight.bold),
),
TextSpan(
text: shopCarGoods != null
? shopCarGoods.cartSum
: "0.0",
style: TextStyle(
fontSize: 20.sp,
color: Color(0xFFFFFFFF),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium),
),
]),
),
Spacer(),
GestureDetector(
onTap: () { onTap: () {
if (count() != 0) showShoppingCart(); toDownOrder();
}, },
child: Image.asset( child: RoundButton(
"assets/image/shopping_bag.webp", width: 103.w,
width: 66, height: 54.h,
height: 66, text: S.current.jiesuan,
fit: BoxFit.fitWidth, textColor: Colors.white,
fontWeight: MyFontWeight.bold,
backgroup: Color(0xFF32A060),
radius: 100,
fontSize: 16.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
), ),
), ),
if (count() != 0)
Positioned(
right: 5,
// top: 14,
child: RoundButton(
width: 17.w,
height: 17.h,
text: "${count()}",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFF65720),
fontSize: 12.sp,
radius: 100,
),
),
], ],
), ),
], ),
), Stack(
SizedBox( children: [
height: 30.h, InkWell(
) onTap: () {
], if (count() != 0) showShoppingCart();
), },
child: Image.asset(
"assets/image/shopping_bag.webp",
width: 66,
height: 66,
fit: BoxFit.fitWidth,
),
),
if (count() != 0)
Positioned(
right: 5,
// top: 14,
child: RoundButton(
width: 17.w,
height: 17.h,
text: "${count()}",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFF65720),
fontSize: 12.sp,
radius: 100,
),
),
],
),
],
),
SizedBox(
height: 30.h,
)
],
), ),
); );
} }
@ -830,7 +827,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
), ),
), ),
SizedBox( SizedBox(
width: 2, width: 2.w,
), ),
Expanded( Expanded(
child: Text( child: Text(
@ -1090,7 +1087,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text( Text(
"数量", S.of(context).shuliang,
style: TextStyle( style: TextStyle(
color: Color(0xFFB3B3B3), color: Color(0xFFB3B3B3),
fontSize: 12.sp, fontSize: 12.sp,
@ -1275,7 +1272,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
Expanded( Expanded(
child: InkWell( child: InkWell(
child: BorderText( child: BorderText(
text: "取消", text: S.of(context).quxiao,
textColor: Color(0xFF32A060), textColor: Color(0xFF32A060),
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -1296,7 +1293,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
Expanded( Expanded(
child: InkWell( child: InkWell(
child: RoundButton( child: RoundButton(
text: "确定", text: S.of(context).queding,
textColor: Colors.white, textColor: Colors.white,
radius: 4, radius: 4,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),

7
lib/store/store_order.dart

@ -19,25 +19,19 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/store_view/people_num.dart'; import 'package:huixiang/store/store_view/people_num.dart';
import 'package:huixiang/store/store_view/product_sku.dart'; import 'package:huixiang/store/store_view/product_sku.dart';
import 'package:huixiang/store/store_view/shop_car.dart'; import 'package:huixiang/store/store_view/shop_car.dart';
import 'package:huixiang/store/store_view/store_activity.dart';
import 'package:huixiang/store/store_view/store_info.dart'; import 'package:huixiang/store/store_view/store_info.dart';
import 'package:huixiang/store/store_view/store_order_list.dart'; import 'package:huixiang/store/store_view/store_order_list.dart';
import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.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/custom_image.dart';
import 'package:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/receive_success.dart'; import 'package:huixiang/view_widget/receive_success.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../retrofit/data/settleOrderInfo.dart'; import '../retrofit/data/settleOrderInfo.dart';
import '../settlement/settlement.dart';
import '../view_widget/border_text.dart';
import '../view_widget/request_permission.dart';
class StoreOrderPage extends StatefulWidget { class StoreOrderPage extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;
@ -432,7 +426,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
]; ];
}, },
body: body:
/// ///
TabBarView( TabBarView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),

6
lib/store/store_view/product_meals_sku.dart

@ -356,7 +356,7 @@ class _ProductMealsSku extends State<ProductMealsSku> {
"") "")
GestureDetector( GestureDetector(
child: Text( child: Text(
"选规格", S.of(context).xuanguige,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 13.sp, fontSize: 13.sp,
@ -638,7 +638,7 @@ class _ProductMealsSku extends State<ProductMealsSku> {
.productAttrInfoList .productAttrInfoList
.where((element) => element.selectSku == null) .where((element) => element.selectSku == null)
.isNotEmpty) { .isNotEmpty) {
SmartDialog.showToast("请先选择规格", SmartDialog.showToast(S.of(context).qingxianxuanguige,
alignment: Alignment.center); alignment: Alignment.center);
return; return;
} }
@ -679,7 +679,7 @@ class _ProductMealsSku extends State<ProductMealsSku> {
), ),
padding: EdgeInsets.symmetric(vertical: 6), padding: EdgeInsets.symmetric(vertical: 6),
child: Text( child: Text(
"选好啦", S.of(context).xuanhaola,
style: TextStyle( style: TextStyle(
fontSize: 15.sp, fontSize: 15.sp,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,

7
lib/store/store_view/product_sku.dart

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart';
@ -57,7 +56,7 @@ class _ProductSku extends State<ProductSku> {
return; return;
} }
if (productSku == null) return; if (productSku == null) return;
selectedPrice = productSku.skuPrice; selectedPrice = productSku.vipPrice;
String skuId = productSku.id; String skuId = productSku.id;
if (widget.shopCarGoods == null || if (widget.shopCarGoods == null ||
widget.shopCarGoods.shoppingCartSkuItemList == null) return; widget.shopCarGoods.shoppingCartSkuItemList == null) return;
@ -228,7 +227,7 @@ class _ProductSku extends State<ProductSku> {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
"数量", S.of(context).shuliang,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 14.sp, fontSize: 14.sp,
@ -313,7 +312,7 @@ class _ProductSku extends State<ProductSku> {
RoundButton( RoundButton(
width: double.infinity, width: double.infinity,
height: 54.h, height: 54.h,
text: "确认", text: S.of(context).queren,
textColor: Colors.white, textColor: Colors.white,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
radius: 27, radius: 27,

12
lib/store/store_view/shop_goods.dart

@ -250,7 +250,7 @@ class _ShopGoods extends State<ShopGoods> {
} }
}, },
child: Container( child: Container(
padding: EdgeInsets.only(right: 16.w), // padding: EdgeInsets.only(right: 16.w),
child: Stack( child: Stack(
children: [ children: [
Container( Container(
@ -259,7 +259,7 @@ class _ShopGoods extends State<ShopGoods> {
top: 4.h, top: 4.h,
bottom: 4.h, bottom: 4.h,
), ),
margin: EdgeInsets.only(right: 8, top: 4), margin: EdgeInsets.only(right:8.w,top: 4.h),
child: RoundButton( child: RoundButton(
text: S.of(context).xuanguige, text: S.of(context).xuanguige,
textColor: Colors.white, textColor: Colors.white,
@ -364,7 +364,7 @@ class _ShopGoods extends State<ShopGoods> {
} }
}, },
child: Container( child: Container(
padding: EdgeInsets.only(left: 6.w, right: 16.w), padding: EdgeInsets.only(left: 6.w, right:9.w),
child: Image.asset( child: Image.asset(
"assets/image/add.webp", "assets/image/add.webp",
width: 22, width: 22,
@ -401,7 +401,7 @@ class _ShopGoods extends State<ShopGoods> {
top: 4.h, top: 4.h,
bottom: 4.h, bottom: 4.h,
), ),
margin: EdgeInsets.only(right: 8, top: 4), margin: EdgeInsets.only(right:8.w,top: 4),
child: RoundButton( child: RoundButton(
text: S.of(context).lijiyuyue, text: S.of(context).lijiyuyue,
textColor: Colors.white, textColor: Colors.white,
@ -494,7 +494,7 @@ class _ShopGoods extends State<ShopGoods> {
Expanded( Expanded(
child: InkWell( child: InkWell(
child: BorderText( child: BorderText(
text: "取消", text: S.of(context).quxiao,
textColor: Color(0xFF32A060), textColor: Color(0xFF32A060),
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -515,7 +515,7 @@ class _ShopGoods extends State<ShopGoods> {
Expanded( Expanded(
child: InkWell( child: InkWell(
child: RoundButton( child: RoundButton(
text: "确定", text: S.of(context).queding,
textColor: Colors.white, textColor: Colors.white,
radius: 4, radius: 4,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),

208
lib/view_widget/channel_dialog.dart

@ -0,0 +1,208 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import '../retrofit/data/base_data.dart';
import '../retrofit/data/channels_list.dart';
import '../retrofit/retrofit_api.dart';
class ChannelDialog extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _ChannelDialog();
}
}
class _ChannelDialog extends State<ChannelDialog> {
ApiService apiService;
ChannelsList channelsList;
int channelIndex = 0;
@override
void initState() {
super.initState();
EasyLoading.show(status: S.current.zhengzaijiazai);
queryChannels();
}
queryChannels() async{
apiService = ApiService(Dio(), context: context);
BaseData<ChannelsList> baseData = await apiService.appChannels().catchError((error) {
print(error.message);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
});
if (baseData != null && baseData.isSuccess) {
channelsList = baseData.data;
setState((){});
EasyLoading.dismiss();
} else {
if (baseData?.msg != null)
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
@override
Widget build(BuildContext context) {
return Material(
type: MaterialType.transparency,
child: Center(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 14.w),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(8.r),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
gradient:LinearGradient(
colors:[
Color(0xFFDFFFED),
Color(0xFFFFFFFF),
],
begin: Alignment.topLeft,
end: Alignment.bottomLeft,
)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
alignment: Alignment.topRight,
children: [
Row(
children: [
SizedBox(width: 11.w,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
"assets/image/channel_text.webp",
width: 138.w,
height:24.h,
fit: BoxFit.fill,
),
Padding(padding: EdgeInsets.only(top: 11.h),child: Text(
"您是通过什么途径注册的呢?",
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF353535),
),
),),
],
),
Spacer(),
Image.asset(
"assets/image/channel_logo.webp",
width: 89.w,
height:93.h,
fit: BoxFit.fill,
),
SizedBox(width: 24.w,)
],
),
Container(
margin: EdgeInsets.only(top: 24.h,right: 113.w),
child:Image.asset(
"assets/image/channel_jt.webp",
width: 62.w,
height:15.h,
fit: BoxFit.fill,
),
),
],
),
ConstrainedBox(
constraints: BoxConstraints(
maxHeight:260.h),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
margin: EdgeInsets.only(left:12.w,right: 12.w,bottom: 19.h),
child:ListView.builder(
padding: EdgeInsets.only(top: 16.h),
itemCount: (channelsList != null && (channelsList?.channels?.length ?? 0) > 0) ? channelsList.channels.length : 0,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
channelIndex = position;
});
},
child: channelItem(position),
);
}),
),
),
if(channelsList != null && (channelsList.channels.length) > 0)
Align(
alignment:Alignment.center,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pop();
},
child: Text(
"我选好了",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF32A060),
),
),
),
),
SizedBox(height: 16.h,)
],
),
)
],
),
),
),
);
}
Widget channelItem(index){
return Container(
padding: EdgeInsets.only(left:14.w,right: 14.w,bottom: 18.h),
child: Row(
children: [
Expanded(child: Text(
channelsList.channels[index],
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
color: channelIndex == index ? Color(0xFF32A060):Color(0xFF353535),
),
)),
Image.asset(
channelIndex == index
? "assets/image/icon_radio_selected.webp"
: "assets/image/icon_radio_unselected.webp",
width: 15.w,
height: 15.h,
),
],
),
);
}
}

3
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 3.2.10+55 version: 3.2.13+57
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -108,6 +108,7 @@ dependencies:
# 时间选择器 # 时间选择器
flutter_datetime_picker: ^1.5.1 flutter_datetime_picker: ^1.5.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter

Loading…
Cancel
Save