Showing
6 changed files
with
41 additions
and
19 deletions
| @@ -737,7 +737,7 @@ | @@ -737,7 +737,7 @@ | ||
| 737 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | 737 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 738 | CODE_SIGN_ENTITLEMENTS = "Runner/Runner-Debug.entitlements"; | 738 | CODE_SIGN_ENTITLEMENTS = "Runner/Runner-Debug.entitlements"; |
| 739 | CODE_SIGN_STYLE = Automatic; | 739 | CODE_SIGN_STYLE = Automatic; |
| 740 | - CURRENT_PROJECT_VERSION = " 81"; | 740 | + CURRENT_PROJECT_VERSION = " 90"; |
| 741 | DEVELOPMENT_TEAM = ZRPLMC329K; | 741 | DEVELOPMENT_TEAM = ZRPLMC329K; |
| 742 | ENABLE_PREVIEWS = YES; | 742 | ENABLE_PREVIEWS = YES; |
| 743 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; | 743 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; |
| @@ -816,7 +816,7 @@ | @@ -816,7 +816,7 @@ | ||
| 816 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | 816 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 817 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 817 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 818 | CODE_SIGN_STYLE = Automatic; | 818 | CODE_SIGN_STYLE = Automatic; |
| 819 | - CURRENT_PROJECT_VERSION = " 81"; | 819 | + CURRENT_PROJECT_VERSION = " 90"; |
| 820 | DEVELOPMENT_TEAM = ZRPLMC329K; | 820 | DEVELOPMENT_TEAM = ZRPLMC329K; |
| 821 | ENABLE_PREVIEWS = YES; | 821 | ENABLE_PREVIEWS = YES; |
| 822 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; | 822 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; |
| @@ -297,15 +297,11 @@ class TodayController extends GetMaterialController { | @@ -297,15 +297,11 @@ class TodayController extends GetMaterialController { | ||
| 297 | }; | 297 | }; |
| 298 | final result = await _hostApi.checkHealthAppAuthorization(); | 298 | final result = await _hostApi.checkHealthAppAuthorization(); |
| 299 | 299 | ||
| 300 | - if (!hasUploaded) { | ||
| 301 | - showHealthDataAuthCardStatus.value = 0; | ||
| 302 | - return; | ||
| 303 | - } | ||
| 304 | - showHealthDataAuthCardStatus.value = result.status; | ||
| 305 | - // TODO:若用户从始至终没有任何数据,也显示该引导 | ||
| 306 | if (result.status == 1) { | 300 | if (result.status == 1) { |
| 307 | _performDataUpload(); | 301 | _performDataUpload(); |
| 308 | } | 302 | } |
| 303 | + | ||
| 304 | + showHealthDataAuthCardStatus.value = !hasUploaded ? 0 : result.status; | ||
| 309 | } catch (e) {} | 305 | } catch (e) {} |
| 310 | } | 306 | } |
| 311 | 307 | ||
| @@ -560,7 +556,7 @@ class TodayController extends GetMaterialController { | @@ -560,7 +556,7 @@ class TodayController extends GetMaterialController { | ||
| 560 | .toList(); | 556 | .toList(); |
| 561 | yearlyProduct.value = products | 557 | yearlyProduct.value = products |
| 562 | .firstWhereOrNull((p) => p.appleId == Membership.yearlyProductId); | 558 | .firstWhereOrNull((p) => p.appleId == Membership.yearlyProductId); |
| 563 | - AppLogger.e(yearlyProduct); | 559 | + // AppLogger.e(yearlyProduct); |
| 564 | if (yearlyProduct.value != null) { | 560 | if (yearlyProduct.value != null) { |
| 565 | final appleProductId = _nonEmpty(yearlyProduct.value!.appleId); | 561 | final appleProductId = _nonEmpty(yearlyProduct.value!.appleId); |
| 566 | if (appleProductId == null) return; | 562 | if (appleProductId == null) return; |
| @@ -40,15 +40,26 @@ class AccountSettingView extends GetView<MyController> { | @@ -40,15 +40,26 @@ class AccountSettingView extends GetView<MyController> { | ||
| 40 | ), | 40 | ), |
| 41 | ), | 41 | ), |
| 42 | ), | 42 | ), |
| 43 | - body: Obx( | ||
| 44 | - () => Column( | 43 | + body: Obx(() { |
| 44 | + final telephone = | ||
| 45 | + userPrefs.preferences.value.meUserInfo?.telephone ?? ''; | ||
| 46 | + final thirdAccountId = | ||
| 47 | + userPrefs.preferences.value.meUserInfo?.thirdAccountId ?? ''; | ||
| 48 | + return Column( | ||
| 45 | children: [ | 49 | children: [ |
| 46 | SizedBox(height: 16), | 50 | SizedBox(height: 16), |
| 47 | - _buildAccountCard( | ||
| 48 | - context: context, | ||
| 49 | - title: context.l10n.mobilePhoneNumber, | ||
| 50 | - content: userPrefs.preferences.value.meUserInfo?.telephone ?? '', | ||
| 51 | - ), | 51 | + if (thirdAccountId.isNotEmpty) |
| 52 | + _buildAccountCard( | ||
| 53 | + context: context, | ||
| 54 | + title: 'Apple ID', | ||
| 55 | + content: thirdAccountId, | ||
| 56 | + ) | ||
| 57 | + else | ||
| 58 | + _buildAccountCard( | ||
| 59 | + context: context, | ||
| 60 | + title: context.l10n.mobilePhoneNumber, | ||
| 61 | + content: telephone, | ||
| 62 | + ), | ||
| 52 | SizedBox(height: 20), | 63 | SizedBox(height: 20), |
| 53 | GestureDetector( | 64 | GestureDetector( |
| 54 | behavior: HitTestBehavior.opaque, | 65 | behavior: HitTestBehavior.opaque, |
| @@ -78,8 +89,8 @@ class AccountSettingView extends GetView<MyController> { | @@ -78,8 +89,8 @@ class AccountSettingView extends GetView<MyController> { | ||
| 78 | ), | 89 | ), |
| 79 | ), | 90 | ), |
| 80 | ], | 91 | ], |
| 81 | - ), | ||
| 82 | - ), | 92 | + ); |
| 93 | + }), | ||
| 83 | ); | 94 | ); |
| 84 | } | 95 | } |
| 85 | 96 |
| @@ -206,4 +206,12 @@ class MembershipOfferController extends GetxController { | @@ -206,4 +206,12 @@ class MembershipOfferController extends GetxController { | ||
| 206 | if (trimmed == null || trimmed.isEmpty) return null; | 206 | if (trimmed == null || trimmed.isEmpty) return null; |
| 207 | return trimmed; | 207 | return trimmed; |
| 208 | } | 208 | } |
| 209 | + | ||
| 210 | + void onBackPressed() { | ||
| 211 | + if (isFromOnboard) { | ||
| 212 | + Get.offAllNamed(AppRoutes.home); | ||
| 213 | + } else { | ||
| 214 | + Get.back(); | ||
| 215 | + } | ||
| 216 | + } | ||
| 209 | } | 217 | } |
| @@ -21,6 +21,9 @@ class MembershipOfferView extends GetView<MembershipOfferController> { | @@ -21,6 +21,9 @@ class MembershipOfferView extends GetView<MembershipOfferController> { | ||
| 21 | final l10n = context.l10n; | 21 | final l10n = context.l10n; |
| 22 | return GuideCommonScaffold( | 22 | return GuideCommonScaffold( |
| 23 | showGradientBg: true, | 23 | showGradientBg: true, |
| 24 | + onBackPressed: () { | ||
| 25 | + controller.onBackPressed(); | ||
| 26 | + }, | ||
| 24 | bottom: OnboardingBottomButton( | 27 | bottom: OnboardingBottomButton( |
| 25 | label: controller.isFromOnboard ? l10n.continueButton : '免费兑换优惠', | 28 | label: controller.isFromOnboard ? l10n.continueButton : '免费兑换优惠', |
| 26 | enabled: true, | 29 | enabled: true, |
| @@ -205,7 +205,8 @@ class UserInfoResponse { | @@ -205,7 +205,8 @@ class UserInfoResponse { | ||
| 205 | this.isBot, | 205 | this.isBot, |
| 206 | this.uniqueCode, | 206 | this.uniqueCode, |
| 207 | this.enableAddWithUCode, | 207 | this.enableAddWithUCode, |
| 208 | - this.isPassNoviceGuide}); | 208 | + this.isPassNoviceGuide, |
| 209 | + this.thirdAccountId}); | ||
| 209 | 210 | ||
| 210 | final int? id; | 211 | final int? id; |
| 211 | final String? pairCode; | 212 | final String? pairCode; |
| @@ -221,6 +222,7 @@ class UserInfoResponse { | @@ -221,6 +222,7 @@ class UserInfoResponse { | ||
| 221 | final String? uniqueCode; | 222 | final String? uniqueCode; |
| 222 | final int? enableAddWithUCode; | 223 | final int? enableAddWithUCode; |
| 223 | final int? isPassNoviceGuide; | 224 | final int? isPassNoviceGuide; |
| 225 | + final String? thirdAccountId; | ||
| 224 | 226 | ||
| 225 | factory UserInfoResponse.fromJson(Map<String, dynamic> json) { | 227 | factory UserInfoResponse.fromJson(Map<String, dynamic> json) { |
| 226 | return UserInfoResponse( | 228 | return UserInfoResponse( |
| @@ -238,6 +240,7 @@ class UserInfoResponse { | @@ -238,6 +240,7 @@ class UserInfoResponse { | ||
| 238 | uniqueCode: json['unique_code'] as String?, | 240 | uniqueCode: json['unique_code'] as String?, |
| 239 | enableAddWithUCode: json['enable_add_with_ucode'] as int?, | 241 | enableAddWithUCode: json['enable_add_with_ucode'] as int?, |
| 240 | isPassNoviceGuide: json['is_pass_novice_guide'] as int?, | 242 | isPassNoviceGuide: json['is_pass_novice_guide'] as int?, |
| 243 | + thirdAccountId: json['third_account_id'] as String?, | ||
| 241 | ); | 244 | ); |
| 242 | } | 245 | } |
| 243 | 246 | ||
| @@ -261,6 +264,7 @@ class UserInfoResponse { | @@ -261,6 +264,7 @@ class UserInfoResponse { | ||
| 261 | if (isPassNoviceGuide != null) { | 264 | if (isPassNoviceGuide != null) { |
| 262 | val['is_pass_novice_guide'] = isPassNoviceGuide; | 265 | val['is_pass_novice_guide'] = isPassNoviceGuide; |
| 263 | } | 266 | } |
| 267 | + if (thirdAccountId != null) val['third_account_id'] = thirdAccountId; | ||
| 264 | return val; | 268 | return val; |
| 265 | } | 269 | } |
| 266 | } | 270 | } |
-
Please register or login to post a comment