diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index 2d881de2..f2fa8705 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -719,5 +719,6 @@ "商城":"mall", "我的":"my", - "微信公众号推送":"Wechat public account" + "微信公众号推送":"Wechat public account", + "开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置":"To open wechat to receive alarm messages, you need to pay attention to Skye Smart Lock wechat public account first, please save the QR code and use wechat to scan the Settings" } diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index 617ab49d..d4597822 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -718,5 +718,6 @@ "商城":"mall", "我的":"my", - "微信公众号推送":"微信公众号推送" + "微信公众号推送":"微信公众号推送", + "开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置":"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置" } diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 790574ae..48546bc6 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -720,5 +720,6 @@ "商城":"商城", "我的":"我的", - "微信公众号推送":"微信公众号推送" + "微信公众号推送":"微信公众号推送", + "开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置":"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置" } diff --git a/star_lock/lib/mine/mineSet/mineSet/mineSet_logic.dart b/star_lock/lib/mine/mineSet/mineSet/mineSet_logic.dart index 586874a2..e12c61b4 100644 --- a/star_lock/lib/mine/mineSet/mineSet/mineSet_logic.dart +++ b/star_lock/lib/mine/mineSet/mineSet/mineSet_logic.dart @@ -68,8 +68,10 @@ class MineSetLogic extends BaseGetXController { showToast("设置成功".tr); userSettingsInfoRequest(); } else if (entity.errorCode! == 421) { - //请先扫码绑定微信公众号 - getMpWechatQrCodeRequest(widgetContext); + if (state.isWechatPublicAccountPush.value == true) { + //请先扫码绑定微信公众号 + getMpWechatQrCodeRequest(widgetContext); + } } } diff --git a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart index 50f8d4aa..42446ce1 100644 --- a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -8,6 +8,7 @@ import 'package:get/get.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:star_lock/flavors.dart'; import 'package:star_lock/mine/mineSet/mineSet/mineSet_logic.dart'; +import 'package:star_lock/tools/appFirstEnterHandle.dart'; import '../../../appRouters.dart'; import '../../../app_settings/app_colors.dart'; import '../../../tools/commonItem.dart'; diff --git a/star_lock/lib/tools/appFirstEnterHandle.dart b/star_lock/lib/tools/appFirstEnterHandle.dart index fce022fe..44e5a0d9 100644 --- a/star_lock/lib/tools/appFirstEnterHandle.dart +++ b/star_lock/lib/tools/appFirstEnterHandle.dart @@ -182,33 +182,49 @@ class AppFirstEnterHandle { //微信公众号二维码弹窗 void showQRImageAlert(BuildContext widgetContext, String qrCodeUrl) { - showCupertinoDialog( + showCupertinoModalPopup( context: widgetContext, builder: (context) { - return PopScope( - canPop: false, - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.network( - qrCodeUrl, - width: 1.sw - 40.w, - height: 1.sw - 40.w, + return CupertinoActionSheet( + actions: [ + Container( + color: Colors.white, // 设置底色为白色 + child: CupertinoActionSheetAction( + child: Container( + margin: const EdgeInsets.all(0), + child: Column( + children: [ + SizedBox( + height: 60.h, + ), + Image.network( + qrCodeUrl, + width: 400.w, + height: 400.w, + ), + SizedBox( + height: 20.h, + ), + Padding( + padding: EdgeInsets.only(left: 60.w, right: 60.w), + child: Text( + '开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置'.tr, + style: + TextStyle(fontSize: 24.sp, color: Colors.black), + )), + SizedBox( + height: 60.h, + ) + ], + ), ), - SizedBox( - height: 20.h, - ), - //点击屏幕任意位置关闭弹窗 - GestureDetector( - onTap: () { - Navigator.of(context).pop(); - }, - child: Image.asset('images/icon_massSend_delete.png'), - ), - ], - ))); + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + ], + ); }, ); }