diff --git a/assets/image/2x/qr_share_bg_yq.png b/assets/image/2x/qr_share_bg_yq.png new file mode 100644 index 00000000..1049d60b Binary files /dev/null and b/assets/image/2x/qr_share_bg_yq.png differ diff --git a/assets/image/2x/share_image_bg_yq.png b/assets/image/2x/share_image_bg_yq.png new file mode 100644 index 00000000..607e35fb Binary files /dev/null and b/assets/image/2x/share_image_bg_yq.png differ diff --git a/assets/image/2x/yq.png b/assets/image/2x/yq.png new file mode 100644 index 00000000..2f25e3e2 Binary files /dev/null and b/assets/image/2x/yq.png differ diff --git a/assets/image/2x/yq_qx.png b/assets/image/2x/yq_qx.png new file mode 100644 index 00000000..d40fd34b Binary files /dev/null and b/assets/image/2x/yq_qx.png differ diff --git a/assets/image/3x/qr_share_bg_yq.png b/assets/image/3x/qr_share_bg_yq.png new file mode 100644 index 00000000..9c8a992d Binary files /dev/null and b/assets/image/3x/qr_share_bg_yq.png differ diff --git a/assets/image/3x/share_image_bg_yq.png b/assets/image/3x/share_image_bg_yq.png new file mode 100644 index 00000000..5cc73373 Binary files /dev/null and b/assets/image/3x/share_image_bg_yq.png differ diff --git a/assets/image/3x/yq.png b/assets/image/3x/yq.png new file mode 100644 index 00000000..d46dd544 Binary files /dev/null and b/assets/image/3x/yq.png differ diff --git a/assets/image/3x/yq_qx.png b/assets/image/3x/yq_qx.png new file mode 100644 index 00000000..5d29cf22 Binary files /dev/null and b/assets/image/3x/yq_qx.png differ diff --git a/assets/image/qr_share_bg_yq.png b/assets/image/qr_share_bg_yq.png new file mode 100644 index 00000000..ddf803ac Binary files /dev/null and b/assets/image/qr_share_bg_yq.png differ diff --git a/assets/image/share_image_bg_yq.png b/assets/image/share_image_bg_yq.png new file mode 100644 index 00000000..fbc28f83 Binary files /dev/null and b/assets/image/share_image_bg_yq.png differ diff --git a/assets/image/yq.png b/assets/image/yq.png new file mode 100644 index 00000000..dbbd30c9 Binary files /dev/null and b/assets/image/yq.png differ diff --git a/assets/image/yq_qx.png b/assets/image/yq_qx.png new file mode 100644 index 00000000..52378b57 Binary files /dev/null and b/assets/image/yq_qx.png differ diff --git a/lib/community/headlines/article_list.dart b/lib/community/headlines/article_list.dart index 8560deac..f9e733b9 100644 --- a/lib/community/headlines/article_list.dart +++ b/lib/community/headlines/article_list.dart @@ -57,7 +57,7 @@ class _ArticleList extends State<ArticleList> { maxLines: 2, style: TextStyle( fontSize: 15.sp, - fontWeight: MyFontWeight.medium, + fontWeight: MyFontWeight.semi_bold, color: Colors.black, ), )), @@ -91,75 +91,78 @@ class _ArticleList extends State<ArticleList> { margin: EdgeInsets.only(bottom: 12), color: Colors.white, child:Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Text( - widget?.articles[position]?.mainTitle ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Colors.black, + Expanded(child: Container( + height: 96, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text( + widget?.articles[position]?.mainTitle ?? "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Colors.black, + ), ), - ), - SizedBox(height:5), - Text( - widget?.articles[position]?.viceTitle ?? "", - // overflow: TextOverflow.ellipsis, - // maxLines: 1, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF353535), + Text( + widget?.articles[position]?.viceTitle ?? "", + // overflow: TextOverflow.ellipsis, + // maxLines: 1, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF353535), + ), ), - ), - SizedBox(height: 10), - Row( - children: [ - Text( - (widget.articles[position] != null && - widget.articles[position].author != null) - ? widget.articles[position].author.name - : "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF8E8E8E), + // SizedBox(height: 20), + Row( + children: [ + Text( + (widget.articles[position] != null && + widget.articles[position].author != null) + ? widget.articles[position].author.name + : "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF8E8E8E), + ), ), - ), - SizedBox(width:8), - Image.asset( - "assets/image/browse.png", - width: 14, - height: 14, - color: Color(0xFF808080), - ), - Expanded(child: Text( - "${widget?.articles[position]?.viewers}" - ?? "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), + SizedBox(width:8), + Image.asset( + "assets/image/browse.png", + width: 14, + height: 14, + color: Color(0xFF808080), ), - )), - Text( - widget?.articles[position]?.createTime?.split(" ")[0] - ?? "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), + Expanded(child: Text( + "${widget?.articles[position]?.viewers}" + ?? "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), + )), + Text( + widget?.articles[position]?.createTime?.split(" ")[0] + ?? "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), ), - ), - ], - ), - ], - ),), + ], + ), + ], + ),)), SizedBox(width:12), MImage( widget?.articles[position]?.coverImg ?? "", diff --git a/lib/community/headlines/headlines_collection.dart b/lib/community/headlines/headlines_collection.dart index c14f1bbd..f5041e40 100644 --- a/lib/community/headlines/headlines_collection.dart +++ b/lib/community/headlines/headlines_collection.dart @@ -36,7 +36,7 @@ class _HeadlinesCollection extends State<HeadlinesCollection> { @override Widget build(BuildContext context) { return Container( - height: 100, + height: 60.h, margin: EdgeInsets.only(top:10), child: ListView.builder( scrollDirection: Axis.horizontal, @@ -61,7 +61,7 @@ class _HeadlinesCollection extends State<HeadlinesCollection> { Widget headlinesCollectionItem(HeadlinesList headlines) { return Container( width: 225.w, - height:110.h, + height:60.h, decoration: BoxDecoration( borderRadius: BorderRadius.circular(4), boxShadow: [ @@ -85,7 +85,7 @@ class _HeadlinesCollection extends State<HeadlinesCollection> { child: MImage( headlines?.coverImg ?? "", width: 225.w, - height: 110.h, + height: 60.h, fit: BoxFit.fill, errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", @@ -96,11 +96,12 @@ class _HeadlinesCollection extends State<HeadlinesCollection> { ), ), Container( - padding: EdgeInsets.all(12), - child: Column(children: [ + padding: EdgeInsets.only(left:12.w,right: 12.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ Expanded(child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Container( margin: EdgeInsets.only(right:4), @@ -132,31 +133,31 @@ class _HeadlinesCollection extends State<HeadlinesCollection> { ), ),), ],)), - Row( - children: [ - Expanded(child:Text( - "更新3篇", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Colors.white, - ), - )), - Text( - "查看专栏", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ), - SizedBox(width: 2), - Image.asset( - "assets/image/t_right.png", - width: 14, - height: 14, - ), - ],), + // Row( + // children: [ + // Expanded(child:Text( + // "更新3篇", + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.medium, + // color: Colors.white, + // ), + // )), + // Text( + // "查看专栏", + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.regular, + // color: Colors.white, + // ), + // ), + // SizedBox(width: 2), + // Image.asset( + // "assets/image/t_right.png", + // width: 14, + // height: 14, + // ), + // ],), ],), ), ], diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index ef4445db..5a592d26 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "baocun" : MessageLookupByLibrary.simpleMessage("保存"), "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), + "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), "beizhu" : MessageLookupByLibrary.simpleMessage("备注"), "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("备注信息"), "bianjidizhi" : MessageLookupByLibrary.simpleMessage("编辑地址"), @@ -213,6 +214,7 @@ class MessageLookup extends MessageLookupByLibrary { "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), + "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。"), "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手机号"), "ge" : m5, @@ -238,6 +240,7 @@ class MessageLookup extends MessageLookupByLibrary { "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友奖励规则"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), @@ -269,8 +272,10 @@ class MessageLookup extends MessageLookupByLibrary { "huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"), "input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"), "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), + "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"), "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀请码输入错误"), "jiajifen" : m11, "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiangli" : MessageLookupByLibrary.simpleMessage("奖励"), @@ -385,6 +390,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("请输入充值金额"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("请输入验证码"), + "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("请输入邀请码"), "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("请输入支付密码"), "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), @@ -534,6 +540,8 @@ class MessageLookup extends MessageLookupByLibrary { "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"), "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀请码"), + "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀请码"), "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流单号:"), "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), @@ -564,6 +572,7 @@ class MessageLookup extends MessageLookupByLibrary { "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), "xuni" : MessageLookupByLibrary.simpleMessage("虚拟"), "yaoqingrenshoujihao_" : m32, + "yaoqingwancheng" : MessageLookupByLibrary.simpleMessage("邀请完成"), "yibangfuka" : MessageLookupByLibrary.simpleMessage("已绑副卡"), "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"), "yiduihuanjian" : m33, diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 86c7b3f9..db0fc204 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "baocun" : MessageLookupByLibrary.simpleMessage("保存"), "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), + "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), "beizhu" : MessageLookupByLibrary.simpleMessage("备注"), "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("备注信息"), "bianjidizhi" : MessageLookupByLibrary.simpleMessage("编辑地址"), @@ -213,6 +214,7 @@ class MessageLookup extends MessageLookupByLibrary { "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), + "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。"), "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手机号"), "ge" : m5, @@ -237,6 +239,7 @@ class MessageLookup extends MessageLookupByLibrary { "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友奖励规则"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), @@ -267,8 +270,10 @@ class MessageLookup extends MessageLookupByLibrary { "huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"), "input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"), "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), + "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"), "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀请码输入错误"), "jiajifen" : m11, "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiangli" : MessageLookupByLibrary.simpleMessage("奖励"), @@ -383,6 +388,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("请输入充值金额"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("请输入验证码"), + "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("请输入邀请码"), "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("请输入支付密码"), "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), @@ -532,6 +538,8 @@ class MessageLookup extends MessageLookupByLibrary { "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"), "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀请码"), + "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀请码"), "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流单号:"), "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index beb46271..d6ac4727 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "baocun" : MessageLookupByLibrary.simpleMessage("保存"), "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), + "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), "beizhu" : MessageLookupByLibrary.simpleMessage("备注"), "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("备注信息"), "bianjidizhi" : MessageLookupByLibrary.simpleMessage("编辑地址"), @@ -213,6 +214,7 @@ class MessageLookup extends MessageLookupByLibrary { "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), + "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。"), "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手机号"), "ge" : m5, @@ -237,6 +239,7 @@ class MessageLookup extends MessageLookupByLibrary { "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友奖励规则"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), @@ -267,8 +270,10 @@ class MessageLookup extends MessageLookupByLibrary { "huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"), "input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"), "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), + "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"), "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀请码输入错误"), "jiajifen" : m11, "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiangli" : MessageLookupByLibrary.simpleMessage("奖励"), @@ -383,6 +388,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("请输入充值金额"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("请输入验证码"), + "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("请输入邀请码"), "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("请输入支付密码"), "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), @@ -532,6 +538,8 @@ class MessageLookup extends MessageLookupByLibrary { "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"), "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀请码"), + "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀请码"), "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流单号:"), "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 5cbc21e4..bee1d745 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "baocun" : MessageLookupByLibrary.simpleMessage("保存"), "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二維碼,邀請他人微信掃一掃識別,長按關注後,完成小遊戲,領取優惠券後,即邀請成功哦!"), + "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張"), "beizhu" : MessageLookupByLibrary.simpleMessage("備注"), "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("備注信息"), "bianjidizhi" : MessageLookupByLibrary.simpleMessage("編輯地址"), @@ -213,6 +214,7 @@ class MessageLookup extends MessageLookupByLibrary { "fensi" : MessageLookupByLibrary.simpleMessage("粉絲"), "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接點擊右上方的分享給到你想要邀請的人。"), + "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。"), "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手機號"), "ge" : m5, @@ -237,6 +239,7 @@ class MessageLookup extends MessageLookupByLibrary { "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友獎勵規則"), "heji" : MessageLookupByLibrary.simpleMessage("合計:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核銷成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核銷碼詳情"), @@ -267,8 +270,10 @@ class MessageLookup extends MessageLookupByLibrary { "huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"), "input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"), "input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"), "input_phone" : MessageLookupByLibrary.simpleMessage("輸入手機號"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), + "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀請碼輸入錯誤"), "jiajifen" : m11, "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiangli" : MessageLookupByLibrary.simpleMessage("獎勵"), @@ -383,6 +388,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("請輸入充值金額"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("請輸入手機號碼"), "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("請輸入邀請碼"), "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("請輸入您的有效手機號"), "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("請輸入支付密碼"), "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("請填寫收件人手機號"), @@ -531,6 +537,8 @@ class MessageLookup extends MessageLookupByLibrary { "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的錢包"), "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀請碼"), + "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀請碼"), "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流單號:"), "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index b17142c0..648d13d1 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "baocun" : MessageLookupByLibrary.simpleMessage("保存"), "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二維碼,邀請他人微信掃一掃識別,長按關注後,完成小遊戲,領取優惠券後,即邀請成功哦!"), + "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張"), "beizhu" : MessageLookupByLibrary.simpleMessage("備注"), "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("備注信息"), "bianjidizhi" : MessageLookupByLibrary.simpleMessage("編輯地址"), @@ -213,6 +214,7 @@ class MessageLookup extends MessageLookupByLibrary { "fensi" : MessageLookupByLibrary.simpleMessage("粉絲"), "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接點擊右上方的分享給到你想要邀請的人。"), + "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。"), "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手機號"), "ge" : m5, @@ -237,6 +239,7 @@ class MessageLookup extends MessageLookupByLibrary { "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友獎勵規則"), "heji" : MessageLookupByLibrary.simpleMessage("合計:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核銷成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核銷碼詳情"), @@ -267,8 +270,10 @@ class MessageLookup extends MessageLookupByLibrary { "huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"), "input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"), "input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"), "input_phone" : MessageLookupByLibrary.simpleMessage("輸入手機號"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), + "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀請碼輸入錯誤"), "jiajifen" : m11, "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiangli" : MessageLookupByLibrary.simpleMessage("獎勵"), @@ -383,6 +388,7 @@ class MessageLookup extends MessageLookupByLibrary { "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("請輸入充值金額"), "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("請輸入手機號碼"), "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("請輸入邀請碼"), "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("請輸入您的有效手機號"), "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("請輸入支付密碼"), "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("請填寫收件人手機號"), @@ -532,6 +538,8 @@ class MessageLookup extends MessageLookupByLibrary { "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的錢包"), "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀請碼"), + "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀請碼"), "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流單號:"), "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index ace97d9c..764438ba 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -5535,6 +5535,96 @@ class S { ); } + /// `我的邀请码` + String get wodeyaoqingma { + return Intl.message( + '我的邀请码', + name: 'wodeyaoqingma', + desc: '', + args: [], + ); + } + + /// `好友奖励规则` + String get haoyoujiangliguize { + return Intl.message( + '好友奖励规则', + name: 'haoyoujiangliguize', + desc: '', + args: [], + ); + } + + /// `每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张` + String get beiyaoqingdejiangli { + return Intl.message( + '每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张', + name: 'beiyaoqingdejiangli', + desc: '', + args: [], + ); + } + + /// `将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。` + String get fenxiangyaoqingma { + return Intl.message( + '将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。', + name: 'fenxiangyaoqingma', + desc: '', + args: [], + ); + } + + /// `我有邀请码` + String get woyouyaoqingma { + return Intl.message( + '我有邀请码', + name: 'woyouyaoqingma', + desc: '', + args: [], + ); + } + + /// `填写邀请码` + String get input_invite_code_hide { + return Intl.message( + '填写邀请码', + name: 'input_invite_code_hide', + desc: '', + args: [], + ); + } + + /// `请输入邀请码` + String get qingshuruyaoqingma { + return Intl.message( + '请输入邀请码', + name: 'qingshuruyaoqingma', + desc: '', + args: [], + ); + } + + /// `邀请码输入错误` + String get invite_code_error { + return Intl.message( + '邀请码输入错误', + name: 'invite_code_error', + desc: '', + args: [], + ); + } + + /// `邀请完成` + String get yaoqingwancheng { + return Intl.message( + '邀请完成', + name: 'yaoqingwancheng', + desc: '', + args: [], + ); + } + /// `并使用本机号码登录` String get privacy_policy4 { return Intl.message( diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index e5e45460..a73b5a5c 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -24,6 +24,7 @@ import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/view_widget/classic_header.dart'; +import 'package:huixiang/view_widget/invite_success_dialog.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/request_permission.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -35,8 +36,9 @@ import 'home_view/shortcut_operation.dart'; class HomePage extends StatefulWidget { final Function changeTab; + final String invite; - HomePage(this.changeTab); + HomePage(this.changeTab, {this.invite}); @override State<StatefulWidget> createState() { @@ -56,12 +58,27 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin { setState(() {}); } }); + + if((widget.invite??"") != "") + showInvite = true; + } + + ///邀请成功弹窗 + inviteShowAlertDialog(invite) { + //显示对话框 + showDialog( + context: context, + builder: (BuildContext context) { + return InviteSuccessDialog(invite); + }, + ); } final SwiperController controller = SwiperController(); String categoryId; int pageNum = 1; + bool showInvite = false; //排序类型枚举:1-自然排序,2-销量,3-价格 int orderType = 1; @@ -194,6 +211,11 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin { refreshController.refreshFailed(); } EasyLoading.dismiss(); + if(showInvite){ + inviteShowAlertDialog(widget.invite); + showInvite = false; + } + } @override diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index af4bf910..331b3524 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -574,6 +574,16 @@ "chakanhexiaoma": "查看核销码", "chakanwuliu": "查看物流", "dangqianzhukadengji": "当前主卡等级", + "wodeyaoqingma": "我的邀请码", + "haoyoujiangliguize": "好友奖励规则", + "beiyaoqingdejiangli": "每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张", + "fenxiangyaoqingma": "将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。", + "woyouyaoqingma": "我有邀请码", + "input_invite_code_hide": "填写邀请码", + "qingshuruyaoqingma": "请输入邀请码", + "invite_code_error": "邀请码输入错误", + "yaoqingwancheng": "邀请完成", + diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 461bca21..490eb5f2 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -572,6 +572,14 @@ "chakanhexiaoma": "查看核销码", "chakanwuliu": "查看物流", "dangqianzhukadengji": "当前主卡等级", + "wodeyaoqingma": "我的邀请码", + "haoyoujiangliguize": "好友奖励规则", + "beiyaoqingdejiangli": "每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张", + "fenxiangyaoqingma": "将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。", + "woyouyaoqingma": "我有邀请码", + "input_invite_code_hide": "填写邀请码", + "qingshuruyaoqingma": "请输入邀请码", + "invite_code_error": "邀请码输入错误", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index e098d2c7..e2f839de 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -572,7 +572,14 @@ "chakanhexiaoma": "查看核销码", "chakanwuliu": "查看物流", "dangqianzhukadengji": "当前主卡等级", - + "wodeyaoqingma": "我的邀请码", + "haoyoujiangliguize": "好友奖励规则", + "beiyaoqingdejiangli": "每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张", + "fenxiangyaoqingma": "将邀请码分享给好友,对方在一心回乡App登录页输入邀请码,即可邀请成功。", + "woyouyaoqingma": "我有邀请码", + "input_invite_code_hide": "填写邀请码", + "qingshuruyaoqingma": "请输入邀请码", + "invite_code_error": "邀请码输入错误", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index fd6171b0..70b8b897 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -566,7 +566,14 @@ "chakanhexiaoma": "查看核銷碼", "chakanwuliu": "查看物流", "dangqianzhukadengji": "當前主卡等級", - + "wodeyaoqingma": "我的邀請碼", + "haoyoujiangliguize": "好友獎勵規則", + "beiyaoqingdejiangli": "每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張", + "fenxiangyaoqingma": "將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。", + "woyouyaoqingma": "我有邀請碼", + "input_invite_code_hide": "填寫邀請碼", + "qingshuruyaoqingma": "請輸入邀請碼", + "invite_code_error": "邀請碼輸入錯誤", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 111be521..23b17805 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -566,6 +566,14 @@ "chakanhexiaoma": "查看核銷碼", "chakanwuliu": "查看物流", "dangqianzhukadengji": "當前主卡等級", + "wodeyaoqingma": "我的邀請碼", + "haoyoujiangliguize": "好友獎勵規則", + "beiyaoqingdejiangli": "每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張", + "fenxiangyaoqingma": "將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。", + "woyouyaoqingma": "我有邀請碼", + "input_invite_code_hide": "填寫邀請碼", + "qingshuruyaoqingma": "請輸入邀請碼", + "invite_code_error": "邀請碼輸入錯誤", diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index d4c9503a..6770a2ff 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -18,6 +18,7 @@ import 'package:flutter/services.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dio/dio.dart'; +import 'package:huixiang/view_widget/invite_success_dialog.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:photo_view/photo_view.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -36,14 +37,17 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { var checkStatus = false; var mobileStatus = 0; var verifyStatus = 0; + var invitationCodeStatus = 0; var mobileErrorText = ""; var codeErrorText = ""; + var invitationErrorText = ""; var btnText = S.current.send_code; // var _controllerPhone = TextEditingController(text: "13800138000"); // var _controllerCode = TextEditingController(text: "888888"); var _controllerPhone = TextEditingController(); var _controllerCode = TextEditingController(); + var _controllerInviteCode = TextEditingController(); var _sendCodeStatus = 0; GlobalKey loginKey = GlobalKey(); @@ -55,6 +59,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { int changeAlpha = 0; Animation<Alignment> animation; Animation<double> doubleAnimation; + bool invitationCode = true; + isLogin() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); @@ -170,6 +176,24 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { statusCodeVisible = false; } }); + + _controllerInviteCode.addListener(() { + if (_controllerInviteCode.text != null && _controllerInviteCode.text != "") { + if (isPhone(_controllerInviteCode.text)) { + statusInviteTextColor = Color(0xFF353535); + statusInviteLineColor = Color(0xFF32A060); + statusInviteVisible = false; + } else { + statusInviteTextColor = Color(0xFFF72626); + statusInviteLineColor = Color(0xFFF72626); + statusInviteVisible = true; + } + } else { + statusInviteTextColor = Color(0xFF353535); + statusInviteLineColor = Color(0xFF32A060); + statusInviteVisible = false; + } + }); } bool statusPhoneVisible = false; @@ -180,6 +204,11 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { Color statusCodeTextColor = Color(0xFF353535); Color statusCodeLineColor = Color(0xFF32A060); + bool statusInviteVisible = false; + Color statusInviteTextColor = Color(0xFF353535); + Color statusInviteLineColor = Color(0xFF32A060); + + _sendCode() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || @@ -278,6 +307,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { setState(() {}); return; } + var code = _controllerCode.text; if (code == "") { verifyStatus = 2; @@ -291,9 +321,12 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { setState(() {}); return; } + + var invite = _controllerInviteCode.text; var param = { "capcha": code, "mobile": mobile, + "invite":invite, }; EasyLoading.show(status: S.of(context).zhengzaijiazai); BaseData value = await client.memberLogin(param).catchError((error) { @@ -308,12 +341,11 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { Navigator.of(context).pushNamedAndRemoveUntil( '/router/main_page', - (route) => false, - ); + (route) => false,arguments:{"invite":invite}); EasyLoading.dismiss(); } else { - SmartDialog.showToast("${value.msg}", alignment: Alignment.center); + SmartDialog.showToast("${value?.msg ??""}", alignment: Alignment.center); } }); } @@ -682,7 +714,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { Container( height: 40.h, width: MediaQuery.of(context).size.width - 80.h, - margin: EdgeInsets.only(top: 12.h), + // margin: EdgeInsets.only(top: 12.h), child: TextField( style: TextStyle( height: 1.h, @@ -726,7 +758,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { color: statusPhoneLineColor, ), SizedBox( - height: 35.h, + height: 25.h, child: Visibility( visible: statusPhoneVisible, child: Text( @@ -748,7 +780,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { ), Container( height: 40.h, - margin: EdgeInsets.only(top: 12.h), + // margin: EdgeInsets.only(top: 12.h), width: MediaQuery.of(context).size.width - 80.h, child: Row( mainAxisAlignment: MainAxisAlignment.end, @@ -850,6 +882,112 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { ), ), ), + SizedBox( + height:25.h, + child: Visibility( + visible: statusPhoneVisible, + child: Text( + S.of(context).phone_error, + style: TextStyle( + color: Color(0xFFF72626), + fontSize: 12.sp, + ), + ), + ), + ), + GestureDetector( + onTap: (){ + setState(() { + invitationCode = false; + }); + }, + child: + invitationCode ? + Container(child: + Column(children: [ + Text( + S.of(context).woyouyaoqingma, + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + Container( + width: 56.w, + height: 0.5, + color: Colors.black, + ), + ],),):Container(child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + S.of(context).input_invite_code_hide, + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + Container( + height: 40.h, + width: MediaQuery.of(context).size.width - 80.h, + child: TextField( + style: TextStyle( + height: 1.h, + fontSize: 16.sp, + color: statusInviteTextColor, + ), + onChanged: (value) { + if (value != null && value.isNotEmpty) { + if (isPhone(value)) { + invitationCodeStatus = 1; + } else { + invitationCodeStatus = 2; + } + } else { + invitationCodeStatus = 0; + } + setState(() {}); + }, + controller: _controllerInviteCode, + keyboardType: TextInputType.phone, + decoration: InputDecoration( + errorBorder: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + hintText: "", + // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), + hintStyle: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), + ), + textInputAction: TextInputAction.next, + inputFormatters: [LengthLimitingTextInputFormatter(11)], + cursorColor: Colors.grey, + maxLines: 1, + ), + ), + Container( + height: 1.h, + width: MediaQuery.of(context).size.width - 80.h, + color: statusInviteLineColor, + margin: EdgeInsets.only(bottom: 10.h), + ), + Visibility( + visible: statusInviteVisible, + child: Text( + S.of(context).invite_code_error, + style: TextStyle( + color: Color(0xFFF72626), + fontSize: 12.sp, + ), + ), + ), + ], + ),), + ), Expanded( flex: 1, child: Container( diff --git a/lib/main.dart b/lib/main.dart index c5af21f7..21e64be9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -318,7 +318,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{ '/router/guide_Page': (context, {arguments}) => GuidePage(), '/router/about_page': (context, {arguments}) => AboutPage(), '/router/qr_share': (context, {arguments}) => QrSharePage(), - '/router/main_page': (context, {arguments}) => MainPage(), + '/router/main_page': (context, {arguments}) => MainPage(arguments: arguments), '/router/test_page': (context, {arguments}) => TestPage(), '/router/communityFollow': (context, {arguments}) => CommunityFollow(), '/router/releasePage': (context, {arguments}) => ReleasePage(), diff --git a/lib/main_page.dart b/lib/main_page.dart index 24ffd0cf..d052c7de 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -18,11 +18,16 @@ import 'package:huixiang/utils/bridge.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/native_event_handler.dart'; +import 'package:huixiang/view_widget/invite_success_dialog.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; class MainPage extends StatefulWidget { + final Map<String, dynamic> arguments; + + MainPage({this.arguments}); + @override State<StatefulWidget> createState() { return _MainPage(); @@ -76,13 +81,18 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver { pushRoute(); + String invite = ""; + + if(widget.arguments != null && (widget.arguments["invite"]??"") != ""){ + invite = widget.arguments["invite"]; + } _widgetOptions = <Widget>[ // BrandPage(), HomePage((index) { setState(() { pageController.jumpToPage(index); }); - }), + },invite:invite), // MainHomePage(), UnionPage(), CommunityPage(), @@ -357,6 +367,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver { ); } + // Widget bottomNavigationBigItem(text, index) { // var isSelected = index == clickIndex; // return Expanded( diff --git a/lib/mine/mine_vip/legal_right_details.dart b/lib/mine/mine_vip/legal_right_details.dart index 89fc8c3a..9f285d01 100644 --- a/lib/mine/mine_vip/legal_right_details.dart +++ b/lib/mine/mine_vip/legal_right_details.dart @@ -496,7 +496,7 @@ class _LegalRightDetails extends State<LegalRightDetails> { ], ), ), - if (!vipBenefitList.actived && !vipBenefitList.have) + if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), diff --git a/lib/mine/mine_vip/mine_vip_core.dart b/lib/mine/mine_vip/mine_vip_core.dart index da6fae11..5845f64b 100644 --- a/lib/mine/mine_vip/mine_vip_core.dart +++ b/lib/mine/mine_vip/mine_vip_core.dart @@ -643,7 +643,8 @@ class _MineVipCore extends State<MineVipCore> { alignment: Alignment.bottomCenter, children: [ MImage( - vipBenefitList?.icon ?? "", + (vipBenefitList.actived || (vipBenefitList.actived && vipBenefitList.have) ||(vipBenefitList.actived && !vipBenefitList.have))? + (vipBenefitList?.icon ?? ""):(vipBenefitList?.iconGrey ?? ""), width: 36, height: 36, // fit: BoxFit.cover, @@ -678,7 +679,7 @@ class _MineVipCore extends State<MineVipCore> { ], ), ), - if (!vipBenefitList.actived && !vipBenefitList.have) + if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), diff --git a/lib/qr/qr_share.dart b/lib/qr/qr_share.dart index f5949e4c..dbe08e23 100644 --- a/lib/qr/qr_share.dart +++ b/lib/qr/qr_share.dart @@ -79,7 +79,7 @@ class _QrSharePage extends State<QrSharePage> { children: [ Positioned( child: Image.asset( - "assets/image/qr_share_bg.png", + "assets/image/qr_share_bg_yq.png", fit: BoxFit.fill, ), top: 0, @@ -111,40 +111,55 @@ class _QrSharePage extends State<QrSharePage> { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ - shareTypeTitle(S.of(context).fangshiyi), + shareTypeTitle(S.of(context).wodeyaoqingma), Container( margin: EdgeInsets.only(left: 16.w, right: 24.w), child: Text( - S.of(context).baocunsaoma, + // S.of(context).baocunsaoma, + phone, textAlign: TextAlign.center, style: TextStyle( color: Color(0xFF2E3552), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, + fontSize: 40.sp, + fontWeight: MyFontWeight.semi_bold, ), ), ), + // Container( + // width: 152.w, + // height: 152.w, + // decoration: BoxDecoration( + // border: Border.all( + // color: Color(0xFF2E3552), + // width: 1, + // ), + // ), + // child: QrImage( + // data: "http://mp.hx.lotus-wallet.com/pages/invite/index?mobile=${phone ?? ""}", + // version: QrVersions.auto, + // size: 200.w, + // gapless: true, + // ), + // ), + shareTypeTitle(S.of(context).haoyoujiangliguize), Container( - width: 152.w, - height: 152.w, - decoration: BoxDecoration( - border: Border.all( + margin: EdgeInsets.only(left: 16.w, right: 24.w), + child: Text( + // S.of(context).fenxiangyaoqing, + S.of(context).fenxiangyaoqingma, + textAlign: TextAlign.center, + style: TextStyle( color: Color(0xFF2E3552), - width: 1, + fontSize: 16.sp, + fontWeight: MyFontWeight.regular, ), ), - child: QrImage( - data: "http://mp.hx.lotus-wallet.com/pages/invite/index?mobile=${phone ?? ""}", - version: QrVersions.auto, - size: 200.w, - gapless: true, - ), ), - shareTypeTitle(S.of(context).fangshier), Container( margin: EdgeInsets.only(left: 16.w, right: 24.w), child: Text( - S.of(context).fenxiangyaoqing, + // S.of(context).fenxiangyaoqing, + S.of(context).beiyaoqingdejiangli, textAlign: TextAlign.center, style: TextStyle( color: Color(0xFF2E3552), @@ -174,13 +189,13 @@ class _QrSharePage extends State<QrSharePage> { Widget shareTypeTitle(typeText) { return Container( - width: 90.w, + width: 140.w, height: 30.h, child: Text( typeText, style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 18.sp, + fontWeight: MyFontWeight.regular, + fontSize: 16.sp, color: Color(0xFF2E3552), ), ), @@ -199,7 +214,7 @@ class _QrSharePage extends State<QrSharePage> { double height; buildImageInfo() async { - image = Image.asset("assets/image/qr_share_bg.png"); + image = Image.asset("assets/image/qr_share_bg_yq.png"); image.image .resolve(ImageConfiguration()) .addListener(ImageStreamListener((ImageInfo info, bool _) { diff --git a/lib/qr/qr_share_image.dart b/lib/qr/qr_share_image.dart index 94f265e6..303e5a31 100644 --- a/lib/qr/qr_share_image.dart +++ b/lib/qr/qr_share_image.dart @@ -39,7 +39,7 @@ class _QrShareImagePage extends State<QrShareImagePage> { child: Column( children: [ Image.asset( - "assets/image/share_image_bg.png", + "assets/image/share_image_bg_yq.png", height: (MediaQuery.of(context).size.width * 0.8) * 0.47, width: (MediaQuery.of(context).size.width * 0.8), ), @@ -56,10 +56,11 @@ class _QrShareImagePage extends State<QrShareImagePage> { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: 206.w, + width:90.w, height: 30.h, child: Text( - S.of(context).yaoqingrenshoujihao_("${widget.mobile.substring(0, 3)}****${widget.mobile.substring(7, 11)}"), + // S.of(context).yaoqingrenshoujihao_("${widget.mobile.substring(0, 3)}****${widget.mobile.substring(7, 11)}"), + S.of(context).wodeyaoqingma, style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 12.sp, @@ -76,27 +77,62 @@ class _QrShareImagePage extends State<QrShareImagePage> { ), ), Container( - margin: EdgeInsets.symmetric(horizontal: 68.w), + margin: EdgeInsets.only(left: 16.w, right: 24.w), + child: Text( + // S.of(context).saomashibieguanzhugongzonghao, + widget.mobile, + textAlign: TextAlign.center, + style: TextStyle( + color: Color(0xFF2E3552), + fontSize:30.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + ), + // Container( + // margin: EdgeInsets.symmetric(horizontal: 68.w), + // decoration: BoxDecoration( + // border: Border.all( + // color: Color(0xFF2E3552), + // width: 1, + // ), + // ), + // child: AspectRatio( + // aspectRatio: 1, + // child: QrImage( + // data: "http://mp.hx.lotus-wallet.com/pages/invite/index?mobile=${widget.mobile ?? ""}", + // version: QrVersions.auto, + // size: 200.w, + // gapless: true, + // ), + // ), + // ), + Container( + width:140.w, + height: 30.h, + child: Text( + // S.of(context).yaoqingrenshoujihao_("${widget.mobile.substring(0, 3)}****${widget.mobile.substring(7, 11)}"), + S.of(context).haoyoujiangliguize, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 12.sp, + color: Color(0xFF2E3552), + ), + ), + alignment: Alignment.center, decoration: BoxDecoration( + color: Color(0xFFFFC93B), border: Border.all( color: Color(0xFF2E3552), width: 1, ), ), - child: AspectRatio( - aspectRatio: 1, - child: QrImage( - data: "http://mp.hx.lotus-wallet.com/pages/invite/index?mobile=${widget.mobile ?? ""}", - version: QrVersions.auto, - size: 200.w, - gapless: true, - ), - ), ), Container( margin: EdgeInsets.only(left: 16.w, right: 24.w), child: Text( - S.of(context).saomashibieguanzhugongzonghao, + // S.of(context).saomashibieguanzhugongzonghao, + S.of(context).beiyaoqingdejiangli, textAlign: TextAlign.center, style: TextStyle( color: Color(0xFF2E3552), @@ -163,7 +199,7 @@ class _QrShareImagePage extends State<QrShareImagePage> { RenderRepaintBoundary boundary = buildContext.findRenderObject(); ui.Image image = await boundary.toImage(pixelRatio: 3); ByteData byteData = - await image.toByteData(format: ui.ImageByteFormat.png); + await image.toByteData(format: ui.ImageByteFormat.png); String filePath = ""; if (Platform.isAndroid) { @@ -198,12 +234,12 @@ class _QrShareImagePage extends State<QrShareImagePage> { ); SharesdkPlugin.share(ShareSDKPlatforms.wechatSession, params, - (state, userData, contentEntity, error) { - print("share state !$state"); - print("share userData !$userData"); - print("share contentEntity !$contentEntity"); - print("share error !$error"); - }); + (state, userData, contentEntity, error) { + print("share state !$state"); + print("share userData !$userData"); + print("share contentEntity !$contentEntity"); + print("share error !$error"); + }); } } } diff --git a/lib/view_widget/invite_success_dialog.dart b/lib/view_widget/invite_success_dialog.dart new file mode 100644 index 00000000..1fc53535 --- /dev/null +++ b/lib/view_widget/invite_success_dialog.dart @@ -0,0 +1,113 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/round_button.dart'; + +class InviteSuccessDialog extends StatefulWidget { + final String invite; + + InviteSuccessDialog(this.invite); + + @override + State<StatefulWidget> createState() { + return _InviteSuccessDialog(); + } + +} + +class _InviteSuccessDialog extends State<InviteSuccessDialog> { + @override + Widget build(BuildContext context) { + return SimpleDialog( + titlePadding: EdgeInsets.all(10), + backgroundColor: Colors.transparent, + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + children: [ + Column(children: [ + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8.w), + ), + padding: EdgeInsets.only(top:20.h,left: 12,right: 12), + margin: EdgeInsets.only(left:60.w,right:60.w), + child: Container( + padding: EdgeInsets.symmetric(vertical: 10.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/image/yq.png", + width: 61, + height: 65, + ), + SizedBox(height: 9.h,), + Text( + "邀请完成", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox(height: 6.h), + RichText( + textAlign: TextAlign.center, + text: TextSpan( + text: + "通过${widget.invite.substring(0, 3)}****${widget.invite.substring(7, 11)}的邀请码完成邀请,获得", + style: TextStyle( + color: Color(0xFF1A1A1A), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + height: 1.5.h), + children: [ + TextSpan( + text:"前进麦味10元代金劵一张", + style: TextStyle(color: Color(0xFF32A060),fontSize: 14.sp,fontWeight: MyFontWeight.regular), + ), + ] + ),), + SizedBox(height: 13,), + RoundButton( + text: S.of(context).queren, + textColor: Colors.white, + width: 130.w, + height: 34.h, + padding: EdgeInsets.symmetric(vertical: 6.h), + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + backgroup: Color(0xFF32A060), + radius: 4.w, + callback: () { + SmartDialog.dismiss(); + }, + ), + SizedBox(height:20), + ], + ), + ), + ), + SizedBox(height:35), + GestureDetector(onTap: (){ + setState(() { + Navigator.of(context).pop(); + }); + },child:Image.asset( + "assets/image/yq_qx.png", + width: 34, + height: 34, + ),) + + ],), + ], + ); + } +}