diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index a7f23b74..1bb29d77 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -458,6 +458,7 @@ class MessageLookup extends MessageLookupByLibrary { "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), "touxiang" : MessageLookupByLibrary.simpleMessage("头像"), "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), + "tuiguangma" : MessageLookupByLibrary.simpleMessage("推广码"), "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), "waimai" : MessageLookupByLibrary.simpleMessage("外卖"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), @@ -482,6 +483,7 @@ class MessageLookup extends MessageLookupByLibrary { "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"), "weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"), + "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"), "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"), "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index dd0f4d8f..90b0fb79 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -457,6 +457,7 @@ class MessageLookup extends MessageLookupByLibrary { "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), "touxiang" : MessageLookupByLibrary.simpleMessage("头像"), "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), + "tuiguangma" : MessageLookupByLibrary.simpleMessage("推广码"), "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), "waimai" : MessageLookupByLibrary.simpleMessage("外卖"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), @@ -481,6 +482,7 @@ class MessageLookup extends MessageLookupByLibrary { "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"), "weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"), + "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"), "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"), "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index e52402bf..8a81dec6 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -457,6 +457,7 @@ class MessageLookup extends MessageLookupByLibrary { "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), "touxiang" : MessageLookupByLibrary.simpleMessage("头像"), "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), + "tuiguangma" : MessageLookupByLibrary.simpleMessage("推广码"), "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), "waimai" : MessageLookupByLibrary.simpleMessage("外卖"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), @@ -481,6 +482,7 @@ class MessageLookup extends MessageLookupByLibrary { "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"), "weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"), + "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"), "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"), "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 8ce7167d..f3fe0df3 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -457,6 +457,7 @@ class MessageLookup extends MessageLookupByLibrary { "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), "touxiang" : MessageLookupByLibrary.simpleMessage("頭像"), "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登錄"), + "tuiguangma" : MessageLookupByLibrary.simpleMessage("推廣碼"), "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), "waimai" : MessageLookupByLibrary.simpleMessage("外賣"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), @@ -481,6 +482,7 @@ class MessageLookup extends MessageLookupByLibrary { "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"), "weulingqu" : MessageLookupByLibrary.simpleMessage("未領取"), + "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"), "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的積分值"), "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 38dd31de..5456410b 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -457,6 +457,7 @@ class MessageLookup extends MessageLookupByLibrary { "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), "touxiang" : MessageLookupByLibrary.simpleMessage("頭像"), "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登錄"), + "tuiguangma" : MessageLookupByLibrary.simpleMessage("推廣碼"), "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), "waimai" : MessageLookupByLibrary.simpleMessage("外賣"), "waisong" : MessageLookupByLibrary.simpleMessage("外送"), @@ -481,6 +482,7 @@ class MessageLookup extends MessageLookupByLibrary { "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"), "weulingqu" : MessageLookupByLibrary.simpleMessage("未領取"), + "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"), "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的積分值"), "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 816acde3..75f3f8f4 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -5015,6 +5015,26 @@ class S { ); } + /// `推广码` + String get tuiguangma { + return Intl.message( + '推广码', + name: 'tuiguangma', + desc: '', + args: [], + ); + } + + /// `我的工具` + String get wodegongju { + return Intl.message( + '我的工具', + name: 'wodegongju', + desc: '', + args: [], + ); + } + /// `并使用本机号码登录` String get privacy_policy4 { return Intl.message( diff --git a/lib/home/home_view/home_integral_store.dart b/lib/home/home_view/home_integral_store.dart index fc3ba1b2..1ed0bcfd 100644 --- a/lib/home/home_view/home_integral_store.dart +++ b/lib/home/home_view/home_integral_store.dart @@ -102,7 +102,7 @@ class _HomeIntegralStore extends State { Widget integralStore() { return GridView.builder( - itemCount: widget.gooods != null ? widget.gooods.length : 0, + itemCount: (widget.gooods != null && widget.gooods.length > 0) ? (widget.gooods.length > 2 ? 2 : widget.gooods.length) : 0, padding: EdgeInsets.all(13.w), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), @@ -118,7 +118,7 @@ class _HomeIntegralStore extends State { ? (1 - ((AppUtils.textScale(context) - 1))) : 0.85, ), - itemBuilder: (contetx, index) { + itemBuilder: (context, index) { return GestureDetector( onTap: () { Navigator.of(context).pushNamed('/router/integral_store_page', diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 3c4ecc5b..8024c545 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -519,6 +519,8 @@ "diandan": "点单", "pingtaiyue": "平台余额", "dianpuyue": "店铺余额", + "tuiguangma": "推广码", + "wodegongju": "我的工具", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 8155e927..e3717f13 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -521,6 +521,8 @@ "diandan": "点单", "pingtaiyue": "平台余额", "dianpuyue": "店铺余额", + "tuiguangma": "推广码", + "wodegongju": "我的工具", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 8155e927..e3717f13 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -521,6 +521,8 @@ "diandan": "点单", "pingtaiyue": "平台余额", "dianpuyue": "店铺余额", + "tuiguangma": "推广码", + "wodegongju": "我的工具", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index 8fe0c561..82d13f87 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -514,6 +514,8 @@ "diandan": "點單", "pingtaiyue": "平臺餘額", "dianpuyue": "店鋪餘額", + "tuiguangma": "推廣碼", + "wodegongju": "我的工具", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index b60d82f0..ef89da17 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -513,6 +513,8 @@ "diandan": "點單", "pingtaiyue": "平臺餘額", "dianpuyue": "店鋪餘額", + "tuiguangma": "推廣碼", + "wodegongju": "我的工具", diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 6bfb504d..4f392be2 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -52,7 +52,7 @@ class _MineItem extends State { Container( padding: EdgeInsets.symmetric(vertical: 4.h), child: Text( - "我的工具", + S.of(context).wodegongju, style: TextStyle( color: Color(0xFF353535), fontWeight: MyFontWeight.semi_bold, @@ -109,15 +109,15 @@ class _MineItem extends State { "assets/image/icon_location_address.png", ), ), - // InkWell( - // onTap: () { - // Navigator.of(context).pushNamed('/router/setting_page'); - // }, - // child: mineItem( - // S.of(context).shezhi, - // "assets/image/icon_mine_setting.png", - // ), - // ), + InkWell( + onTap: () { + Navigator.of(context).pushNamed('/router/qr_share', arguments: {}); + }, + child: mineItem( + S.of(context).tuiguangma, + "assets/image/icon_mine_promotion_code.png", + ), + ), // mineItem( // S.of(context).bangzhuyufankui, // "assets/image/icon_mine_feedback.png", diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 1116b541..5364e718 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -64,12 +64,7 @@ class _MineView extends State { ], ), ), - InkWell( - onTap: () { - widget.toUserInfo(); - }, - child: mineView(), - ), + mineView(), SizedBox( height: 12.h, ), @@ -111,27 +106,32 @@ class _MineView extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Stack( - children: [ - MImage( - widget.userInfo == null ? "" : widget.userInfo.headimg, - isCircle: true, - width: 50, - height: 50, - fit: BoxFit.cover, - errorSrc: "assets/image/default_user.png", - fadeSrc: "assets/image/default_user.png", - ), - Positioned( - bottom: 0, - right: 2.w, - child: Image.asset( - "assets/image/icon_mine_edit.png", - width: 17.w, - height: 17.w, - ), + InkWell( + onTap: () { + widget.toUserInfo(); + }, + child: Stack( + children: [ + MImage( + widget.userInfo == null ? "" : widget.userInfo.headimg, + isCircle: true, + width: 50, + height: 50, + fit: BoxFit.cover, + errorSrc: "assets/image/default_user.png", + fadeSrc: "assets/image/default_user.png", + ), + Positioned( + bottom: 0, + right: 2.w, + child: Image.asset( + "assets/image/icon_mine_edit.png", + width: 17.w, + height: 17.w, + ), + ), + ], ), - ], ), SizedBox( width: 10.w, diff --git a/lib/qr/qr_share_image.dart b/lib/qr/qr_share_image.dart index 4b0f3b27..94f265e6 100644 --- a/lib/qr/qr_share_image.dart +++ b/lib/qr/qr_share_image.dart @@ -199,10 +199,10 @@ class _QrShareImagePage extends State { 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"); + print("share state !$state"); + print("share userData !$userData"); + print("share contentEntity !$contentEntity"); + print("share error !$error"); }); } } diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 5545e91d..c6b0b692 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -37,8 +37,12 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const base_url = "https://pos.platform.lotus-wallet.com/app/"; + +///正式 +const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; + +///正式 // const base_url = "http://192.168.10.236:8766/app/"; ///费韬 // const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬 @@ -48,12 +52,14 @@ const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 @RestApi(baseUrl: baseUrl) abstract class ApiService { - factory ApiService(Dio dio, - {String baseUrl, - BuildContext context, - String token, - bool showLoading = true, - bool pay = false}) { + factory ApiService( + Dio dio, { + String baseUrl, + BuildContext context, + String token, + bool showLoading = true, + bool pay = false, + }) { Map headers = (token == null || token == "") ? {} : {'token': "Bearer $token"}; if (pay) { @@ -356,5 +362,5 @@ abstract class ApiService { ///继续付款? @POST("/order/settlement") - Future> settlement(@Body() Map map); + Future> settlement(@Body() Map map); } diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 6cc88f16..1ff9fd98 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -145,7 +145,7 @@ class _StoreOrderPage extends State child: Column( children: [ ///门店信息 - StoreInfoView(), + StoreInfoView(storeInfo), ///门店对应优惠券 if (storeInfo != null && storeInfo.couponVOList != null) @@ -224,7 +224,7 @@ class _StoreOrderPage extends State color: Colors.white, width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.width, - ) + ), ], controller: tabcontroller, ), diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 298e61b0..0db4086b 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -1,11 +1,17 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/round_button.dart'; class StoreInfoView extends StatefulWidget { + + final StoreInfo storeInfo; + + StoreInfoView(this.storeInfo); + @override State createState() { return _StoreInfoView(); @@ -49,7 +55,7 @@ class _StoreInfoView extends State { Container( alignment: Alignment.centerLeft, child: Text( - "百年川椒", + widget.storeInfo != null ? (widget.storeInfo.storeName ?? "") : "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 18.sp, diff --git a/lib/view_widget/sign_in_widget.dart b/lib/view_widget/sign_in_widget.dart index 9bc19e8a..2d88fe30 100644 --- a/lib/view_widget/sign_in_widget.dart +++ b/lib/view_widget/sign_in_widget.dart @@ -68,28 +68,28 @@ class _SignInWidget extends State { fontWeight: MyFontWeight.regular, ), ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/icon_gold_coin.png", - width: 16, - height: 16, + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/image/icon_gold_coin.png", + width: 16, + height: 16, + ), + SizedBox( + width: 4.h, + ), + Text( + S.of(context).jiajifen(widget.integral), + style: TextStyle( + color: Color(0xFFEE9905), + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, ), - SizedBox( - width: 4.h, - ), - Text( - S.of(context).jiajifen(widget.integral), - style: TextStyle( - color: Color(0xFFEE9905), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], - ), + ), + ], + ), // Text( // S.of(context).jiajifen(widget.integral), // style: TextStyle(