diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 2be6913..f3132a1 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -493,7 +493,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 60; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D; ENABLE_BITCODE = NO; @@ -503,7 +503,6 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -688,7 +687,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 60; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D; ENABLE_BITCODE = NO; @@ -698,7 +697,6 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -720,7 +718,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 60; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D; ENABLE_BITCODE = NO; @@ -730,7 +728,6 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 100c097..e5556b3 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -20,12 +20,12 @@ $(FLUTTER_BUILD_NAME) CFBundleSignature ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) LSApplicationQueriesSchemes baidumap - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS NFCReaderUsageDescription @@ -77,17 +77,10 @@ UISupportedInterfaceOrientations - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight com.apple.developer.nfc.readersession.formats diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 0f8f43d..004f4ba 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -247,7 +247,6 @@ class HomePageState extends State { // 拉取其他数据 + 隐患列表(当 hiddenList 为空时显示 loading,否则不显示) _fetchData(); _fetchHiddenList(showLoading: hiddenList.isEmpty); - fetchAndSaveBd09(context); /// 清单列表 final data = await ApiService.getListData(); if (data['result'] == 'success') { @@ -258,6 +257,7 @@ class HomePageState extends State { } } } + fetchAndSaveBd09(context); } Future _onRefresh() async { diff --git a/lib/pages/login_page.dart b/lib/pages/login_page.dart index 0dcfb3e..141fa3a 100644 --- a/lib/pages/login_page.dart +++ b/lib/pages/login_page.dart @@ -260,84 +260,87 @@ class _LoginPageState extends State { Padding( padding: const EdgeInsets.only(bottom: 10), - child: Row( - children: [ - Checkbox( - value: _agreed, - activeColor: Colors.white, - checkColor: Colors.blueAccent, - side: const BorderSide(color: Colors.white), - onChanged:(value) { - setState(() { - _agreed = value??false; - }); + child: Center( // 关键:把 Row 放到 Center 中 + child: Row( + mainAxisSize: MainAxisSize.min, // Row 根据子项宽度自适应,不再铺满父宽度 + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Checkbox( + value: _agreed, + activeColor: Colors.white, + checkColor: Colors.blueAccent, + side: const BorderSide(color: Colors.white), + onChanged: (value) { + setState(() { + _agreed = value ?? false; + }); + }, + ), - }, - // (v) => setState(() => _agreed = v ?? false), - ), - Expanded( - child: RichText( - text: TextSpan( - children: [ - TextSpan( - text: '我已阅读并同意', - style: const TextStyle( - color: Colors.white, - fontSize: 12, + // 用 Flexible 而非 Expanded,且给 RichText 一个居中对齐 + Flexible( + fit: FlexFit.loose, + child: RichText( + textAlign: TextAlign.center, // 使文本在它的可用宽度内居中 + text: TextSpan( + children: [ + const TextSpan( + text: '我已阅读并同意', + style: TextStyle( + color: Colors.white, + fontSize: 12, + ), ), - ), - TextSpan( - text: '《服务协议》', - style: const TextStyle( - color: Color(0xFF0D1D8C), - fontSize: 12, + TextSpan( + text: '《服务协议》', + style: const TextStyle( + color: Color(0xFF0D1D8C), + fontSize: 12, + ), + recognizer: TapGestureRecognizer() + ..onTap = () { + pushPage( + const WebViewPage( + name: "用户服务协议", + url: 'http://47.92.102.56:7811/file/xieyi/zsyhxy.htm', + ), + context, + ); + }, ), - recognizer: - TapGestureRecognizer() - ..onTap = () { - pushPage( - const WebViewPage( - name: "用户服务协议", - url: - 'http://47.92.102.56:7811/file/xieyi/zsyhxy.htm', // 替换为目标网址 - ), - context, - ); - }, - ), - TextSpan( - text: '和', - style: const TextStyle( - color: Colors.white, - fontSize: 12, + const TextSpan( + text: '和', + style: TextStyle( + color: Colors.white, + fontSize: 12, + ), ), - ), - TextSpan( - text: '《隐私政策》', - style: const TextStyle( - color: Color(0xFF0D1D8C), - fontSize: 12, + TextSpan( + text: '《隐私政策》', + style: const TextStyle( + color: Color(0xFF0D1D8C), + fontSize: 12, + ), + recognizer: TapGestureRecognizer() + ..onTap = () { + pushPage( + const WebViewPage( + name: "隐私政策", + url: 'http://47.92.102.56:7811/file/xieyi/zsysq.htm', + ), + context, + ); + }, ), - recognizer: - TapGestureRecognizer() - ..onTap = () { - pushPage( - const WebViewPage( - name: "隐私政策", - url: - 'http://47.92.102.56:7811/file/xieyi/zsysq.htm', // 替换为目标网址 - ), - context, - ); - }, - ), - ], + ], + ), ), ), - ), - ], + ], + ), ), ), + ], ), // ), diff --git a/lib/tools/tools.dart b/lib/tools/tools.dart index 51993f1..96d7f43 100644 --- a/lib/tools/tools.dart +++ b/lib/tools/tools.dart @@ -622,6 +622,7 @@ Future openAppStore() async { if (await canLaunchUrl(uri)) { await launchUrl(uri, mode: LaunchMode.externalApplication); + exit(0); } else { // 回退到 https 链接(在浏览器中打开 App Store 页面) final Uri webUri = Uri.parse('https://itunes.apple.com/app/id$appId'); @@ -630,5 +631,6 @@ Future openAppStore() async { } else { throw 'Could not launch App Store for app id $appId'; } + exit(0); } } \ No newline at end of file diff --git a/lib/tools/update/update_dialogs.dart b/lib/tools/update/update_dialogs.dart index 506a201..ff651ed 100644 --- a/lib/tools/update/update_dialogs.dart +++ b/lib/tools/update/update_dialogs.dart @@ -150,10 +150,7 @@ class _DownloadProgressDialogState extends State { ], ), actions: [ - TextButton( - onPressed: _onCancel, - child: const Text('取消'), - ), + ], ), );