From 8d149ef4b375dfaa6b686791b1f58abf793ef7b9 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Thu, 30 May 2024 17:43:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=E4=B8=BA=E4=BA=86=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=9C=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/login/login/app_get_version.dart | 40 +++++++++++++++++++ lib/login/login/starLock_login_page.dart | 41 ++++++++++++-------- lib/login/login/starLock_login_xhj_page.dart | 29 ++++++++++---- lib/mine/mineSet/mineSet/mineSet_page.dart | 7 ++++ lib/network/api.dart | 1 + lib/network/api_provider.dart | 5 +++ lib/network/api_repository.dart | 8 ++++ lib/tools/appFirstEnterHandle.dart | 5 +++ lib/tools/customer_tool.dart | 18 +++++++++ 9 files changed, 131 insertions(+), 23 deletions(-) create mode 100644 lib/login/login/app_get_version.dart create mode 100644 lib/tools/customer_tool.dart diff --git a/lib/login/login/app_get_version.dart b/lib/login/login/app_get_version.dart new file mode 100644 index 00000000..f224088b --- /dev/null +++ b/lib/login/login/app_get_version.dart @@ -0,0 +1,40 @@ +class GetAppInfo { + GetAppInfo({this.errorCode, this.description, this.errorMsg, this.data}); + + GetAppInfo.fromJson(Map json) { + errorCode = json['errorCode']; + description = json['description']; + errorMsg = json['errorMsg']; + if (json['data'] is Map) { + data = Data.fromJson(json['data']); + } + } + + int? errorCode; + String? description; + String? errorMsg; + Data? data; + + Map toJson() { + final Map data = {}; + data['errorCode'] = errorCode; + data['description'] = description; + data['errorMsg'] = errorMsg; + data['data'] = this.data; + return data; + } +} + +class Data { + Data.fromJson(Map json) { + wechatServiceUrl = json['wechat_service_url']; + } + + String? wechatServiceUrl; + + Map toJson() { + final Map data = {}; + data['wechat_service_url'] = wechatServiceUrl; + return data; + } +} diff --git a/lib/login/login/starLock_login_page.dart b/lib/login/login/starLock_login_page.dart index 136a3a7c..a43eb935 100755 --- a/lib/login/login/starLock_login_page.dart +++ b/lib/login/login/starLock_login_page.dart @@ -3,6 +3,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/flavors.dart'; +import 'package:star_lock/tools/customer_tool.dart'; import '../../appRouters.dart'; import '../../app_settings/app_colors.dart'; @@ -35,6 +36,12 @@ class _StarLockLoginPageState extends State { haveBack: false, backgroundColor: AppColors.mainColor, actionsList: [ + IconButton( + onPressed: CustomerTool.openCustomerService, + icon: Icon( + Icons.support_agent, + color: AppColors.mainColor, + )), TextButton( child: Text( TranslationLoader.lanKeys!.register!.tr, @@ -239,22 +246,24 @@ class _StarLockLoginPageState extends State { child: SizedBox( width: 10.sp, )), - if (F.isLite) Container() else GestureDetector( - child: SizedBox( - // width: 150.w, - height: 50.h, - // color: Colors.red, - child: Center( - child: Text('演示模式'.tr, - style: TextStyle( - fontSize: 22.sp, - color: AppColors.mainColor)), - ), - ), - onTap: () { - Get.toNamed(Routers.demoModeLockDetailPage); - }, - ) + if (F.isLite) + Container() + else + GestureDetector( + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text('演示模式'.tr, + style: TextStyle( + fontSize: 22.sp, color: AppColors.mainColor)), + ), + ), + onTap: () { + Get.toNamed(Routers.demoModeLockDetailPage); + }, + ) ], ), ], diff --git a/lib/login/login/starLock_login_xhj_page.dart b/lib/login/login/starLock_login_xhj_page.dart index 22c16a8d..17cc4f84 100755 --- a/lib/login/login/starLock_login_xhj_page.dart +++ b/lib/login/login/starLock_login_xhj_page.dart @@ -1,9 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/flavors.dart'; import 'package:star_lock/login/login/starLock_login_state.dart'; +import 'package:star_lock/tools/customer_tool.dart'; +import 'package:url_launcher/url_launcher.dart'; import '../../appRouters.dart'; import '../../app_settings/app_colors.dart'; @@ -33,7 +36,7 @@ class _StarLockLoginPageState extends State { backgroundColor: const Color(0xFFFFFFFF), body: ListView( padding: EdgeInsets.only( - top: 120.h, + top: 110.h, ), children: [ Padding( @@ -41,12 +44,24 @@ class _StarLockLoginPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - '${"欢迎使用".tr}${F.title}', - style: TextStyle( - color: AppColors.darkGrayTextColor, - fontSize: 48.sp, - ), + Row( + children: [ + Expanded( + child: Text( + '${"欢迎使用".tr}${F.title}', + style: TextStyle( + color: AppColors.darkGrayTextColor, + fontSize: 48.sp, + ), + ), + ), + IconButton( + onPressed: CustomerTool.openCustomerService, + icon: Icon( + Icons.support_agent, + color: AppColors.mainColor, + )), + ], ), SizedBox(height: 30.h), GestureDetector( diff --git a/lib/mine/mineSet/mineSet/mineSet_page.dart b/lib/mine/mineSet/mineSet/mineSet_page.dart index 28440b3f..55718339 100755 --- a/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -10,6 +10,7 @@ import 'package:star_lock/flavors.dart'; import 'package:star_lock/mine/mineSet/mineSet/mineSet_logic.dart'; import 'package:star_lock/mine/mineSet/mineSet/mineSet_state.dart'; import 'package:star_lock/tools/appFirstEnterHandle.dart'; +import 'package:star_lock/tools/customer_tool.dart'; import '../../../appRouters.dart'; import '../../../app_settings/app_colors.dart'; import '../../../tools/commonItem.dart'; @@ -352,6 +353,12 @@ class _MineSetPageState extends State with WidgetsBindingObserver { action: () { logic.showToast('功能暂未开放'.tr); }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.supportStaff!.tr, + isHaveLine: widget.showAbout, + isHaveDirection: true, + action: CustomerTool.openCustomerService, + ), if (widget.showAbout) CommonItem( leftTitel: TranslationLoader.lanKeys!.about!.tr, diff --git a/lib/network/api.dart b/lib/network/api.dart index 70fe404b..7901353e 100755 --- a/lib/network/api.dart +++ b/lib/network/api.dart @@ -239,4 +239,5 @@ abstract class Api { final String lockDataUploadUrl = '/lockRecords/lockDataUpload'; // 锁数据上传 final String getNoticeTemplateURL = '/key/getNoticeTemplate'; //获取短信或者邮箱模板 + final String appGetAppInfoURL = '/app/getAppInfo'; //获取APP基本信息 } diff --git a/lib/network/api_provider.dart b/lib/network/api_provider.dart index a162ddf7..21bd6b91 100755 --- a/lib/network/api_provider.dart +++ b/lib/network/api_provider.dart @@ -2122,6 +2122,11 @@ class ApiProvider extends BaseProvider { 'keyId': keyId, 'channelType': channelType, })); + + // 获取App基本信息 + Future> getAppInfo() => + post(appGetAppInfoURL.toUrl, jsonEncode({}), + isShowErrMsg: false); } extension ExtensionString on String { diff --git a/lib/network/api_repository.dart b/lib/network/api_repository.dart index dc880523..20f5f7ca 100755 --- a/lib/network/api_repository.dart +++ b/lib/network/api_repository.dart @@ -1,5 +1,6 @@ import 'package:get/get.dart'; import 'package:star_lock/blue/entity/lock_user_no_list_entity.dart'; +import 'package:star_lock/login/login/app_get_version.dart'; import 'package:star_lock/login/selectCountryRegion/common/countryRegionEntity.dart'; import 'package:star_lock/main/lockDetail/authorizedAdmin/authorizedAdmin/notice_template_entity.dart'; import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_entity.dart'; @@ -2150,4 +2151,11 @@ class ApiRepository { await apiProvider.getNoticeTemplate(lockId, keyId, channelType); return NoticeTemplateEntity.fromJson(res.body); } + + // 电子钥匙获取短信模板 + Future getAppInfo() async { + final Response res = + await apiProvider.getAppInfo(); + return GetAppInfo.fromJson(res.body); + } } diff --git a/lib/tools/appFirstEnterHandle.dart b/lib/tools/appFirstEnterHandle.dart index 4e8d2ba8..3b51b295 100755 --- a/lib/tools/appFirstEnterHandle.dart +++ b/lib/tools/appFirstEnterHandle.dart @@ -8,6 +8,9 @@ import 'package:star_lock/appRouters.dart'; import 'package:star_lock/app_settings/app_colors.dart'; import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/flavors.dart'; +import 'package:star_lock/login/login/app_get_version.dart'; +import 'package:star_lock/network/api_repository.dart'; +import 'package:star_lock/tools/customer_tool.dart'; import 'package:star_lock/tools/storage.dart'; import '../versionUndate/versionUndateTool.dart'; @@ -41,6 +44,8 @@ class AppFirstEnterHandle { default: break; } + final GetAppInfo entity = await ApiRepository.to.getAppInfo(); + CustomerTool.init(entity.data?.wechatServiceUrl?? ''); } //隐私协议弹窗 diff --git a/lib/tools/customer_tool.dart b/lib/tools/customer_tool.dart new file mode 100644 index 00000000..37caaecb --- /dev/null +++ b/lib/tools/customer_tool.dart @@ -0,0 +1,18 @@ +import 'package:url_launcher/url_launcher.dart'; + +//客服工具类 +class CustomerTool { + static String _customerServiceUrl = ''; + + //初始化 + static Future init(String customerServiceUrl) async { + _customerServiceUrl = customerServiceUrl; + } + + //打开客服 + static void openCustomerService() { + if (_customerServiceUrl.isNotEmpty) { + launchUrl(Uri.parse(_customerServiceUrl)); + } + } +} From c0faa26c4443c41546b62d8211246ca653ba4a43 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Thu, 30 May 2024 17:55:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/lan/lan_en.json | 4 ++-- images/lan/lan_keys.json | 4 ++-- images/lan/lan_zh.json | 4 ++-- lib/main/lockDetail/card/addCardType/addCardType_page.dart | 2 +- .../addFingerprintSelectType/addFingerprintType_page.dart | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/images/lan/lan_en.json b/images/lan/lan_en.json index 904aa204..d2f6f144 100755 --- a/images/lan/lan_en.json +++ b/images/lan/lan_en.json @@ -646,9 +646,9 @@ "消息详情": "Message details", "创建时间": "Creation time", "管理员详情": "Administrator details", - "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息回推送给管理员,该功能需要锁联网。": "When being coerced to forcibly unlock, using a coercion card will trigger an alarm, and the alarm information will be pushed to the administrator. This function requires the lock to be networked.", + "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息会推送给管理员,该功能需要锁联网。": "When being coerced to forcibly unlock, using a coercion card will trigger an alarm, and the alarm information will be pushed to the administrator. This function requires the lock to be networked.", "请不要将胁迫卡用于日常开锁": "Please do not use coercion cards for daily unlocking", - "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息回推送给管理员,该功能需要锁联网。": "When being coerced to forcibly unlock, using coercion fingerprints will trigger an alarm, and the alarm information will be pushed to the administrator. This function requires the lock to be networked.", + "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息会推送给管理员,该功能需要锁联网。": "When being coerced to forcibly unlock, using coercion fingerprints will trigger an alarm, and the alarm information will be pushed to the administrator. This function requires the lock to be networked.", "请不要将胁迫指纹用于日常开锁": "Please do not use coercion fingerprints for daily unlocking", "创建公司": "Create company", "公司名称不能超过30个字符": "Company name cannot exceed 30 characters", diff --git a/images/lan/lan_keys.json b/images/lan/lan_keys.json index 9999cb3f..d293e3b9 100755 --- a/images/lan/lan_keys.json +++ b/images/lan/lan_keys.json @@ -671,9 +671,9 @@ "消息详情": "消息详情", "创建时间": "创建时间", "管理员详情": "管理员详情", - "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息回推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息回推送给管理员,该功能需要锁联网。", + "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息会推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息会推送给管理员,该功能需要锁联网。", "请不要将胁迫卡用于日常开锁": "请不要将胁迫卡用于日常开锁", - "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息回推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息回推送给管理员,该功能需要锁联网。", + "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息会推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息会推送给管理员,该功能需要锁联网。", "请不要将胁迫指纹用于日常开锁": "请不要将胁迫指纹用于日常开锁", "创建公司": "创建公司", "公司名称不能超过30个字符": "公司名称不能超过30个字符", diff --git a/images/lan/lan_zh.json b/images/lan/lan_zh.json index ed311f35..5e3192e1 100755 --- a/images/lan/lan_zh.json +++ b/images/lan/lan_zh.json @@ -646,9 +646,9 @@ "消息详情": "消息详情", "创建时间": "创建时间", "管理员详情": "管理员详情", - "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息回推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息回推送给管理员,该功能需要锁联网。", + "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息会推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息会推送给管理员,该功能需要锁联网。", "请不要将胁迫卡用于日常开锁": "请不要将胁迫卡用于日常开锁", - "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息回推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息回推送给管理员,该功能需要锁联网。", + "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息会推送给管理员,该功能需要锁联网。": "当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息会推送给管理员,该功能需要锁联网。", "请不要将胁迫指纹用于日常开锁": "请不要将胁迫指纹用于日常开锁", "创建公司": "创建公司", "公司名称不能超过30个字符": "公司名称不能超过30个字符", diff --git a/lib/main/lockDetail/card/addCardType/addCardType_page.dart b/lib/main/lockDetail/card/addCardType/addCardType_page.dart index aa0ac540..d557aad8 100755 --- a/lib/main/lockDetail/card/addCardType/addCardType_page.dart +++ b/lib/main/lockDetail/card/addCardType/addCardType_page.dart @@ -281,7 +281,7 @@ class _AddCardPageState extends State color: Colors.white, padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 20.h), child: Text( - "${"当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息回推送给管理员,该功能需要锁联网。".tr}\n${"请不要将胁迫卡用于日常开锁".tr}", + "${"当被胁迫要求强行开锁时,使用胁迫卡会触发报警,报警信息会推送给管理员,该功能需要锁联网。".tr}\n${"请不要将胁迫卡用于日常开锁".tr}", style: TextStyle( fontSize: 22.sp, color: AppColors.darkGrayTextColor), )), diff --git a/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart b/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart index f0c61058..3f771e6f 100755 --- a/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart +++ b/lib/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_page.dart @@ -271,7 +271,7 @@ class _AddFingerprintTypePageState extends State with Si color: Colors.white, padding: EdgeInsets.only(left:20.w, right: 20.w, bottom: 20.h), child: Text( - "${"当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息回推送给管理员,该功能需要锁联网。".tr}\n${"请不要将胁迫指纹用于日常开锁".tr}", + "${"当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警信息会推送给管理员,该功能需要锁联网。".tr}\n${"请不要将胁迫指纹用于日常开锁".tr}", style: TextStyle( fontSize: 22.sp, color: AppColors.darkGrayTextColor), ) From f2e439b3be9e790cbaee343d8ea7f442012ff103 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Thu, 30 May 2024 18:12:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=20sky=20=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=AE=A2=E6=9C=8D=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/login/login/starLock_login_page.dart | 4 +-- .../starLockApplication.dart | 9 +++++ lib/tools/appFirstEnterHandle.dart | 34 ++++++++++--------- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/lib/login/login/starLock_login_page.dart b/lib/login/login/starLock_login_page.dart index a43eb935..8505350c 100755 --- a/lib/login/login/starLock_login_page.dart +++ b/lib/login/login/starLock_login_page.dart @@ -36,11 +36,11 @@ class _StarLockLoginPageState extends State { haveBack: false, backgroundColor: AppColors.mainColor, actionsList: [ - IconButton( + const IconButton( onPressed: CustomerTool.openCustomerService, icon: Icon( Icons.support_agent, - color: AppColors.mainColor, + color: Colors.white, )), TextButton( child: Text( diff --git a/lib/starLockApplication/starLockApplication.dart b/lib/starLockApplication/starLockApplication.dart index a1757e8a..664d5686 100755 --- a/lib/starLockApplication/starLockApplication.dart +++ b/lib/starLockApplication/starLockApplication.dart @@ -1,10 +1,13 @@ import 'package:flutter/material.dart'; import 'package:star_lock/flavors.dart'; +import 'package:star_lock/login/login/app_get_version.dart'; import 'package:star_lock/login/login/starLock_login_page.dart'; import 'package:star_lock/login/login/starLock_login_xhj_page.dart'; import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_page.dart'; import 'package:star_lock/mine/about/debug/debug_tool.dart'; +import 'package:star_lock/network/api_repository.dart'; import 'package:star_lock/tools/appFirstEnterHandle.dart'; +import 'package:star_lock/tools/customer_tool.dart'; import 'package:star_lock/tools/storage.dart'; import '../main/lockMian/lockMain/lockMain_page.dart'; @@ -41,6 +44,7 @@ class _StarLockApplicationState extends State { } else if (snapshot.hasData) { if (snapshot.data!) { // 如果用户已登录,返回主页面 + getAppInfo(); return F.sw( skyCall: () => StarLockMainPage(), xhjCall: () => const StarLockMainXHJPage()); @@ -76,4 +80,9 @@ class _StarLockApplicationState extends State { AppFirstEnterHandle().getAppFirstEnter(isShowUpdateVersion); } } + + Future getAppInfo() async { + final GetAppInfo entity = await ApiRepository.to.getAppInfo(); + CustomerTool.init(entity.data?.wechatServiceUrl ?? ''); + } } diff --git a/lib/tools/appFirstEnterHandle.dart b/lib/tools/appFirstEnterHandle.dart index 3b51b295..d173714c 100755 --- a/lib/tools/appFirstEnterHandle.dart +++ b/lib/tools/appFirstEnterHandle.dart @@ -16,41 +16,38 @@ import 'package:star_lock/tools/storage.dart'; import '../versionUndate/versionUndateTool.dart'; class AppFirstEnterHandle { - Future getAppFirstEnter(String flagStr) async { - var getFlag = await Storage.getString(flagStr); + Future getAppFirstEnter(String flagStr) async { + final dynamic getFlag = await Storage.getString(flagStr); switch (flagStr) { case isAgreePrivacy: // 隐私协议 - { - if (getFlag != isAgreePrivacy) { - showPrivacyAgreementAlert(); - } + if (getFlag != isAgreePrivacy) { + await showPrivacyAgreementAlert(); } + getAppInfo(); break; case isAgreePosition: // 位置权限 - { - if (getFlag != isAgreePosition) showPositionAlert(); + if (getFlag != isAgreePosition) { + showPositionAlert(); } break; case isAgreeCamera: // 相机权限 - { - if (getFlag != isAgreeCamera) showCameraAlert(); + if (getFlag != isAgreeCamera) { + showCameraAlert(); } break; case isShowUpdateVersion: // 版本更新 - { - if (getFlag != isShowUpdateVersion) VersionUndateTool(); + if (getFlag != isShowUpdateVersion) { + VersionUndateTool(); } break; default: break; } - final GetAppInfo entity = await ApiRepository.to.getAppInfo(); - CustomerTool.init(entity.data?.wechatServiceUrl?? ''); } //隐私协议弹窗 - void showPrivacyAgreementAlert() { - showCupertinoDialog( + Future showPrivacyAgreementAlert() async { + await showCupertinoDialog( context: Get.context!, builder: (context) { return PopScope( @@ -62,6 +59,11 @@ class AppFirstEnterHandle { ); } + Future getAppInfo() async { + final GetAppInfo entity = await ApiRepository.to.getAppInfo(); + CustomerTool.init(entity.data?.wechatServiceUrl ?? ''); + } + //默认布局 Widget _defaultPrivacyAgreementAlert(BuildContext context) { return CupertinoAlertDialog(