diff --git a/assets/image/2x/icon_history.png b/assets/image/2x/icon_history.png new file mode 100644 index 00000000..f113c9c4 Binary files /dev/null and b/assets/image/2x/icon_history.png differ diff --git a/assets/image/2x/icon_sisters.png b/assets/image/2x/icon_sisters.png new file mode 100644 index 00000000..ac70bbe3 Binary files /dev/null and b/assets/image/2x/icon_sisters.png differ diff --git a/assets/image/2x/icon_sisters_bj.png b/assets/image/2x/icon_sisters_bj.png new file mode 100644 index 00000000..130e3807 Binary files /dev/null and b/assets/image/2x/icon_sisters_bj.png differ diff --git a/assets/image/2x/icon_sisters_vip.png b/assets/image/2x/icon_sisters_vip.png new file mode 100644 index 00000000..a42c5d36 Binary files /dev/null and b/assets/image/2x/icon_sisters_vip.png differ diff --git a/assets/image/2x/icon_store_c.png b/assets/image/2x/icon_store_c.png new file mode 100644 index 00000000..7183fe9e Binary files /dev/null and b/assets/image/2x/icon_store_c.png differ diff --git a/assets/image/2x/icon_vip.png b/assets/image/2x/icon_vip.png new file mode 100644 index 00000000..c4060ed9 Binary files /dev/null and b/assets/image/2x/icon_vip.png differ diff --git a/assets/image/2x/icon_vip_bj.png b/assets/image/2x/icon_vip_bj.png new file mode 100644 index 00000000..2808a320 Binary files /dev/null and b/assets/image/2x/icon_vip_bj.png differ diff --git a/assets/image/2x/icon_vip_name.png b/assets/image/2x/icon_vip_name.png new file mode 100644 index 00000000..dd1b6485 Binary files /dev/null and b/assets/image/2x/icon_vip_name.png differ diff --git a/assets/image/3x/icon_history.png b/assets/image/3x/icon_history.png new file mode 100644 index 00000000..1e81ecdc Binary files /dev/null and b/assets/image/3x/icon_history.png differ diff --git a/assets/image/3x/icon_sisters.png b/assets/image/3x/icon_sisters.png new file mode 100644 index 00000000..53845121 Binary files /dev/null and b/assets/image/3x/icon_sisters.png differ diff --git a/assets/image/3x/icon_sisters_bj.png b/assets/image/3x/icon_sisters_bj.png new file mode 100644 index 00000000..f1b5f6c0 Binary files /dev/null and b/assets/image/3x/icon_sisters_bj.png differ diff --git a/assets/image/3x/icon_sisters_vip.png b/assets/image/3x/icon_sisters_vip.png new file mode 100644 index 00000000..7954a879 Binary files /dev/null and b/assets/image/3x/icon_sisters_vip.png differ diff --git a/assets/image/3x/icon_store_c.png b/assets/image/3x/icon_store_c.png new file mode 100644 index 00000000..91567512 Binary files /dev/null and b/assets/image/3x/icon_store_c.png differ diff --git a/assets/image/3x/icon_vip.png b/assets/image/3x/icon_vip.png new file mode 100644 index 00000000..4f6c03a8 Binary files /dev/null and b/assets/image/3x/icon_vip.png differ diff --git a/assets/image/3x/icon_vip_bj.png b/assets/image/3x/icon_vip_bj.png new file mode 100644 index 00000000..20797df6 Binary files /dev/null and b/assets/image/3x/icon_vip_bj.png differ diff --git a/assets/image/3x/icon_vip_name.png b/assets/image/3x/icon_vip_name.png new file mode 100644 index 00000000..c7dbe1c1 Binary files /dev/null and b/assets/image/3x/icon_vip_name.png differ diff --git a/assets/image/icon_history.png b/assets/image/icon_history.png new file mode 100644 index 00000000..71b54353 Binary files /dev/null and b/assets/image/icon_history.png differ diff --git a/assets/image/icon_sisters.png b/assets/image/icon_sisters.png new file mode 100644 index 00000000..a5e30dc6 Binary files /dev/null and b/assets/image/icon_sisters.png differ diff --git a/assets/image/icon_sisters_bj.png b/assets/image/icon_sisters_bj.png new file mode 100644 index 00000000..7a984f38 Binary files /dev/null and b/assets/image/icon_sisters_bj.png differ diff --git a/assets/image/icon_sisters_vip.png b/assets/image/icon_sisters_vip.png new file mode 100644 index 00000000..5aa94cfb Binary files /dev/null and b/assets/image/icon_sisters_vip.png differ diff --git a/assets/image/icon_store_c.png b/assets/image/icon_store_c.png new file mode 100644 index 00000000..7fd7c679 Binary files /dev/null and b/assets/image/icon_store_c.png differ diff --git a/assets/image/icon_vip.png b/assets/image/icon_vip.png new file mode 100644 index 00000000..33337d8a Binary files /dev/null and b/assets/image/icon_vip.png differ diff --git a/assets/image/icon_vip_bj.png b/assets/image/icon_vip_bj.png new file mode 100644 index 00000000..cde338d2 Binary files /dev/null and b/assets/image/icon_vip_bj.png differ diff --git a/assets/image/icon_vip_name.png b/assets/image/icon_vip_name.png new file mode 100644 index 00000000..2696b678 Binary files /dev/null and b/assets/image/icon_vip_name.png differ diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 4e897c1f..6192d94c 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -41,33 +41,35 @@ class MessageLookup extends MessageLookupByLibrary { static m10(man, jian) => "满${man}立减${jian}代金券"; - static m11(mi) => "${mi}米"; + static m11(man) => "满${man}元可用"; - static m12(ren) => "${ren}/人"; + static m12(mi) => "${mi}米"; - static m13(second) => "${second}s后重新发送"; + static m13(ren) => "${ren}/人"; - static m14(jifen) => "商品积分 ${jifen}积分"; + static m14(second) => "${second}s后重新发送"; - static m15(jifen) => "实付积分 ${jifen}积分"; + static m15(jifen) => "商品积分 ${jifen}积分"; - static m16(date) => "使用日期${date}"; + static m16(jifen) => "实付积分 ${jifen}积分"; - static m17(sui) => "${sui}岁"; + static m17(date) => "使用日期${date}"; - static m18(num) => "完成${num}"; + static m18(sui) => "${sui}岁"; - static m19(time) => "下单时间${time}"; + static m19(num) => "完成${num}"; - static m20(jian) => "已兑换${jian}件"; + static m20(time) => "下单时间${time}"; - static m21(time) => "营业时间: ${time}"; + static m21(jian) => "已兑换${jian}件"; - static m22(date) => "有效期至${date}"; + static m22(time) => "营业时间: ${time}"; - static m23(yuan) => "${yuan}元"; + static m23(date) => "有效期至${date}"; - static m24(yue) => "余额${yue}"; + static m24(yuan) => "${yuan}元"; + + static m25(yue) => "余额${yue}"; final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { @@ -80,6 +82,7 @@ class MessageLookup extends MessageLookupByLibrary { "chakangengduo" : MessageLookupByLibrary.simpleMessage("查看更多"), "chakanshixiaoquan" : MessageLookupByLibrary.simpleMessage("查看失效券"), "chakanwodekabao" : MessageLookupByLibrary.simpleMessage("查看我的卡包"), + "chakanwodekaquan" : MessageLookupByLibrary.simpleMessage("查看我的卡券"), "changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"), "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), "chongzhi" : MessageLookupByLibrary.simpleMessage("充值"), @@ -130,6 +133,7 @@ class MessageLookup extends MessageLookupByLibrary { "huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"), "huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"), "huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"), + "huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"), "huode" : MessageLookupByLibrary.simpleMessage("获得"), "huodongjianmianpeisongfei" : m5, "huodongjinxingzhong" : MessageLookupByLibrary.simpleMessage("活动进行中"), @@ -155,8 +159,11 @@ class MessageLookup extends MessageLookupByLibrary { "jixuzhifu" : MessageLookupByLibrary.simpleMessage("继续支付"), "kabao" : MessageLookupByLibrary.simpleMessage("卡包"), "kaitongriqi" : m8, + "kaquan" : MessageLookupByLibrary.simpleMessage("卡券"), + "kelingqudeyouhuiquan" : MessageLookupByLibrary.simpleMessage("可领取的优惠券"), "keshiyong" : MessageLookupByLibrary.simpleMessage(" 可使用 "), "keyongjifen" : MessageLookupByLibrary.simpleMessage("可用积分"), + "keyongquan" : MessageLookupByLibrary.simpleMessage("可用券"), "keyongyouhuiquan" : MessageLookupByLibrary.simpleMessage("可用优惠券"), "keyongyue" : MessageLookupByLibrary.simpleMessage("可用余额"), "kongtiao" : MessageLookupByLibrary.simpleMessage("空调"), @@ -178,10 +185,12 @@ class MessageLookup extends MessageLookupByLibrary { "main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"), "main_menu3" : MessageLookupByLibrary.simpleMessage("我的"), "manlijiandaijinquan" : m10, + "manyuankeyong" : m11, "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), + "meiyougengduohuiyuanka" : MessageLookupByLibrary.simpleMessage("没有更多会员卡了"), "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mi" : m11, + "mi" : m12, "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), @@ -229,20 +238,21 @@ class MessageLookup extends MessageLookupByLibrary { "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"), "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"), - "ren" : m12, + "ren" : m13, "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任务中心"), - "resend_in_seconds" : m13, + "resend_in_seconds" : m14, "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), "send_code" : MessageLookupByLibrary.simpleMessage("发送验证"), "shanchudingdan" : MessageLookupByLibrary.simpleMessage("删除订单"), - "shangpinjifen" : m14, + "shangpinjifen" : m15, "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘积分大礼"), "shezhi" : MessageLookupByLibrary.simpleMessage("设置"), "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("释放刷新"), - "shifujifen" : m15, + "shifujifen" : m16, "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("实名认证"), + "shixiaoquan" : MessageLookupByLibrary.simpleMessage("失效券"), "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongriqi" : m16, + "shiyongriqi" : m17, "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("收货地址"), @@ -253,7 +263,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), - "sui" : m17, + "sui" : m18, "tianjiadizhi" : MessageLookupByLibrary.simpleMessage("添加地址"), "tijiao" : MessageLookupByLibrary.simpleMessage("提交"), "tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"), @@ -264,7 +274,7 @@ class MessageLookup extends MessageLookupByLibrary { "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m18, + "wancheng_" : m19, "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"), "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), @@ -283,7 +293,7 @@ class MessageLookup extends MessageLookupByLibrary { "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"), - "xiadanshijian_" : m19, + "xiadanshijian_" : m20, "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), "xiangji" : MessageLookupByLibrary.simpleMessage("相机"), "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), @@ -296,9 +306,9 @@ class MessageLookup extends MessageLookupByLibrary { "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"), "xuni" : MessageLookupByLibrary.simpleMessage("虚拟"), "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"), - "yiduihuanjian" : m20, + "yiduihuanjian" : m21, "yikexiao" : MessageLookupByLibrary.simpleMessage("已核销"), - "yingyeshijian" : m21, + "yingyeshijian" : m22, "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), @@ -311,10 +321,11 @@ class MessageLookup extends MessageLookupByLibrary { "youhuiquan" : MessageLookupByLibrary.simpleMessage("优惠券"), "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), - "youxiaoqizhi" : m22, - "yuan" : m23, + "youxiaoqizhi" : m23, + "yuan" : m24, "yue" : MessageLookupByLibrary.simpleMessage("余额"), - "yue_" : m24, + "yue_" : m25, + "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 0fc19437..ddb03ffa 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -41,33 +41,33 @@ class MessageLookup extends MessageLookupByLibrary { static m10(man, jian) => "满${man}立减${jian}代金券"; - static m11(mi) => "${mi}米"; + static m12(mi) => "${mi}米"; - static m12(ren) => "${ren}/人"; + static m13(ren) => "${ren}/人"; - static m13(second) => "${second}s后重新发送"; + static m14(second) => "${second}s后重新发送"; - static m14(jifen) => "商品积分 ${jifen}积分"; + static m15(jifen) => "商品积分 ${jifen}积分"; - static m15(jifen) => "实付积分 ${jifen}积分"; + static m16(jifen) => "实付积分 ${jifen}积分"; - static m16(date) => "使用日期${date}"; + static m17(date) => "使用日期${date}"; - static m17(sui) => "${sui}岁"; + static m18(sui) => "${sui}岁"; - static m18(num) => "完成${num}"; + static m19(num) => "完成${num}"; - static m19(time) => "下单时间${time}"; + static m20(time) => "下单时间${time}"; - static m20(jian) => "已兑换${jian}件"; + static m21(jian) => "已兑换${jian}件"; - static m21(time) => "营业时间: ${time}"; + static m22(time) => "营业时间: ${time}"; - static m22(date) => "有效期至${date}"; + static m23(date) => "有效期至${date}"; - static m23(yuan) => "${yuan}元"; + static m24(yuan) => "${yuan}元"; - static m24(yue) => "余额${yue}"; + static m25(yue) => "余额${yue}"; final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { @@ -170,7 +170,7 @@ class MessageLookup extends MessageLookupByLibrary { "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mi" : m11, + "mi" : m12, "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), @@ -216,20 +216,20 @@ class MessageLookup extends MessageLookupByLibrary { "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"), "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"), - "ren" : m12, + "ren" : m13, "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任务中心"), - "resend_in_seconds" : m13, + "resend_in_seconds" : m14, "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), "send_code" : MessageLookupByLibrary.simpleMessage("发送验证"), "shanchudingdan" : MessageLookupByLibrary.simpleMessage("删除订单"), - "shangpinjifen" : m14, + "shangpinjifen" : m15, "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘积分大礼"), "shezhi" : MessageLookupByLibrary.simpleMessage("设置"), "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("释放刷新"), - "shifujifen" : m15, + "shifujifen" : m16, "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("实名认证"), "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongriqi" : m16, + "shiyongriqi" : m17, "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), @@ -239,7 +239,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), - "sui" : m17, + "sui" : m18, "tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"), "tixian" : MessageLookupByLibrary.simpleMessage("提现"), "tongzhi" : MessageLookupByLibrary.simpleMessage("通知"), @@ -248,7 +248,7 @@ class MessageLookup extends MessageLookupByLibrary { "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m18, + "wancheng_" : m19, "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"), "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), @@ -265,7 +265,7 @@ class MessageLookup extends MessageLookupByLibrary { "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"), - "xiadanshijian_" : m19, + "xiadanshijian_" : m20, "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), "xiangji" : MessageLookupByLibrary.simpleMessage("相机"), "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), @@ -278,9 +278,9 @@ class MessageLookup extends MessageLookupByLibrary { "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"), "xuni" : MessageLookupByLibrary.simpleMessage("虚拟"), "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"), - "yiduihuanjian" : m20, + "yiduihuanjian" : m21, "yikexiao" : MessageLookupByLibrary.simpleMessage("已核销"), - "yingyeshijian" : m21, + "yingyeshijian" : m22, "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), @@ -293,10 +293,10 @@ class MessageLookup extends MessageLookupByLibrary { "youhuiquan" : MessageLookupByLibrary.simpleMessage("优惠券"), "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), - "youxiaoqizhi" : m22, - "yuan" : m23, + "youxiaoqizhi" : m23, + "yuan" : m24, "yue" : MessageLookupByLibrary.simpleMessage("余额"), - "yue_" : m24, + "yue_" : m25, "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 8709dd8a..a407f066 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -41,33 +41,33 @@ class MessageLookup extends MessageLookupByLibrary { static m10(man, jian) => "满${man}立减${jian}代金券"; - static m11(mi) => "${mi}米"; + static m12(mi) => "${mi}米"; - static m12(ren) => "${ren}/人"; + static m13(ren) => "${ren}/人"; - static m13(second) => "${second}s后重新发送"; + static m14(second) => "${second}s后重新发送"; - static m14(jifen) => "商品积分 ${jifen}积分"; + static m15(jifen) => "商品积分 ${jifen}积分"; - static m15(jifen) => "实付积分 ${jifen}积分"; + static m16(jifen) => "实付积分 ${jifen}积分"; - static m16(date) => "使用日期${date}"; + static m17(date) => "使用日期${date}"; - static m17(sui) => "${sui}岁"; + static m18(sui) => "${sui}岁"; - static m18(num) => "完成${num}"; + static m19(num) => "完成${num}"; - static m19(time) => "下单时间${time}"; + static m20(time) => "下单时间${time}"; - static m20(jian) => "已兑换${jian}件"; + static m21(jian) => "已兑换${jian}件"; - static m21(time) => "营业时间: ${time}"; + static m22(time) => "营业时间: ${time}"; - static m22(date) => "有效期至${date}"; + static m23(date) => "有效期至${date}"; - static m23(yuan) => "${yuan}元"; + static m24(yuan) => "${yuan}元"; - static m24(yue) => "余额${yue}"; + static m25(yue) => "余额${yue}"; final messages = _notInlinedMessages(_notInlinedMessages); static _notInlinedMessages(_) => { @@ -170,7 +170,7 @@ class MessageLookup extends MessageLookupByLibrary { "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mi" : m11, + "mi" : m12, "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), @@ -216,20 +216,20 @@ class MessageLookup extends MessageLookupByLibrary { "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"), "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"), - "ren" : m12, + "ren" : m13, "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任务中心"), - "resend_in_seconds" : m13, + "resend_in_seconds" : m14, "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), "send_code" : MessageLookupByLibrary.simpleMessage("发送验证"), "shanchudingdan" : MessageLookupByLibrary.simpleMessage("删除订单"), - "shangpinjifen" : m14, + "shangpinjifen" : m15, "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘积分大礼"), "shezhi" : MessageLookupByLibrary.simpleMessage("设置"), "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("释放刷新"), - "shifujifen" : m15, + "shifujifen" : m16, "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("实名认证"), "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongriqi" : m16, + "shiyongriqi" : m17, "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), @@ -239,7 +239,7 @@ class MessageLookup extends MessageLookupByLibrary { "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), - "sui" : m17, + "sui" : m18, "tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"), "tixian" : MessageLookupByLibrary.simpleMessage("提现"), "tongzhi" : MessageLookupByLibrary.simpleMessage("通知"), @@ -248,7 +248,7 @@ class MessageLookup extends MessageLookupByLibrary { "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m18, + "wancheng_" : m19, "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"), "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), @@ -265,7 +265,7 @@ class MessageLookup extends MessageLookupByLibrary { "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"), - "xiadanshijian_" : m19, + "xiadanshijian_" : m20, "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), "xiangji" : MessageLookupByLibrary.simpleMessage("相机"), "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), @@ -278,9 +278,9 @@ class MessageLookup extends MessageLookupByLibrary { "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"), "xuni" : MessageLookupByLibrary.simpleMessage("虚拟"), "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"), - "yiduihuanjian" : m20, + "yiduihuanjian" : m21, "yikexiao" : MessageLookupByLibrary.simpleMessage("已核销"), - "yingyeshijian" : m21, + "yingyeshijian" : m22, "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), @@ -293,10 +293,10 @@ class MessageLookup extends MessageLookupByLibrary { "youhuiquan" : MessageLookupByLibrary.simpleMessage("优惠券"), "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), - "youxiaoqizhi" : m22, - "yuan" : m23, + "youxiaoqizhi" : m23, + "yuan" : m24, "yue" : MessageLookupByLibrary.simpleMessage("余额"), - "yue_" : m24, + "yue_" : m25, "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 187149ca..300e7a4a 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -205,15 +205,7 @@ class S { ); } - /// `活动列表` - String get huodongliebiao { - return Intl.message( - '活动列表', - name: 'huodongliebiao', - desc: '', - args: [], - ); - } + // skipped getter for the '' key /// `积分商城` String get jifenshangcheng { @@ -365,6 +357,16 @@ class S { ); } + /// `活动列表` + String get huodongliebiao { + return Intl.message( + '活动列表', + name: 'huodongliebiao', + desc: '', + args: [], + ); + } + /// `已有积分` String get yiyoujifen { return Intl.message( @@ -505,6 +507,16 @@ class S { ); } + /// `卡券` + String get kaquan { + return Intl.message( + '卡券', + name: 'kaquan', + desc: '', + args: [], + ); + } + /// `订单` String get dingdan { return Intl.message( @@ -625,6 +637,16 @@ class S { ); } + /// `可用券` + String get keyongquan { + return Intl.message( + '可用券', + name: 'keyongquan', + desc: '', + args: [], + ); + } + /// `已失效` String get yishixiao { return Intl.message( @@ -635,6 +657,16 @@ class S { ); } + /// `失效券` + String get shixiaoquan { + return Intl.message( + '失效券', + name: 'shixiaoquan', + desc: '', + args: [], + ); + } + /// `全部订单` String get quanbudingdan { return Intl.message( @@ -2575,6 +2607,16 @@ class S { ); } + /// `查看我的卡券` + String get chakanwodekaquan { + return Intl.message( + '查看我的卡券', + name: 'chakanwodekaquan', + desc: '', + args: [], + ); + } + /// `{mi}米` String mi(Object mi) { return Intl.message( @@ -2635,6 +2677,56 @@ class S { ); } + /// `没有更多会员卡了` + String get meiyougengduohuiyuanka { + return Intl.message( + '没有更多会员卡了', + name: 'meiyougengduohuiyuanka', + desc: '', + args: [], + ); + } + + /// `会员卡详情` + String get huiyuankaxiangqing { + return Intl.message( + '会员卡详情', + name: 'huiyuankaxiangqing', + desc: '', + args: [], + ); + } + + /// `余额明细` + String get yuemingxi { + return Intl.message( + '余额明细', + name: 'yuemingxi', + desc: '', + args: [], + ); + } + + /// `可领取的优惠券` + String get kelingqudeyouhuiquan { + return Intl.message( + '可领取的优惠券', + name: 'kelingqudeyouhuiquan', + desc: '', + args: [], + ); + } + + /// `满{man}元可用` + String manyuankeyong(Object man) { + return Intl.message( + '满$man元可用', + name: 'manyuankeyong', + desc: '', + args: [man], + ); + } + /// `并使用本机号码登录` String get privacy_policy4 { return Intl.message( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 2bb440b2..148d79ce 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -16,7 +16,7 @@ "main_menu2": "联盟", "main_menu3": "我的", "shouye": "首页", - "huodongliebiao": "活动列表", + "": "活动列表", "jifenshangcheng": "积分商城", "jinrihuiyuanrenwu": "今日会员任务", "renwuzhongxin": "任务中心", @@ -32,6 +32,7 @@ "ren": "{ren}/人", "youxiaoqizhi": "有效期至{date}", "huodongjinxingzhong": "活动进行中", + "huodongliebiao": "活动列表", "yiyoujifen": "已有积分", "morenpaixu": "默认排序", "duihuanlianggaodaodi": "兑换量从高到低", @@ -46,6 +47,7 @@ "jifendaoxiayidengji": "{jifen}积分 到下一个等级", "kaitongriqi": "开通日期:{date}", "kabao": "卡包", + "kaquan": "卡券", "dingdan": "订单", "ninyouyigedingdanyaolingqu": "您有一个订单需要前往门店领取", "wodeqianbao": "我的钱包", @@ -58,7 +60,9 @@ "fankui": "反馈", "shiyongriqi": "使用日期{date}", "keyongyouhuiquan": "可用优惠券", + "keyongquan": "可用券", "yishixiao": "已失效", + "shixiaoquan": "失效券", "quanbudingdan": "全部订单", "weiwancheng": " 未完成 ", "yingyeshijian": "营业时间: {time}", @@ -260,12 +264,18 @@ "lingqushijian": "领取时间 {shijian}", "faxingshijian": "发行开始时间 {shijian}", "chakanwodekabao": "查看我的卡包", + "chakanwodekaquan": "查看我的卡券", "mi": "{mi}米", "xialashuaxin": "下拉刷新", "shifangshuaxin": "释放刷新", "shuaxinzhong": "刷新中....", "shuaxinchenggong": "刷新成功", "shuaxinshibai": "刷新失败", + "meiyougengduohuiyuanka": "没有更多会员卡了", + "huiyuankaxiangqing": "会员卡详情", + "yuemingxi": "余额明细", + "kelingqudeyouhuiquan": "可领取的优惠券", + "manyuankeyong": "满{man}元可用", diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index 94fe87ea..fec002fa 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -14,7 +14,7 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dio/dio.dart'; import 'package:huixiang/view_widget/loading_view.dart'; -import 'package:photo_view/photo_view.dart'; +// import 'package:photo_view/photo_view.dart'; import 'package:shared_preferences/shared_preferences.dart'; class LoginPage extends StatefulWidget { @@ -368,11 +368,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { // child: , // ), - PhotoView( - imageProvider: AssetImage("assets/image/laoban.png"), - initialScale: 1.02, - basePosition: alignmentProgress, - ), + // PhotoView( + // imageProvider: AssetImage("assets/image/laoban.png"), + // initialScale: 1.02, + // basePosition: alignmentProgress, + // ), // ScaleTransition( // scale: animation, diff --git a/lib/main.dart b/lib/main.dart index 8495187c..f69a1e90 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,12 +16,16 @@ import 'package:huixiang/integral_store/integral_store_details_page.dart'; import 'package:huixiang/login/login_page.dart'; import 'package:huixiang/message/main_message_page.dart'; import 'package:huixiang/message/system_message.dart'; +import 'package:huixiang/mine/coupons_page.dart'; import 'package:huixiang/mine/mine_card_invalid_page.dart'; import 'package:huixiang/mine/mine_card_page.dart'; import 'package:huixiang/mine/mine_vip_level_page.dart'; import 'package:huixiang/mine/mine_wallet_page.dart'; import 'package:huixiang/mine/recharge_page.dart'; import 'package:huixiang/mine/user_info_page.dart'; +import 'package:huixiang/mine/vip_balance_page.dart'; +import 'package:huixiang/mine/vip_card_page.dart'; +import 'package:huixiang/mine/vip_detail_page.dart'; import 'package:huixiang/order/exchange_history_page.dart'; import 'package:huixiang/order/exchange_order_page.dart'; import 'package:huixiang/order/exchange_order_success_page.dart'; @@ -69,6 +73,10 @@ Map routers = { '/router/user_info_page': (context, {arguments}) => UserInfoPage(), '/router/mine_card': (context, {arguments}) => MineCardPage(), '/router/mine_card_invalid': (context, {arguments}) => MineCardInvalidPage(), + '/router/vip_card_page': (context, {arguments}) => VipCardPage(), + '/router/vip_details_page': (context, {arguments}) => VipDetailPage(), + '/router/vip_balance': (context, {arguments}) => VipBalancePage(), + '/router/coupons_page': (context, {arguments}) => CouponsPage(), '/router/permission_setting': (context, {arguments}) => PermissionSettingPage(), '/router/manage_address_page': (context, {arguments}) => @@ -140,7 +148,7 @@ class MyApp extends StatelessWidget { S.delegate ], supportedLocales: S.delegate.supportedLocales, - home: LoginPage(), + home: MainPage(), onGenerateRoute: (settings) { final String name = settings.name; final Function pageContentBuilder = routers[name]; diff --git a/lib/mine/coupons_page.dart b/lib/mine/coupons_page.dart new file mode 100644 index 00000000..ae7cc7b9 --- /dev/null +++ b/lib/mine/coupons_page.dart @@ -0,0 +1,272 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/coupon.dart'; +import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/view_widget/coupon_widget.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class CouponsPage extends StatefulWidget { + @override + State createState() { + return _CouponsPage(); + } +} + +class _CouponsPage extends State { + RefreshController _refreshController; + + ApiService apiService; + + @override + void initState() { + super.initState(); + + SharedPreferences.getInstance().then((value) => { + apiService = ApiService(Dio(), token: value.getString('token')), + queryCard(), + }); + + _refreshController = RefreshController(initialRefresh: false); + } + + int pageNum = 1; + List coupons = []; + + void _onRefresh() async { + pageNum = 1; + queryCard(); + } + + queryCard() async { + BaseData baseData = await apiService.queryCard({ + "centre": true, + "pageNum": pageNum, + "pageSize": 10, + "searchKey": "", + "state": 3 + }).catchError((error) { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + }); + if (baseData.isSuccess) { + PageInfo pageInfo = PageInfo.fromJson(baseData.data); + if (pageNum == 1) { + coupons.clear(); + } + coupons.addAll(pageInfo.list.map((e) => Coupon.fromJson(e))); + setState(() { + _refreshController.refreshCompleted(); + _refreshController.loadComplete(); + if (pageInfo.pageNum == pageInfo.pages) { + _refreshController.loadNoData(); + } else { + pageNum += 1; + } + }); + } else { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + Fluttertoast.showToast(msg: baseData.msg); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + child: Row( + children: [ + Container( + width: 68, + height: 26, + alignment: Alignment.center, + margin: EdgeInsets.only(left: 16, right: 12, top: 10, bottom: 14), + decoration:BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(2)), + color: Colors.white, + ), + child:GestureDetector( + onTap: (){ + + }, + child: Text( + S.of(context).keyongquan, + style:TextStyle( + fontSize: 14, + fontWeight:FontWeight.bold, + color: Colors.black, + ), + ), + ), + ), + Container( + width: 68, + height: 26, + alignment: Alignment.center, + margin: EdgeInsets.only(left: 16, top: 10, bottom: 14), + decoration:BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(2)), + color: Color(0xffE5E5E5), + ), + child: + GestureDetector( + onTap: (){ + Navigator.of(context).pushNamed('/router/mine_card_invalid'); + }, + child: Text( + S.of(context).shixiaoquan, + style:TextStyle( + fontSize: 14, + color: Color(0xff727272), + ), + ), + ), + ), + ], + ), + ), + ); + } + + Widget vipCardItem() { + return Container( + margin: EdgeInsets.fromLTRB(16, 8, 16, 8), + // margin: EdgeInsets.all(16), + child: Stack( + // alignment: Alignment.center, + children: [ + Image.asset( + "assets/image/icon_vip_bj.png", + fit: BoxFit.contain, //填充剩余空间 + height: 185, + ), + Container( + padding: EdgeInsets.only(left: 16,right: 16), + child:Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 16), + Row( + children: [ + ClipOval( + child:Image.asset( + "assets/image/icon_vip_name.png", + ), + clipBehavior: Clip.hardEdge, + ), + SizedBox( + width: 12, + ), + Expanded( + child: Container( + height: 54, + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "百年川椒火锅店", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 20, + color: Colors.white, + ), + ), + Image.asset( + "assets/image/icon_vip.png", + ), + ], + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "会员卡", + style: TextStyle( + fontSize: 12, + color: Colors.white), + ), + ]), + textDirection: TextDirection.ltr, + ), + ], + ), + ), + flex: 1, + ) + ], + ), + SizedBox(height: 50), + Row( + textDirection: TextDirection.rtl, + children: [ + Image.asset( + "assets/image/icon_right.png", + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "查看详情", + style: TextStyle(fontSize: 12, color: Colors.white), + ), + ]), + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text.rich( + TextSpan(children: [ + TextSpan( + text: "No.202107021324199", + style: TextStyle(fontSize: 14, color: Colors.white), + ), + ]), + ), + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "有效期限:", + style: TextStyle(fontSize: 12, color: Colors.white), + ), + ]), + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "长期有效", + style: TextStyle(fontSize: 12, color: Colors.white), + ), + ]), + ), + ], + ), + ], + ), + ), + ], + ), + ); + } + +} diff --git a/lib/mine/mine_card_page.dart b/lib/mine/mine_card_page.dart index d91609b5..71f5d2cb 100644 --- a/lib/mine/mine_card_page.dart +++ b/lib/mine/mine_card_page.dart @@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/mine/vip_card_page.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/coupon.dart'; import 'package:huixiang/retrofit/data/page.dart'; @@ -14,6 +15,8 @@ import 'package:huixiang/view_widget/my_tab.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'coupons_page.dart'; + class MineCardPage extends StatefulWidget { @override State createState() { @@ -21,8 +24,21 @@ class MineCardPage extends StatefulWidget { } } -class _MineCardPage extends State { +class _MineCardPage extends State + with SingleTickerProviderStateMixin{ RefreshController _refreshController; + List _pages; + + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + _pages = [ + VipCardPage(), + CouponsPage() + ]; + } + ApiService apiService; @@ -82,18 +98,18 @@ class _MineCardPage extends State { @override Widget build(BuildContext context) { return DefaultTabController( - length: 3, + length: 2, child: Scaffold( appBar: AppBar( title: Text( - "卡包", + S.of(context).kaquan, style: TextStyle( color: Colors.black, fontWeight: FontWeight.bold, ), ), centerTitle: false, - backgroundColor: Color(0xFFF7F7F7), + backgroundColor: Colors.white, elevation: 0, leading: GestureDetector( onTap: () { @@ -112,64 +128,139 @@ class _MineCardPage extends State { ), titleSpacing: 2, leadingWidth: 56, - ), - body: Container( - child: Column( - children: [ - ItemTitle( - text: S.of(context).keyongyouhuiquan, - imgPath: "assets/image/icon_card_coupon.png", - moreText: S.of(context).chakanshixiaoquan, - onTap: () { - Navigator.of(context).pushNamed('/router/mine_card_invalid'); - }, - ), - Expanded( - flex: 1, - child: Container( - child: SmartRefresher( - enablePullDown: true, - enablePullUp: true, - header: MyHeader(), - footer: CustomFooter( - builder: (context, mode) { - Widget body; - if (mode == LoadStatus.idle) { - body = Text("pull up load"); - } else if (mode == LoadStatus.loading) { - body = CupertinoActivityIndicator(); - } else if (mode == LoadStatus.failed) { - body = Text("Load Failed!Click retry!"); - } else if (mode == LoadStatus.canLoading) { - body = Text("release to load more"); - } else { - body = Text(S.of(context).meiyougengduoyouhuiquan); - } - return Container( - height: 55.0, - child: Center(child: body), - ); - }, - ), - controller: _refreshController, - onRefresh: _onRefresh, - onLoading: queryCard, - child: ListView.builder( - itemBuilder: (context, position) { - return CouponWidget( - coupons[position], - () {}, - ); - }, - itemCount: coupons.length, - ), - ), - ), - ) + bottom: TabBar( + // isScrollable: true, //可滚动 + indicatorColor: Color(0xff39B54A), + labelColor: Colors.black, + labelStyle: TextStyle(fontSize: 17, fontWeight: FontWeight.bold), + unselectedLabelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.normal, + ), + // controller: tabController, + //未选中文字颜色 + unselectedLabelColor: Color(0xffA29E9E), + indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 + tabs: [ + Tab(text: "会员卡"), + Tab(text: "券包"), ], ), ), + body: TabBarView( + children: _pages, + ), + // body: Container( + // child: Column( + // children: [ + // Row( + // children: [ + // Container( + // width: 68, + // height: 26, + // alignment: Alignment.center, + // margin: EdgeInsets.only(left: 16, right: 12, top: 10, bottom: 14), + // decoration:BoxDecoration( + // borderRadius: BorderRadius.all(Radius.circular(2)), + // color: Colors.white, + // ), + // child:GestureDetector( + // onTap: (){ + // + // }, + // child: Text( + // S.of(context).keyongquan, + // style:TextStyle( + // fontSize: 14, + // fontWeight:FontWeight.bold, + // color: Colors.black, + // ), + // ), + // ), + // ), + // Container( + // width: 68, + // height: 26, + // alignment: Alignment.center, + // margin: EdgeInsets.only(left: 16, top: 10, bottom: 14), + // decoration:BoxDecoration( + // borderRadius: BorderRadius.all(Radius.circular(2)), + // color: Color(0xffE5E5E5), + // ), + // child: + // GestureDetector( + // onTap: (){ + // Navigator.of(context).pushNamed('/router/mine_card_invalid'); + // }, + // child: Text( + // S.of(context).shixiaoquan, + // style:TextStyle( + // fontSize: 14, + // color: Color(0xff727272), + // ), + // ), + // ), + // ), + // ], + // ), + // // ItemTitle( + // // text: S.of(context).keyongquan, + // // imgPath: "assets/image/icon_card_coupon.png", + // // moreText: S.of(context).shixiaoquan, + // // onTap: () { + // // Navigator.of(context).pushNamed('/router/mine_card_invalid'); + // // }, + // // ), + // Expanded( + // flex: 1, + // child: Container( + // child: SmartRefresher( + // enablePullDown: true, + // enablePullUp: true, + // header: MyHeader(), + // footer: CustomFooter( + // builder: (context, mode) { + // Widget body; + // if (mode == LoadStatus.idle) { + // body = Text("pull up load"); + // } else if (mode == LoadStatus.loading) { + // body = CupertinoActivityIndicator(); + // } else if (mode == LoadStatus.failed) { + // body = Text("Load Failed!Click retry!"); + // } else if (mode == LoadStatus.canLoading) { + // body = Text("release to load more"); + // } else { + // body = Text(S.of(context).meiyougengduoyouhuiquan); + // } + // return Container( + // height: 55.0, + // child: Center(child: body), + // ); + // }, + // ), + // controller: _refreshController, + // onRefresh: _onRefresh, + // onLoading: queryCard, + // child: ListView.builder( + // itemBuilder: (context, position) { + // return CouponWidget( + // coupons[position], + // () {}, + // ); + // }, + // itemCount: coupons.length, + // ), + // ), + // ), + // ), + // ], + // ), + // ), ), ); } + + + + } diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index af1c336d..7d1fdfdc 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -340,7 +340,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { width: 12, ), Text( - S.of(context).kabao, + S.of(context).kaquan, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16, diff --git a/lib/mine/roll_center_page.dart b/lib/mine/roll_center_page.dart index cdf606e2..43219c7b 100644 --- a/lib/mine/roll_center_page.dart +++ b/lib/mine/roll_center_page.dart @@ -113,9 +113,9 @@ class _RollCenterPage extends State { child: Column( children: [ ItemTitle( - text: S.of(context).keyongyouhuiquan, + text: S.of(context).kelingqudeyouhuiquan, imgPath: "assets/image/icon_card_coupon.png", - moreText: S.of(context).chakanwodekabao, + moreText: S.of(context).chakanwodekaquan, onTap: () { Navigator.of(context).pushNamed('/router/mine_card'); }, diff --git a/lib/mine/vip_balance_page.dart b/lib/mine/vip_balance_page.dart new file mode 100644 index 00000000..7c35cb36 --- /dev/null +++ b/lib/mine/vip_balance_page.dart @@ -0,0 +1,202 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/coupon.dart'; +import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/view_widget/coupon_widget.dart'; +import 'package:huixiang/view_widget/separator.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class VipBalancePage extends StatefulWidget { + @override + State createState() { + return _VipBalancePage(); + } +} + +class _VipBalancePage extends State { + RefreshController _refreshController; + + ApiService apiService; + + @override + void initState() { + super.initState(); + + SharedPreferences.getInstance().then((value) => { + apiService = ApiService(Dio(), token: value.getString('token')), + queryCard(), + }); + + _refreshController = RefreshController(initialRefresh: false); + } + + int pageNum = 1; + List coupons = []; + + void _onRefresh() async { + pageNum = 1; + queryCard(); + } + + queryCard() async { + BaseData baseData = await apiService.queryCard({ + "centre": true, + "pageNum": pageNum, + "pageSize": 10, + "searchKey": "", + "state": 3 + }).catchError((error) { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + }); + if (baseData.isSuccess) { + PageInfo pageInfo = PageInfo.fromJson(baseData.data); + if (pageNum == 1) { + coupons.clear(); + } + coupons.addAll(pageInfo.list.map((e) => Coupon.fromJson(e))); + setState(() { + _refreshController.refreshCompleted(); + _refreshController.loadComplete(); + if (pageInfo.pageNum == pageInfo.pages) { + _refreshController.loadNoData(); + } else { + pageNum += 1; + } + }); + } else { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + Fluttertoast.showToast(msg: baseData.msg); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text( + S.of(context).yuemingxi, + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ), + centerTitle: false, + backgroundColor: Color(0xFFF7F7F7), + elevation: 0, + leading: GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Container( + alignment: Alignment.centerRight, + margin: EdgeInsets.only(left: 10), + padding: EdgeInsets.all(6), + child: Icon( + Icons.arrow_back_ios, + color: Colors.black, + size: 24, + ), + ), + ), + titleSpacing: 2, + leadingWidth: 56, + ), + body: Container( + child: ListView.builder( + itemBuilder: (context, position) { + return balanceItem(); + }, + itemCount: coupons.length, + ), + ), + ); + } + Widget balanceItem(){ + return Container( + margin: EdgeInsets.only(left: 16,right: 16), + child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 19, + height: 19, + margin: EdgeInsets.only(left: 12, top: 12), + alignment: Alignment.center, + child: Image.asset( + "assets/image/icon_store_c.png", + ), + ), + Expanded( + child: Container( + width: double.infinity, + margin: EdgeInsets.only(left: 6, top: 12), + alignment: Alignment.centerLeft, + child: Text( + "门店消费", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + color: Color(0xFF353535), + ), + ), + ), + flex: 1, + ), + Padding( + padding: EdgeInsets.only(top: 12), + child: Text("-200", + style: TextStyle( + fontSize: 16, + color: Color(0xffF68034))), + ), + ], + ), + SizedBox(height: 8,), + Container( + margin: EdgeInsets.only(left: 35), + child:Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text.rich( + TextSpan(children: [ + TextSpan( + text: "2021-06-19 13:03", + style: TextStyle(fontSize: 14, color: Color(0xff727272)), + ), + ]), + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "余额:200.00", + style: TextStyle(fontSize: 14,fontWeight: FontWeight.bold, color: Color(0xff727272)), + ), + ]), + ), + ], + ),), + Container( + margin: EdgeInsets.only(left: 35,top: 12,bottom: 12), + height: 1, + color: Color(0xFFF1F1F1), + ), + ], + ), + ); + } +} diff --git a/lib/mine/vip_card_page.dart b/lib/mine/vip_card_page.dart new file mode 100644 index 00000000..688d0b7f --- /dev/null +++ b/lib/mine/vip_card_page.dart @@ -0,0 +1,266 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/coupon.dart'; +import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/view_widget/coupon_widget.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class VipCardPage extends StatefulWidget { + @override + State createState() { + return _VipCardPage(); + } +} + +class _VipCardPage extends State { + RefreshController _refreshController; + + ApiService apiService; + + @override + void initState() { + super.initState(); + + SharedPreferences.getInstance().then((value) => { + apiService = ApiService(Dio(), token: value.getString('token')), + queryCard(), + }); + + _refreshController = RefreshController(initialRefresh: false); + } + + int pageNum = 1; + List coupons = []; + + void _onRefresh() async { + pageNum = 1; + queryCard(); + } + + queryCard() async { + BaseData baseData = await apiService.queryCard({ + "centre": true, + "pageNum": pageNum, + "pageSize": 10, + "searchKey": "", + "state": 3 + }).catchError((error) { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + }); + if (baseData.isSuccess) { + PageInfo pageInfo = PageInfo.fromJson(baseData.data); + if (pageNum == 1) { + coupons.clear(); + } + coupons.addAll(pageInfo.list.map((e) => Coupon.fromJson(e))); + setState(() { + _refreshController.refreshCompleted(); + _refreshController.loadComplete(); + if (pageInfo.pageNum == pageInfo.pages) { + _refreshController.loadNoData(); + } else { + pageNum += 1; + } + }); + } else { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + Fluttertoast.showToast(msg: baseData.msg); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + child: SmartRefresher( + enablePullDown: true, + enablePullUp: true, + header: ClassicHeader(), + footer: CustomFooter( + builder: (context, mode) { + Widget body; + if (mode == LoadStatus.idle) { + body = Text("pull up load"); + } else if (mode == LoadStatus.loading) { + body = CupertinoActivityIndicator(); + } else if (mode == LoadStatus.failed) { + body = Text("Load Failed!Click retry!"); + } else if (mode == LoadStatus.canLoading) { + body = Text("release to load more"); + } else { + body = Text("-" + S.of(context).meiyougengduohuiyuanka + "-"); + } + return Container( + height: 55.0, + child: Center(child: body), + ); + }, + ), + controller: _refreshController, + onRefresh: _onRefresh, + onLoading: queryCard, + child: ListView.builder( + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/vip_details_page'); + }, + child: vipCardItem(), + ); + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/vip_details_page'); + }, + child: vipCardItem(), + ); + }, + itemCount: coupons.length, + ), + ), + ), + ); + } + + Widget vipCardItem() { + return Container( + margin: EdgeInsets.fromLTRB(16, 8, 16, 8), + // margin: EdgeInsets.all(16), + child: Stack( + // alignment: Alignment.center, + children: [ + Image.asset( + "assets/image/icon_vip_bj.png", + fit: BoxFit.contain, //填充剩余空间 + height: 185, + ), + Container( + padding: EdgeInsets.only(left: 16,right: 16), + child:Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 16), + Row( + children: [ + ClipOval( + child:Image.asset( + "assets/image/icon_vip_name.png", + ), + clipBehavior: Clip.hardEdge, + ), + SizedBox( + width: 12, + ), + Expanded( + child: Container( + height: 54, + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "百年川椒火锅店", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 20, + color: Colors.white, + ), + ), + Image.asset( + "assets/image/icon_vip.png", + ), + ], + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "会员卡", + style: TextStyle( + fontSize: 12, + color: Colors.white), + ), + ]), + textDirection: TextDirection.ltr, + ), + ], + ), + ), + flex: 1, + ) + ], + ), + SizedBox(height: 50), + Row( + textDirection: TextDirection.rtl, + children: [ + Image.asset( + "assets/image/icon_right.png", + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "查看详情", + style: TextStyle(fontSize: 12, color: Colors.white), + ), + ]), + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text.rich( + TextSpan(children: [ + TextSpan( + text: "No.202107021324199", + style: TextStyle(fontSize: 14, color: Colors.white), + ), + ]), + ), + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "有效期限:", + style: TextStyle(fontSize: 12, color: Colors.white), + ), + ]), + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "长期有效", + style: TextStyle(fontSize: 12, color: Colors.white), + ), + ]), + ), + ], + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/mine/vip_detail_page.dart b/lib/mine/vip_detail_page.dart new file mode 100644 index 00000000..ec0ba451 --- /dev/null +++ b/lib/mine/vip_detail_page.dart @@ -0,0 +1,696 @@ +import 'package:flutter/material.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/view_widget/border_text.dart'; +import 'package:huixiang/view_widget/pay_input_view.dart'; +import 'package:huixiang/view_widget/round_button.dart'; +import 'package:huixiang/view_widget/separator.dart'; + +class VipDetailPage extends StatefulWidget { + @override + State createState() { + return _VipDetailPage(); + } +} + +class _VipDetailPage extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text( + S.of(context).huiyuankaxiangqing, + style: TextStyle(color: Colors.white, + fontWeight: FontWeight.bold), + ), + centerTitle: false, + backgroundColor: Color(0xFF3A405A), + brightness: Brightness.dark, + elevation: 0, + leading: GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Container( + alignment: Alignment.centerRight, + margin: EdgeInsets.only(left: 10), + padding: EdgeInsets.all(6), + child: Icon( + Icons.arrow_back_ios, + color: Colors.white, + size: 24, + ), + ), + ), + titleSpacing: 2, + leadingWidth: 56, + // bottom: PreferredSize( + // preferredSize: Size(double.infinity, 88), + // child: Container( + // height: 88, + // padding: EdgeInsets.fromLTRB(16, 0, 16, 14), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.end, + // crossAxisAlignment: CrossAxisAlignment.end, + // children: [ + // Expanded( + // child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Container( + // height: 20, + // width: 82, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(15), + // border: Border.all( + // width: 1, + // color: Color(0xFF32A060), + // ), + // ), + // child: Stack( + // alignment: Alignment.lerp( + // Alignment.centerLeft, + // Alignment.centerRight, + // 0, + // ), + // children: [ + // Positioned( + // left: 0, + // child: GestureDetector( + // onTap: () { + // setState(() { + // type = 0; + // }); + // }, + // child: RoundButton( + // text: S.of(context).ziqu, + // width: 42, + // height: 20, + // textColor: Colors.white, + // padding: EdgeInsets.fromLTRB(8, 1, 8, 1), + // backgroup: type == 0 + // ? Color(0xFF32A060) + // : Colors.transparent, + // radius: 15, + // ), + // ), + // ), + // Positioned( + // right: 0, + // child: GestureDetector( + // onTap: () { + // setState(() { + // type = 1; + // }); + // }, + // child: RoundButton( + // text: S.of(context).waisong, + // width: 42, + // height: 20, + // textColor: Colors.white, + // padding: EdgeInsets.fromLTRB(8, 1, 8, 1), + // backgroup: type == 1 + // ? Color(0xFF32A060) + // : Colors.transparent, + // radius: 15, + // ), + // ), + // ), + // ], + // ), + // ), + // Text( + // S.of(context).qingzaiguidingshijianneizhifu, + // style: TextStyle( + // color: Colors.white, + // fontSize: 12, + // ), + // ), + // ], + // ), + // ), + // Container( + // height: 33, + // child: Row( + // mainAxisSize: MainAxisSize.min, + // children: [ + // AspectRatio( + // aspectRatio: 1, + // child: BorderText( + // text: "02", + // textColor: Colors.white, + // fontSize: 21, + // fontWeight: FontWeight.bold, + // borderColor: Colors.white, + // borderWidth: 1, + // padding: EdgeInsets.all(2), + // ), + // ), + // SizedBox( + // width: 8, + // ), + // Text( + // ":", + // style: TextStyle( + // color: Colors.white, + // fontSize: 21, + // ), + // ), + // SizedBox( + // width: 8, + // ), + // AspectRatio( + // aspectRatio: 1, + // child: BorderText( + // text: "02", + // textColor: Colors.white, + // fontSize: 21, + // fontWeight: FontWeight.bold, + // borderColor: Colors.white, + // borderWidth: 1, + // padding: EdgeInsets.all(2), + // ), + // ), + // ], + // ), + // ) + // ], + // ), + // ), + // ), + ), + body: Container( + child: Stack( + children: [ + Container( + height: 150, + color: Color(0xFF3A405A), + ), + SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + child: Column( + children: [ + buildAddress(), + buildCommodity(), + Container( + height: 42, + ), + ], + ), + ), + ), + + ], + ), + ), + ); + } + + var type = 0; + + Widget buildAddress() { + return Container( + margin: EdgeInsets.fromLTRB(16, 8, 16, 8), + // margin: EdgeInsets.all(16), + child: Stack( + // alignment: Alignment.center, + children: [ + Image.asset( + "assets/image/icon_vip_bj.png", + fit: BoxFit.contain, //填充剩余空间 + height: 188, + ), + Container( + padding: EdgeInsets.only(left: 16,right: 16), + child:Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 16), + Row( + children: [ + ClipOval( + child:Image.asset( + "assets/image/icon_vip_name.png", + ), + clipBehavior: Clip.hardEdge, + ), + SizedBox( + width: 12, + ), + Expanded( + child: Container( + height: 54, + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "百年川椒火锅店", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 20, + color: Colors.white, + ), + ), + Image.asset( + "assets/image/icon_vip.png", + ), + ], + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "会员卡", + style: TextStyle( + fontSize: 12, + color: Colors.white), + ), + ]), + textDirection: TextDirection.ltr, + ), + ], + ), + ), + flex: 1, + ) + ], + ), + SizedBox(height: 26), + Padding(padding: EdgeInsets.only(left: 32,right: 32), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + children: [ + Text.rich( + TextSpan(children: [ + TextSpan( + text: "¥ 0.00", + style: TextStyle(fontSize: 24, color: Colors.white), + ), + ]), + ), + GestureDetector( + onTap: (){ + Navigator.of(context).pushNamed('/router/vip_balance'); + }, + child:Row( + children: [ + Text.rich( + TextSpan(children: [ + TextSpan( + text: "余额", + style: TextStyle( + fontSize: 14, + color: Colors.white), + ), + ]), + textDirection: TextDirection.ltr, + ), + Icon( + Icons.keyboard_arrow_right, + color: Colors.white, + size: 22.5, + ), + ], + ), + ), + ], + ), + Column( + children: [ + Text.rich( + TextSpan(children: [ + TextSpan( + text: "0", + style: TextStyle(fontSize: 24, color: Colors.white), + ), + ]), + ), + SizedBox(height: 5,), + Text.rich( + TextSpan(children: [ + TextSpan( + text: "积分", + style: TextStyle(fontSize: 14, color: Colors.white), + ), + ]), + ), + ], + ), + ], + ),), + + ], + ), + ), + ], + ), + ); + } + + Widget buildCommodity() { + return Stack( + alignment: Alignment.centerRight, + children: [ + Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: historyList(), + ), + ), + ], + ); + } + + List historyList() { + return [ + Padding(padding: EdgeInsets.only(left: 16,top: 35,bottom: 32),child: + Row( + children: [ + Text( + "历史订单", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + SizedBox(width: 8,), + Image.asset( + "assets/image/icon_history.png", + ), + ], + ),), + historyItem(), + historyItem(), + historyItem(), + historyItem(), + historyItem(), + historyItem(), + historyItem(), + ]; + } + + + Widget buildOrderInfo() { + return Container( + margin: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 8), + padding: EdgeInsets.only(left: 20, right: 20, top: 12, bottom: 12), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 1), + blurRadius: 12, + spreadRadius: 0) + ], + borderRadius: BorderRadius.all(Radius.circular(8))), + child: Column( + children: [ + orderInfoItem(S.of(context).shoujihao, "13800138000"), + orderInfoItem( + S.of(context).beizhu, S.of(context).qingshurubeizhuyaoqiu), + orderInfoItem(S.of(context).fapiao, S.of(context).buzhichikaipiao), + orderInfoItem(S.of(context).zhifufangshi, S.of(context).yue), + ], + ), + ); + } + + Widget orderInfoItem(leftText, rightText) { + return Container( + margin: EdgeInsets.only(top: 8, bottom: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + leftText, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 12, + color: Color(0xFF727272)), + ), + Expanded( + child: Text( + rightText, + textAlign: TextAlign.end, + style: TextStyle( + fontSize: 12, + color: Color(0xFF353535), + ), + ), + flex: 1, + ), + SizedBox( + width: 16, + ), + Icon( + Icons.keyboard_arrow_right, + size: 16, + color: Colors.black, + ) + ], + ), + ); + } + + Widget historyItem() { + return Container( + // margin: EdgeInsets.fromLTRB(16, 8, 16, 8), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 19, + height: 19, + margin: EdgeInsets.only(left: 12, top: 12), + alignment: Alignment.center, + decoration: new BoxDecoration( + color: Color(0xff32A060), + borderRadius: BorderRadius.circular(2), + ), + child: Text("自", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Colors.white)), + ), + Expanded( + child: Container( + width: double.infinity, + margin: EdgeInsets.only(left: 6, top: 12), + alignment: Alignment.centerLeft, + child: Text( + "前进麦味·天然烘焙(凯德1818店)", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14, + color: Color(0xFF353535), + ), + ), + ), + flex: 1, + ), + Padding( + padding: EdgeInsets.only(top: 12, right: 12), + child: Text( S.of(context).yiwancheng, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff32A060))), + ), + ], + ), + Container( + margin: EdgeInsets.only(left: 37), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + S.of(context).xiadanshijian_("2020.01.20~2020.1.21"), + style: TextStyle( + fontSize: 10, + color: Color(0xFF727272), + ), + ), + SizedBox( + height: 8, + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.network( + "https://t7.baidu.com/it/u=1348120667,563487140&fm=193&f=GIF", + width: 75, + height: 75, + fit: BoxFit.contain, + ), + SizedBox( + height: 4, + ), + Text( + "桑葚椰汁水果茶", + style: TextStyle( + fontSize: 10, + color: Color(0xFF353535), + ), + ), + ], + ), + ], + ), + Padding( + padding: EdgeInsets.only(right: 22), + child: Image.asset( + "assets/image/icon_more.png", + fit: BoxFit.fill, + alignment: Alignment.centerRight, + width: 24, + height: 24, + ), + ) + ], + ), + ), + SizedBox( + height: 12, + ), + Container( + margin: EdgeInsets.only(right: 12, bottom: 12), + child: Directionality( + textDirection: TextDirection.rtl, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text.rich(TextSpan(children: [ + TextSpan( + text: "合计:", + style: TextStyle( + fontSize: 12, + color: Color(0xFF868686), + ), + ), + TextSpan( + text: S.of(context).yuan("58.2"), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ])), + SizedBox( + width: 4, + ), + Text.rich(TextSpan(children: [ + TextSpan( + text: "共", + style: TextStyle( + fontSize: 12, + color: Color(0xFF868686), + ), + ), + TextSpan( + text: "5", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + TextSpan( + text: "件", + style: TextStyle( + fontSize: 12, + color: Color(0xFF868686), + ), + ), + ])), + ], + ), + SizedBox( + height: 8, + ), + Row( + children: [ + RoundButton( + text: "再来一单", + textColor: Colors.white, + fontSize: 12, + backgroup: Color(0xFF32A060), + radius: 2, + padding: EdgeInsets.fromLTRB(17, 4, 17, 4), + ), + Container( + width: 72, + height: 24, + margin: EdgeInsets.only(right: 10), + child: TextButton( + onPressed: () {}, + style: ButtonStyle( + padding: + MaterialStateProperty.all(EdgeInsets.zero), + side: MaterialStateProperty.all( + BorderSide( + color: Color(0xff32A060), width: 0.5), + ), + ), + child: Text( + "删除一单", + style: TextStyle( + color: Color(0xff32A060), fontSize: 12), + ), + ), + ), + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.only(left: 37), + alignment: Alignment.centerLeft, + child: Text( + "取单号 201", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: Colors.black), + ), + ), + ), + ], + ), + ], + )), + ), + ], + ), + ); + } +} diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 8805d92d..3b4a5bf5 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -465,4 +465,6 @@ class _OrderHistoryList extends State { ), ); } + + } diff --git a/lib/view_widget/coupon_widget.dart b/lib/view_widget/coupon_widget.dart index 29735322..9a16f4a1 100644 --- a/lib/view_widget/coupon_widget.dart +++ b/lib/view_widget/coupon_widget.dart @@ -216,6 +216,227 @@ class CouponWidget extends StatelessWidget { ), ), ); + return Container( + margin: EdgeInsets.fromLTRB(14, 6, 14, 6), + child: AspectRatio( + aspectRatio: 2.485, + child: Stack( + children: [ + Image.asset( + "assets/image/ic_coupon_bg.png", + fit: BoxFit.cover, + width: double.infinity, + height: double.infinity, + ), + // if (coupon.status == 3) + // Positioned( + // top: 10, + // right: 0, + // child: Transform.rotate( + // angle: pi / 5.0, + // child: Text( + // S.of(context).yishijiao, //已失效 + // style: TextStyle( + // fontSize: 8, + // color: Color(0xFF353535), + // ), + // ), + // ), + // ), + Opacity( + opacity: coupon.status != 3 ? 1 : 0.54, + child: Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + flex: 7, + child: Container( + padding: EdgeInsets.only(top: 18, bottom: 20), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 20), + child: Image.network( + (coupon == null || + coupon.couponImg == null || + coupon.couponImg == "") + ? "" + : coupon.couponImg, + width: 60, + height: 60, + fit: BoxFit.cover, + errorBuilder: (context, error, e) { + return Column( + children: [ + Row( + children: [ + Text("¥",style: TextStyle( + fontSize: 22,color: Color(0xff32A060) + ),), + SizedBox(width: 5,), + Text("5",style: TextStyle( + fontSize: 40,fontWeight: FontWeight.bold,color: Color(0xff32A060) + ),), + ], + ), + Text(S.of(context).manyuankeyong(30), + style: TextStyle(fontSize: 12,fontWeight: FontWeight.bold,color:Color(0xff32A060))), + ], + ); + }, + ), + ), + Expanded( + flex: 1, + child: Container( + height: 60, + margin: EdgeInsets.only(left: 12), + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(right: 15), + child: Row( + children: [ + Expanded( + flex: 1, + child: Text( + coupon.couponName ?? "", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14, + color: Color(0xFF353535), + ), + ), + ), + (coupon.status == 0) + ? Row( + children: [ + RoundButton( + width: 42, + height: 21, + text: + S.of(context).lingqu, + textColor: Colors.white, + fontSize: 12, + padding: EdgeInsets.only( + top: 2, + bottom: 2, + left: 8, + right: 8), + backgroup: + Color(0xff32A060), + callback: () { + showAlertDialog( + context); + }, + ), + ], + ) + : (coupon.status == 1) + ? Row( + children: [ + Text( + S + .of(context) + .qushiyong, + style: TextStyle( + color: Color( + 0xFF32A060), + fontSize: 12, + ), + ), + Icon( + Icons + .keyboard_arrow_right, + size: 16, + color: + Color(0xFF32A060), + ) + ], + ) + : Container(), + ], + ), + ), + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.only(right: 37), + alignment: Alignment.centerLeft, + child: Text( + coupon.couponDescription ?? "", + style: TextStyle( + fontSize: 10, + color: Color(0xFF4C4C4C), + ), + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 23, right: 23), + child: MySeparator( + width: 5, + height: 1, + color: Color(0xFF353535), + ), + ), + // Expanded( + // flex: 3, + // child: Container( + // padding: EdgeInsets.only(left: 20), + // alignment: Alignment.centerLeft, + // child: Text( + // coupon.status == 0 + // ? S.of(context).faxingshijian(coupon.publishStartTime) + // : coupon.status == 1 + // ? S.of(context).lingqushijian(coupon.receiveTime) + // : S.of(context).shiyongriqi(coupon.useTime), + // style: TextStyle( + // color: Color(0xFF727272), + // fontSize: 10, + // ), + // ), + // ), + // ), + Expanded( + flex: 3, + child: Container( + padding: EdgeInsets.only(left: 20), + alignment: Alignment.centerLeft, + child: Row( + children: [ + Text( + S.of(context).shiyongriqi(coupon.useTime), + style: TextStyle( + color: Color(0xFF727272), + fontSize: 10, + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ); } showAlertDialog(BuildContext context) { diff --git a/pubspec.lock b/pubspec.lock index 67d02c20..d27cc911 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -50,13 +50,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.6.1" - azlistview: - dependency: "direct main" - description: - name: azlistview - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.1" boolean_selector: dependency: transitive description: @@ -154,7 +147,14 @@ packages: name: chewie url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.2" + version: "0.12.2" + chewie_audio: + dependency: transitive + description: + name: chewie_audio + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.2" cli_util: dependency: transitive description: @@ -197,6 +197,20 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.0.1" + css_colors: + dependency: transitive + description: + name: css_colors + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.16.2" cupertino_icons: dependency: "direct main" description: @@ -251,6 +265,20 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_html: + dependency: "direct main" + description: + name: flutter_html + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" + flutter_layout_grid: + dependency: transitive + description: + name: flutter_layout_grid + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.5" flutter_localizations: dependency: "direct main" description: flutter @@ -277,6 +305,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.4.0" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.20.0-nullsafety.3" flutter_swiper_null_safety: dependency: "direct main" description: @@ -315,6 +350,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" + html: + dependency: transitive + description: + name: html + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.14.0+4" http: dependency: transitive description: @@ -364,6 +406,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.1.6" + import_js_library: + dependency: transitive + description: + name: import_js_library + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.2" intl: dependency: "direct main" description: @@ -434,13 +483,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.0" package_config: dependency: transitive description: @@ -455,6 +497,20 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.8.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.5.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.1" path_provider_linux: dependency: transitive description: @@ -497,6 +553,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.0" platform: dependency: transitive description: @@ -525,13 +588,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.2.1" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.flutter-io.cn" - source: hosted - version: "5.0.0" pub_semver: dependency: transitive description: @@ -581,13 +637,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.26.0" - scrollable_positioned_list: - dependency: transitive - description: - name: scrollable_positioned_list - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.10" shared_preferences: dependency: "direct main" description: @@ -739,56 +788,42 @@ packages: name: video_player url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.6" + version: "1.0.1" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "4.1.0" + version: "2.2.0" video_player_web: dependency: transitive description: name: video_player_web url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.1" + version: "0.1.4+1" wakelock: dependency: transitive description: name: wakelock url: "https://pub.flutter-io.cn" source: hosted - version: "0.5.2" - wakelock_macos: - dependency: transitive - description: - name: wakelock_macos - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.0+1" + version: "0.2.1+1" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.1+1" + version: "0.1.0+1" wakelock_web: dependency: transitive description: name: wakelock_web url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.0+1" - wakelock_windows: - dependency: transitive - description: - name: wakelock_windows - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.0" + version: "0.1.0+3" watcher: dependency: transitive description: @@ -804,12 +839,12 @@ packages: source: hosted version: "1.2.0" webview_flutter: - dependency: "direct main" + dependency: transitive description: name: webview_flutter url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.9" + version: "1.0.7" win32: dependency: transitive description: @@ -824,6 +859,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.1.2" yaml: dependency: transitive description: