diff --git a/assets/image/2x/channel_jt.webp b/assets/image/2x/channel_jt.webp new file mode 100644 index 00000000..599a9254 Binary files /dev/null and b/assets/image/2x/channel_jt.webp differ diff --git a/assets/image/2x/channel_logo.webp b/assets/image/2x/channel_logo.webp new file mode 100644 index 00000000..9fbbf85e Binary files /dev/null and b/assets/image/2x/channel_logo.webp differ diff --git a/assets/image/2x/channel_text.webp b/assets/image/2x/channel_text.webp new file mode 100644 index 00000000..8ac978d5 Binary files /dev/null and b/assets/image/2x/channel_text.webp differ diff --git a/assets/image/3x/channel_jt.webp b/assets/image/3x/channel_jt.webp new file mode 100644 index 00000000..eea58095 Binary files /dev/null and b/assets/image/3x/channel_jt.webp differ diff --git a/assets/image/3x/channel_logo.webp b/assets/image/3x/channel_logo.webp new file mode 100644 index 00000000..bd4ec21a Binary files /dev/null and b/assets/image/3x/channel_logo.webp differ diff --git a/assets/image/3x/channel_text.webp b/assets/image/3x/channel_text.webp new file mode 100644 index 00000000..e2776221 Binary files /dev/null and b/assets/image/3x/channel_text.webp differ diff --git a/assets/image/channel_jt.webp b/assets/image/channel_jt.webp new file mode 100644 index 00000000..eac19bed Binary files /dev/null and b/assets/image/channel_jt.webp differ diff --git a/assets/image/channel_logo.webp b/assets/image/channel_logo.webp new file mode 100644 index 00000000..723c0368 Binary files /dev/null and b/assets/image/channel_logo.webp differ diff --git a/assets/image/channel_text.webp b/assets/image/channel_text.webp new file mode 100644 index 00000000..45c06077 Binary files /dev/null and b/assets/image/channel_text.webp differ diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 0ffb34dd..4c5041a4 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), + "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), @@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), "qudanhao" : m26, + "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), "queding" : MessageLookupByLibrary.simpleMessage("确定"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), @@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang" : MessageLookupByLibrary.simpleMessage("数量"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), "sui" : m31, @@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), + "xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), diff --git a/lib/generated/intl/messages_en_US.dart b/lib/generated/intl/messages_en_US.dart index 67fb5e18..fbe012ad 100644 --- a/lib/generated/intl/messages_en_US.dart +++ b/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"), "qingtong" : MessageLookupByLibrary.simpleMessage("bronze"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("Bronze Member"), + "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("please select specs"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("Please select a store to use"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please select the shipping address"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("Please select a store"), @@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("Equity Details"), "qucanhao" : MessageLookupByLibrary.simpleMessage("Picking number"), "qudanhao" : m26, + "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("channel source"), "qudenglu" : MessageLookupByLibrary.simpleMessage("Log in"), "queding" : MessageLookupByLibrary.simpleMessage("OK"), "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"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("Refresh Balance"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("Refreshing...."), + "shuliang" : MessageLookupByLibrary.simpleMessage("number"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("Please enter the consignee address"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("Enter payment password"), "sui" : m31, @@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("Modification succeeded"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("Modify User Name"), "xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"), + "xuanhaola" : MessageLookupByLibrary.simpleMessage("select success"), "xuanji" : MessageLookupByLibrary.simpleMessage("Selection"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("select recommended store"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 93d3e971..73bdfbd8 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), + "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), @@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), "qudanhao" : m26, + "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), "queding" : MessageLookupByLibrary.simpleMessage("确定"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), @@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang" : MessageLookupByLibrary.simpleMessage("数量"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), "sui" : m31, @@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), + "xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index e9779c5f..796db711 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -483,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), + "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), @@ -510,6 +511,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), "qudanhao" : m26, + "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), "queding" : MessageLookupByLibrary.simpleMessage("确定"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), @@ -590,6 +592,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang" : MessageLookupByLibrary.simpleMessage("数量"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), "sui" : m31, @@ -689,6 +692,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), + "xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index b7a6b659..68b11d59 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -478,6 +478,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"), + "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"), @@ -505,6 +506,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"), "qudanhao" : m26, + "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"), "queding" : MessageLookupByLibrary.simpleMessage("確定"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), @@ -584,6 +586,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang" : MessageLookupByLibrary.simpleMessage("數量"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"), "sui" : m31, @@ -683,6 +686,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"), "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), + "xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"), "xuanji" : MessageLookupByLibrary.simpleMessage("選集"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index c61a4a7b..7456c2e0 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -480,6 +480,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"), + "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"), "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"), "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"), @@ -507,6 +508,7 @@ class MessageLookup extends MessageLookupByLibrary { "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"), "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"), "qudanhao" : m26, + "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"), "qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"), "queding" : MessageLookupByLibrary.simpleMessage("確定"), "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), @@ -587,6 +589,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang" : MessageLookupByLibrary.simpleMessage("數量"), "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"), "sui" : m31, @@ -686,6 +689,7 @@ class MessageLookup extends MessageLookupByLibrary { "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"), "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), + "xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"), "xuanji" : MessageLookupByLibrary.simpleMessage("選集"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index dddd44aa..0567a9c1 100644 --- a/lib/generated/l10n.dart +++ b/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 { return Intl.message( diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 62daf29d..e93687b5 100644 --- a/lib/home/home_page.dart +++ b/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/classic_header.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:permission_handler/permission_handler.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; @@ -117,6 +116,17 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }); } + ///推荐渠道弹窗 + channelShowAlertDialog() { + //显示对话框 + showDialog( + context: context, + builder: (BuildContext context) { + return ChannelDialog(); + }, + ); + } + final SwiperController controller = SwiperController(); String categoryId; @@ -281,6 +291,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { // } } + ///查询会员信息 queryUserBalance() async { BaseData baseData = await apiService.queryInfo().catchError((onError) {}); @@ -292,26 +303,26 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { } ///消息数量 - queryMsgStats() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.stats().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - // setState(() { - totalMsg = 0; - baseData.data.forEach((element) { - totalMsg += element.number; - // }); - }); - } - EasyLoading.dismiss(); - } + // queryMsgStats() async { + // if (apiService == null) { + // SharedPreferences value = await SharedPreferences.getInstance(); + // apiService = ApiService( + // Dio(), + // context: context, + // token: value.getString("token"), + // ); + // } + // BaseData> baseData = await apiService.stats().catchError((onError) {}); + // if (baseData != null && baseData.isSuccess) { + // // setState(() { + // totalMsg = 0; + // baseData.data.forEach((element) { + // totalMsg += element.number; + // // }); + // }); + // } + // EasyLoading.dismiss(); + // } ///活动弹窗 queryActivity() async { diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index d1f4f32c..d491ec54 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -732,6 +732,10 @@ "dianneiyongcan":"店内用餐", "waidai":"外带", "dabaodaodianqu":"打包到店取", + "qingxianxuanguige":"请先选规格", + "xuanhaola":"选好啦", + "qudaolaiyuan":"渠道来源", + "shuliang":"数量", diff --git a/lib/l10n/intl_en_US.arb b/lib/l10n/intl_en_US.arb index fd08a44e..c0c5958e 100644 --- a/lib/l10n/intl_en_US.arb +++ b/lib/l10n/intl_en_US.arb @@ -733,6 +733,10 @@ "dianneiyongcan":"store dining", "waidai":"take away", "dabaodaodianqu":"pack to shop take away", + "qingxianxuanguige":"please select specs", + "xuanhaola":"select success", + "qudaolaiyuan":"channel source", + "shuliang":"number", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 966e8b8e..88016c60 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -733,6 +733,10 @@ "dianneiyongcan":"店内用餐", "waidai":"外带", "dabaodaodianqu":"打包到店取", + "qingxianxuanguige":"请先选规格", + "xuanhaola":"选好啦", + "qudaolaiyuan":"渠道来源", + "shuliang":"数量", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index a20b0174..67abe33f 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -733,6 +733,10 @@ "dianneiyongcan":"店内用餐", "waidai":"外带", "dabaodaodianqu":"打包到店取", + "qingxianxuanguige":"请先选规格", + "xuanhaola":"选好啦", + "qudaolaiyuan":"渠道来源", + "shuliang":"数量", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index d9ee9ec7..722581f7 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -724,6 +724,10 @@ "dianneiyongcan":"店内用餐", "waidai":"外帶", "dabaodaodianqu":"打包到店取", + "qingxianxuanguige":"請先選規格", + "xuanhaola":"選好啦", + "qudaolaiyuan":"渠道來源", + "shuliang":"數量", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 62a6df75..8c6ac070 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -726,6 +726,10 @@ "dianneiyongcan":"店内用餐", "waidai":"外帶", "dabaodaodianqu":"打包到店取", + "qingxianxuanguige":"請先選規格", + "xuanhaola":"選好啦", + "qudaolaiyuan":"渠道來源", + "shuliang":"數量", diff --git a/lib/login/login_store_select.dart b/lib/login/login_store_select.dart index 1844ed9b..00837cc0 100644 --- a/lib/login/login_store_select.dart +++ b/lib/login/login_store_select.dart @@ -20,7 +20,6 @@ class LoginStoreSelect extends StatefulWidget { } class _LoginStoreSelect extends State { - ApiService apiService; ChannelsList channelsList; int channelIndex = 0; @@ -35,7 +34,7 @@ class _LoginStoreSelect extends State { return Scaffold( backgroundColor: Colors.white, appBar: MyAppBar( - title: "渠道来源", + title: S.of(context).qudaolaiyuan, titleColor: Colors.black, titleSize: 18.sp, background: Color(0xFFFFFFFF), diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 11daed54..a3e73b64 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -9,7 +9,6 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.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_order.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/examine_instance.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/view_widget/classic_header.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:shared_preferences/shared_preferences.dart'; import 'package:dio/dio.dart'; diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 19e0813a..4a42c472 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -180,7 +180,11 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (isVips == false || !placeOrder ) ? ((vipLevelName == "黄金会员" && placeOrder) ? "MEMBER_RANK" :"NONE"):"VIP", + (isVips == false || !placeOrder) + ? ((vipLevelName == "黄金会员" && placeOrder) + ? "MEMBER_RANK" + : "NONE") + : "VIP", // useVipPriceSelect, // (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, count1, @@ -213,72 +217,79 @@ class _Settlement extends State { try { EasyLoading.show(status: S.current.zhengzaijiazai); - BaseData baseData = await minService.getOrderInfo({ - "addressId": addressId, - "isTake": isTake, - "memberCouponId": memberCouponId, - "orderId": orderId, - "promotionId": promotionId, - "productSkuId": productSkuId, - "actProductId": actProductId, - "actProductSkuId": actProductSkuId, - "discountType":discountType, - // "useVipPrice":useVipPriceSelect, - // "useBenefit": useBenefitSelect, - "buyNum": buyNum, - "payChannel":payChannel, - "tableId": tableId - }).catchError((error) {}); - this.promotion = null; - promotions = ""; - this.couponListBean = null; - coupons = ""; - if (baseData != null && baseData.isSuccess) { - settleOrderInfo = baseData.data; - if ((settleOrderInfo?.promotionId ?? "") != "") { - settleOrderInfo.promotionInfoList.forEach((element) { - if (element.id == settleOrderInfo.promotionId) { - this.promotion = element; - promotions = promotion?.name ?? ""; - } - }); - } - if ((settleOrderInfo?.memberCouponId ?? "") != "") { - settleOrderInfo.couponList.forEach((element) { - if (element.id == settleOrderInfo.memberCouponId) { - this.couponListBean = element; - coupons = couponListBean?.promotionName ?? ""; - } - }); - } - if (settleOrderInfo.orderProductList == null || - settleOrderInfo.orderProductList.length == 0) { - placeOrder = true; - queryOrderDetails( - pageType != null ? widget.arguments["orderId"] : parentId); - } - if(!isRaiseChannel && (tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false))){ - isRaiseChannel = true; - queryOrderInfo( - address?.id, - selectedBtn, - couponListBean?.id, - 0, - promotion?.id ?? productId, - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - "NONE", - // useVipPriceSelect, - // useBenefitSelect, - count1, - (tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7 :payChannel, - tableId); + BaseData baseData = await minService.getOrderInfo({ + "addressId": addressId, + "isTake": isTake, + "memberCouponId": memberCouponId, + "orderId": orderId, + "promotionId": promotionId, + "productSkuId": productSkuId, + "actProductId": actProductId, + "actProductSkuId": actProductSkuId, + "discountType": discountType, + // "useVipPrice":useVipPriceSelect, + // "useBenefit": useBenefitSelect, + "buyNum": buyNum, + "payChannel": payChannel, + "tableId": tableId + }).catchError((error) {}); + this.promotion = null; + promotions = ""; + this.couponListBean = null; + coupons = ""; + if (baseData != null && baseData.isSuccess) { + settleOrderInfo = baseData.data; + if ((settleOrderInfo?.promotionId ?? "") != "") { + settleOrderInfo.promotionInfoList.forEach((element) { + if (element.id == settleOrderInfo.promotionId) { + this.promotion = element; + promotions = promotion?.name ?? ""; + } + }); + } + if ((settleOrderInfo?.memberCouponId ?? "") != "") { + settleOrderInfo.couponList.forEach((element) { + if (element.id == settleOrderInfo.memberCouponId) { + this.couponListBean = element; + coupons = couponListBean?.promotionName ?? ""; + } + }); + } + if (settleOrderInfo.orderProductList == null || + settleOrderInfo.orderProductList.length == 0) { + placeOrder = true; + queryOrderDetails( + pageType != null ? widget.arguments["orderId"] : parentId); + } + if (!isRaiseChannel && + (tableId > 0 + ? (minOrderInfo?.isRaise ?? false) + : (settleOrderInfo?.isRaise ?? false))) { + isRaiseChannel = true; + queryOrderInfo( + address?.id, + selectedBtn, + couponListBean?.id, + 0, + promotion?.id ?? productId, + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + "NONE", + // useVipPriceSelect, + // useBenefitSelect, + count1, + (tableId > 0 + ? (minOrderInfo?.isRaise ?? false) + : (settleOrderInfo?.isRaise ?? false)) + ? 7 + : payChannel, + tableId); + } + } else { + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } - } else { - SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); - } - }finally{ + } finally { setState(() {}); EasyLoading.dismiss(); } @@ -343,29 +354,29 @@ class _Settlement extends State { } queryAddress(int selectedBtn) async { - setState(() { - this.selectedBtn = selectedBtn; - }); - if (address != null) { - queryOrderInfo( - address.id, - selectedBtn, - null, - 0, - productId ?? null, - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - "AUTO", - // useVipPriceSelect, - // useBenefitSelect, - count1, - payChannel, - tableId); - return; - } - BaseData> baseDate = - await minService.queryAddress().catchError((error) {}); + setState(() { + this.selectedBtn = selectedBtn; + }); + if (address != null) { + queryOrderInfo( + address.id, + selectedBtn, + null, + 0, + productId ?? null, + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + "AUTO", + // useVipPriceSelect, + // useBenefitSelect, + count1, + payChannel, + tableId); + return; + } + BaseData> baseDate = + await minService.queryAddress().catchError((error) {}); BMFCoordinate bmfCoordinate = BMFCoordinate( double.tryParse(storeInfo.latitude), @@ -393,30 +404,30 @@ class _Settlement extends State { fromType: BMF_COORD_TYPE.COMMON, toType: BMF_COORD_TYPE.BD09LL); - double mi = await BMFCalculateUtils.getLocationDistance( - bmfCoordinate, coordinate); - double mi1 = await BMFCalculateUtils.getLocationDistance( - bmfCoordinate, coordinate1); - if (mi1 < mi) { - address = address1; - } + double mi = await BMFCalculateUtils.getLocationDistance( + bmfCoordinate, coordinate); + double mi1 = await BMFCalculateUtils.getLocationDistance( + bmfCoordinate, coordinate1); + if (mi1 < mi) { + 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 { ((subscribeParam?.isEnableSubscribe ?? false) == true) ? true : 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 + (reservationTime ?? "") + ((subscribeParam?.isEnableSubscribe ?? false) == true @@ -542,7 +559,13 @@ class _Settlement extends State { placeOrderFirst.orderTypeId = 0; placeOrderFirst.parentCode = parentCode; // 火锅加菜 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.promotionId = (promotion != null && tableId <= 0) ? promotion.id : ""; @@ -552,7 +575,8 @@ class _Settlement extends State { // : widget.arguments["cid"] ?? ""; // 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.discountType = settleOrderInfo?.discountType ?? ""; + placeOrderFirst.promotionInfoDTO.discountType = + settleOrderInfo?.discountType ?? ""; placeOrderFirst.recMobile = (mobile == null || mobile == "") ? mobile : storeInfo.headMobile; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; @@ -561,7 +585,9 @@ class _Settlement extends State { placeOrderFirst.storeId = storeInfo.id; placeOrderFirst.subcribeTime = subTime ?? ""; //预约时间 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 = shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; } @@ -803,40 +829,49 @@ class _Settlement extends State { child: Container( child: Column( children: [ - DistributionMode((addressId, isTake, - memberCouponId, orderId, promotionId) { - setState(() { - this.selectedBtn = 0; - }); - queryOrderInfo( - addressId, - isTake, - memberCouponId, - orderId, - promotionId ?? (productId ?? 0), - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - "AUTO", - // useVipPriceSelect, - // useBenefitSelect, - count1, - payChannel, - tableId ?? 0); - }, - queryAddress, - storeInfo, - address, - selectedAddress, - pageType, - widget.arguments["distance"],), + DistributionMode( + (addressId, isTake, memberCouponId, orderId, + promotionId) { + setState(() { + this.selectedBtn = 0; + }); + queryOrderInfo( + addressId, + isTake, + memberCouponId, + orderId, + promotionId ?? (productId ?? 0), + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + "AUTO", + // useVipPriceSelect, + // useBenefitSelect, + count1, + payChannel, + tableId ?? 0); + }, + queryAddress, + storeInfo, + address, + selectedAddress, + pageType, + widget.arguments["distance"], + ), SizedBox( height: 16.h, ), - if((storeInfo?.pickupType?.dineInTakeStatus?? false) ==true && (subscribeParam?.isEnableSubscribe ?? false) == false - && selectedBtn != 1 && selectedBtn != 2&& settleOrderInfo !=null) + if ((storeInfo?.pickupType?.dineInTakeStatus ?? + false) == + true && + (subscribeParam?.isEnableSubscribe ?? + false) == + false && + selectedBtn != 1 && + selectedBtn != 2 && + settleOrderInfo != null) takeStatus(), /// 预留的手机号, 可修改 @@ -857,7 +892,9 @@ class _Settlement extends State { (coupons != "" || promotions != "") ? false : useVipPriceSelect, - this.showVipTips,useBenefitSelect,placeOrder), + this.showVipTips, + useBenefitSelect, + placeOrder), ///优惠券/备注/会员优惠金额 if (settleOrderInfo != null || @@ -872,20 +909,20 @@ class _Settlement extends State { couponCount(), placeOrder, remakers, - () { + () { Navigator.of(context).pushNamed( '/router/edit_remarks_page', arguments: { "remake": remakers }).then((value) => { - setState(() { - if (value != null) remakers = value; - }) - }); + setState(() { + if (value != null) remakers = value; + }) + }); }, tableId, vipPriceSelect, - () { + () { setState(() { this.showVipTips = true; }); @@ -900,9 +937,20 @@ class _Settlement extends State { subscribeStoresName, ), - if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug) - ///支付方式 - PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect,tableId,minOrderInfo), + if (settleOrderInfo != null && + placeOrder && + joinA != JoinActivity.BargainBug) + + ///支付方式 + PayMethod( + payChannelCheck, + coupons, + promotions, + useVipPriceSelect, + settleOrderInfo, + useBenefitSelect, + tableId, + minOrderInfo), ], ), ), @@ -970,10 +1018,14 @@ class _Settlement extends State { // return; // } else // orderButton = true; - if (subscribeParam != null && ((subscribeParam.isEnableSubscribe ?? false) == - true) && - (reservationTime == null || - ((subscribeParam.stores.length ==1 ? subscribeParam.stores[0] : subscribeStoresName) == null))) { + if (subscribeParam != null && + ((subscribeParam.isEnableSubscribe ?? false) == + true) && + (reservationTime == null || + ((subscribeParam.stores.length == 1 + ? subscribeParam.stores[0] + : subscribeStoresName) == + null))) { SmartDialog.showToast( (reservationTime == null) ? S.of(context).qingxuanzeyuyeushijian @@ -1006,161 +1058,190 @@ class _Settlement extends State { } ///堂食/打包外带选择 - Widget takeStatus(){ + Widget takeStatus() { return Container( decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0D000000), - offset: Offset(0, 1), - blurRadius: 8, - spreadRadius: 0, - ), - ], - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w,top:6.h,bottom:6.h), - padding: EdgeInsets.symmetric(horizontal: 12.w,vertical:10.h), - child: - Row(children: [ - Expanded(child:GestureDetector( - onTap: (){ - setState((){ - diningStatus = 4; - }); - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6)), - border: Border.all( - width: diningStatus == 4? 2.w:1.w, - color: diningStatus == 4? Color(0xFF32A060):Color(0xFFDEDEDE), - style: BorderStyle.solid, - ), - color: diningStatus == 4?Color(0xFFEEFFF5):Color(0xFFFFFFFF), - ), - 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, + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x0D000000), + offset: Offset(0, 1), + blurRadius: 8, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(8), + ), + margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 6.h, bottom: 6.h), + padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h), + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + diningStatus = 4; + }); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6)), + border: Border.all( + width: diningStatus == 4 ? 2.w : 1.w, + color: + diningStatus == 4 ? Color(0xFF32A060) : Color(0xFFDEDEDE), + style: BorderStyle.solid, ), - 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, + color: + diningStatus == 4 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), + ), + 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, + ), + 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(height: 6.h,), - Text( - S.of(context).dianneiyongcan, - style: TextStyle( - color: Color(0xFF32A060), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, + SizedBox( + height: 6.h, ), - ), - ], - ) - ], - ), - ), - )), - 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, + Text( + S.of(context).dianneiyongcan, + style: TextStyle( + color: Color(0xFF32A060), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ) + ], ), - color: diningStatus == 3 ?Color(0xFFEEFFF5):Color(0xFFFFFFFF), ), - padding: EdgeInsets.only(top:11.h,bottom: 14.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/dining_w.webp", - fit: BoxFit.fill, - width: 24.w, - height: 26.h, + )), + 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, ), - 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, + color: + diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), + ), + padding: EdgeInsets.only(top: 11.h, bottom: 14.h), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + "assets/image/dining_w.webp", + 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(height: 6.h,), - Text( - S.of(context).dabaodaodianqu, - style: TextStyle( - color: Color(0xFF32A060), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, + SizedBox( + height: 6.h, ), - ), - ], - ) - ], + Text( + S.of(context).dabaodaodianqu, + style: TextStyle( + color: Color(0xFF32A060), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ) + ], + ), ), - ), - )), - ],), + )), + ], + ), ); } payChannelCheck(int payChannel) { this.payChannel = payChannel; - if (tableId > 0) { - queryOrderDetails(parentId); - } else { - queryOrderInfo( - address?.id, - selectedBtn, - (settleOrderInfo.isRaise || payChannel == 5) ? "" :couponListBean?.id, - 0, - (settleOrderInfo.isRaise || payChannel == 5) ? "" :promotion?.id ?? productId, - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - (settleOrderInfo.isRaise || payChannel == 5) ?"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);} - + if (tableId > 0) { + queryOrderDetails(parentId); + } else { + queryOrderInfo( + address?.id, + selectedBtn, + (settleOrderInfo.isRaise || payChannel == 5) + ? "" + : couponListBean?.id, + 0, + (settleOrderInfo.isRaise || payChannel == 5) + ? "" + : promotion?.id ?? productId, + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + (settleOrderInfo.isRaise || payChannel == 5) + ? "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) { @@ -1177,12 +1258,13 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (useVipPriceSelect == true) ? "VIP": "MEMBER_RANK", + (useVipPriceSelect == true) ? "VIP" : "MEMBER_RANK", // useVipPriceSelect, // useVipPriceSelect == true ? false :useBenefitSelect, count1, payChannel, - tableId);} + tableId); + } } ///会员等级选择 @@ -1258,7 +1340,11 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (couponBean?.id ?? 0) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"COUPON", + (couponBean?.id ?? 0) == 0 + ? ((isVips == false && vipLevelName == "黄金会员") + ? "MEMBER_RANK" + : "AUTO") + : "COUPON", // useVipPriceSelect, // useBenefitSelect, count1, @@ -1293,7 +1379,11 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", 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, // useBenefitSelect, count1, @@ -1324,7 +1414,7 @@ class _Settlement extends State { date.timeZoneOffset.inHours.toString()); }, onConfirm: (date) { reservationTime = date.toString().substring(0, 16); - subTime = date.add(Duration(hours:8)).toUtc().toIso8601String(); + subTime = date.add(Duration(hours: 8)).toUtc().toIso8601String(); setState(() {}); }, currentTime: minTime, locale: LocaleType.zh); } @@ -1358,17 +1448,17 @@ class _Settlement extends State { children: [ Expanded( child: Container( - alignment: Alignment.center, - margin: EdgeInsets.symmetric(vertical:5.h), - child: Text( - S.of(context).qingxuanzeyuyuemendian, - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 15.sp, - color: Color(0xFF353535), - ), - ), - )), + alignment: Alignment.center, + margin: EdgeInsets.symmetric(vertical: 5.h), + child: Text( + S.of(context).qingxuanzeyuyuemendian, + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 15.sp, + color: Color(0xFF353535), + ), + ), + )), GestureDetector( onTap: () { setState(() { @@ -1399,9 +1489,10 @@ class _Settlement extends State { }), ), GestureDetector( - onTap: (){ + onTap: () { setState(() { - subscribeStoresName = subscribeParam.stores[storesIndex]; + subscribeStoresName = + subscribeParam.stores[storesIndex]; }); Navigator.of(context).pop(); }, @@ -1410,10 +1501,12 @@ class _Settlement extends State { height: 40.h, decoration: BoxDecoration( borderRadius: BorderRadius.circular(100), - color:Color(0xFF32A060), + color: Color(0xFF32A060), ), alignment: Alignment.center, - margin: EdgeInsets.only(bottom: 10.h,), + margin: EdgeInsets.only( + bottom: 10.h, + ), child: Text( S.of(context).queding, style: TextStyle( @@ -1436,17 +1529,17 @@ class _Settlement extends State { Widget storesNameItem(index) { return Container( width: double.infinity, - margin: EdgeInsets.symmetric(vertical:8.h), + margin: EdgeInsets.symmetric(vertical: 8.h), padding: EdgeInsets.symmetric(vertical: 10.h), alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius:BorderRadius.circular(6), - border: Border.all( - color: storesIndex == index ? Color(0xFF32A060):Color(0xFFF7F7F7), - width: storesIndex == index ? 1 :0, - ), - color: storesIndex == index ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + border: Border.all( + color: storesIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7), + width: storesIndex == index ? 1 : 0, ), + color: storesIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7), + ), child: Text( subscribeParam.stores[index], style: TextStyle( diff --git a/lib/store/shop_details_page.dart b/lib/store/shop_details_page.dart index b5b8cf82..76997a33 100644 --- a/lib/store/shop_details_page.dart +++ b/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:flutter_screenutil/flutter_screenutil.dart'; import 'package:shared_preferences/shared_preferences.dart'; - -import '../utils/flutter_utils.dart'; import '../view_widget/border_text.dart'; import '../view_widget/request_permission.dart'; @@ -1090,7 +1088,7 @@ class _ShopDetailsPage extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "数量", + S.of(context).shuliang, style: TextStyle( color: Color(0xFFB3B3B3), fontSize: 12.sp, @@ -1275,7 +1273,7 @@ class _ShopDetailsPage extends State { Expanded( child: InkWell( child: BorderText( - text: "取消", + text: S.of(context).quxiao, textColor: Color(0xFF32A060), fontSize: 16.sp, fontWeight: FontWeight.bold, @@ -1296,7 +1294,7 @@ class _ShopDetailsPage extends State { Expanded( child: InkWell( child: RoundButton( - text: "确定", + text: S.of(context).queding, textColor: Colors.white, radius: 4, padding: EdgeInsets.all(12), diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 8b7aeff7..e0d1e416 100644 --- a/lib/store/store_order.dart +++ b/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/product_sku.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_order_list.dart'; import 'package:huixiang/utils/flutter_utils.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_tab.dart'; import 'package:huixiang/view_widget/receive_success.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:intl/intl.dart'; -import 'package:permission_handler/permission_handler.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.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 { final Map arguments; @@ -432,7 +426,6 @@ class _StoreOrderPage extends State ]; }, body: - ///点餐 TabBarView( physics: NeverScrollableScrollPhysics(), diff --git a/lib/store/store_view/product_meals_sku.dart b/lib/store/store_view/product_meals_sku.dart index 408932a7..3d2a7e57 100644 --- a/lib/store/store_view/product_meals_sku.dart +++ b/lib/store/store_view/product_meals_sku.dart @@ -356,7 +356,7 @@ class _ProductMealsSku extends State { "") GestureDetector( child: Text( - "选规格", + S.of(context).xuanguige, style: TextStyle( color: Colors.black, fontSize: 13.sp, @@ -638,7 +638,7 @@ class _ProductMealsSku extends State { .productAttrInfoList .where((element) => element.selectSku == null) .isNotEmpty) { - SmartDialog.showToast("请先选择规格", + SmartDialog.showToast(S.of(context).qingxianxuanguige, alignment: Alignment.center); return; } @@ -679,7 +679,7 @@ class _ProductMealsSku extends State { ), padding: EdgeInsets.symmetric(vertical: 6), child: Text( - "选好啦", + S.of(context).xuanhaola, style: TextStyle( fontSize: 15.sp, fontWeight: MyFontWeight.bold, diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index 557c68e8..14c03d45 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.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:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart'; @@ -57,7 +56,7 @@ class _ProductSku extends State { return; } if (productSku == null) return; - selectedPrice = productSku.skuPrice; + selectedPrice = productSku.vipPrice; String skuId = productSku.id; if (widget.shopCarGoods == null || widget.shopCarGoods.shoppingCartSkuItemList == null) return; @@ -228,7 +227,7 @@ class _ProductSku extends State { children: [ Expanded( child: Text( - "数量", + S.of(context).shuliang, style: TextStyle( color: Colors.black, fontSize: 14.sp, @@ -313,7 +312,7 @@ class _ProductSku extends State { RoundButton( width: double.infinity, height: 54.h, - text: "确认", + text: S.of(context).queren, textColor: Colors.white, fontWeight: MyFontWeight.semi_bold, radius: 27, diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index e9f70532..8d2ac06d 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -250,7 +250,7 @@ class _ShopGoods extends State { } }, child: Container( - padding: EdgeInsets.only(right: 16.w), + // padding: EdgeInsets.only(right: 16.w), child: Stack( children: [ Container( @@ -259,7 +259,7 @@ class _ShopGoods extends State { top: 4.h, bottom: 4.h, ), - margin: EdgeInsets.only(right: 8, top: 4), + margin: EdgeInsets.only(right:8.w,top: 4.h), child: RoundButton( text: S.of(context).xuanguige, textColor: Colors.white, @@ -364,7 +364,7 @@ class _ShopGoods extends State { } }, child: Container( - padding: EdgeInsets.only(left: 6.w, right: 16.w), + padding: EdgeInsets.only(left: 6.w, right:9.w), child: Image.asset( "assets/image/add.webp", width: 22, @@ -401,7 +401,7 @@ class _ShopGoods extends State { top: 4.h, bottom: 4.h, ), - margin: EdgeInsets.only(right: 8, top: 4), + margin: EdgeInsets.only(right:8.w,top: 4), child: RoundButton( text: S.of(context).lijiyuyue, textColor: Colors.white, @@ -494,7 +494,7 @@ class _ShopGoods extends State { Expanded( child: InkWell( child: BorderText( - text: "取消", + text: S.of(context).quxiao, textColor: Color(0xFF32A060), fontSize: 16.sp, fontWeight: FontWeight.bold, @@ -515,7 +515,7 @@ class _ShopGoods extends State { Expanded( child: InkWell( child: RoundButton( - text: "确定", + text: S.of(context).queding, textColor: Colors.white, radius: 4, padding: EdgeInsets.all(12), diff --git a/lib/view_widget/channel_dialog.dart b/lib/view_widget/channel_dialog.dart index 68513e5f..9e133439 100644 --- a/lib/view_widget/channel_dialog.dart +++ b/lib/view_widget/channel_dialog.dart @@ -1,11 +1,15 @@ +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/retrofit/data/login_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/round_button.dart'; + +import '../retrofit/data/base_data.dart'; +import '../retrofit/data/channels_list.dart'; +import '../retrofit/retrofit_api.dart'; class ChannelDialog extends StatefulWidget { @@ -17,29 +21,188 @@ class ChannelDialog extends StatefulWidget { } class _ChannelDialog extends State { + 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 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 SimpleDialog( - titlePadding: EdgeInsets.all(10), - backgroundColor: Colors.transparent, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(6), + 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, + ), + ], ), - children: [ - Column(children: [ - GestureDetector(onTap: (){ - setState(() { - Navigator.of(context).pop(); - }); - },child:Image.asset( - "assets/image/yq_qx.webp", - width: 34, - height: 34, - ),) - - ],), - ], ); } } diff --git a/pubspec.yaml b/pubspec.yaml index d7dd025e..f42e0a03 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 一心回乡. 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: sdk: ">=2.7.0 <3.0.0" @@ -108,6 +108,7 @@ dependencies: # 时间选择器 flutter_datetime_picker: ^1.5.1 + dev_dependencies: flutter_test: sdk: flutter