1,优化微信公众号推送逻辑
2,修改弹窗二维码UI参照小米
This commit is contained in:
parent
93467fc388
commit
2c3b799a5d
@ -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"
|
||||
}
|
||||
|
||||
@ -718,5 +718,6 @@
|
||||
|
||||
"商城":"mall",
|
||||
"我的":"my",
|
||||
"微信公众号推送":"微信公众号推送"
|
||||
"微信公众号推送":"微信公众号推送",
|
||||
"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置":"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置"
|
||||
}
|
||||
|
||||
@ -720,5 +720,6 @@
|
||||
|
||||
"商城":"商城",
|
||||
"我的":"我的",
|
||||
"微信公众号推送":"微信公众号推送"
|
||||
"微信公众号推送":"微信公众号推送",
|
||||
"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置":"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置"
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user