Showing
4 changed files
with
12 additions
and
4 deletions
| @@ -41,11 +41,13 @@ class HomeController extends GetxController { | @@ -41,11 +41,13 @@ class HomeController extends GetxController { | ||
| 41 | /// 当前选中的底部 tab 索引 | 41 | /// 当前选中的底部 tab 索引 |
| 42 | final selectedIndex = 0.obs; | 42 | final selectedIndex = 0.obs; |
| 43 | final lastFlutterUrl = ''.obs; | 43 | final lastFlutterUrl = ''.obs; |
| 44 | + var isFromOnboard = false; | ||
| 44 | 45 | ||
| 45 | @override | 46 | @override |
| 46 | void onInit() { | 47 | void onInit() { |
| 47 | super.onInit(); | 48 | super.onInit(); |
| 48 | _mainChannel.setMethodCallHandler(_handleNativeMethodCall); | 49 | _mainChannel.setMethodCallHandler(_handleNativeMethodCall); |
| 50 | + isFromOnboard = Get.arguments?['isFromOnboard'] ?? false; | ||
| 49 | SchedulerBinding.instance.addPostFrameCallback((_) async { | 51 | SchedulerBinding.instance.addPostFrameCallback((_) async { |
| 50 | try { | 52 | try { |
| 51 | final route = await _platformHostApi.requestUnhandedUrl(); | 53 | final route = await _platformHostApi.requestUnhandedUrl(); |
| @@ -113,6 +115,10 @@ class HomeController extends GetxController { | @@ -113,6 +115,10 @@ class HomeController extends GetxController { | ||
| 113 | } | 115 | } |
| 114 | 116 | ||
| 115 | Future<bool> maybeShowMembershipOffer() async { | 117 | Future<bool> maybeShowMembershipOffer() async { |
| 118 | + if (isFromOnboard) { | ||
| 119 | + isFromOnboard = false; | ||
| 120 | + return false; | ||
| 121 | + } | ||
| 116 | if (userStateService.isVip) return false; | 122 | if (userStateService.isVip) return false; |
| 117 | 123 | ||
| 118 | final userId = userStateService.userId; | 124 | final userId = userStateService.userId; |
| @@ -364,7 +364,6 @@ class TodayController extends GetMaterialController { | @@ -364,7 +364,6 @@ class TodayController extends GetMaterialController { | ||
| 364 | } | 364 | } |
| 365 | } | 365 | } |
| 366 | case AppFailure(): | 366 | case AppFailure(): |
| 367 | - hasUploaded = false; | ||
| 368 | } | 367 | } |
| 369 | showHealthDataAuthCardStatus.value = !hasUploaded ? -1 : result.status; | 368 | showHealthDataAuthCardStatus.value = !hasUploaded ? -1 : result.status; |
| 370 | } catch (e) {} | 369 | } catch (e) {} |
| @@ -773,6 +773,8 @@ class _TopDateBar extends StatelessWidget { | @@ -773,6 +773,8 @@ class _TopDateBar extends StatelessWidget { | ||
| 773 | 'assets/images/common/ic_pro.png', | 773 | 'assets/images/common/ic_pro.png', |
| 774 | width: 20, | 774 | width: 20, |
| 775 | height: 20, | 775 | height: 20, |
| 776 | + fit: BoxFit.contain, | ||
| 777 | + alignment: Alignment.center, | ||
| 776 | color: context.colors.textPrimary, | 778 | color: context.colors.textPrimary, |
| 777 | ), | 779 | ), |
| 778 | const SizedBox(width: 2), | 780 | const SizedBox(width: 2), |
| @@ -781,6 +783,7 @@ class _TopDateBar extends StatelessWidget { | @@ -781,6 +783,7 @@ class _TopDateBar extends StatelessWidget { | ||
| 781 | style: TextStyle( | 783 | style: TextStyle( |
| 782 | fontSize: 14, | 784 | fontSize: 14, |
| 783 | fontWeight: FontWeight.w500, | 785 | fontWeight: FontWeight.w500, |
| 786 | + height: 1, | ||
| 784 | color: context.colors.textPrimary, | 787 | color: context.colors.textPrimary, |
| 785 | ), | 788 | ), |
| 786 | ), | 789 | ), |
| @@ -42,7 +42,7 @@ class MembershipOfferController extends GetxController { | @@ -42,7 +42,7 @@ class MembershipOfferController extends GetxController { | ||
| 42 | final orderResult = await _payApi.createOrderByApple(productId); | 42 | final orderResult = await _payApi.createOrderByApple(productId); |
| 43 | if (orderResult is! AppSuccess<ApplePayOrderResponse>) { | 43 | if (orderResult is! AppSuccess<ApplePayOrderResponse>) { |
| 44 | if (isFromOnboard) { | 44 | if (isFromOnboard) { |
| 45 | - Get.offAllNamed(AppRoutes.home); | 45 | + Get.offAllNamed(AppRoutes.home, arguments: {'isFromOnboard': true}); |
| 46 | } | 46 | } |
| 47 | return; | 47 | return; |
| 48 | } | 48 | } |
| @@ -51,7 +51,7 @@ class MembershipOfferController extends GetxController { | @@ -51,7 +51,7 @@ class MembershipOfferController extends GetxController { | ||
| 51 | if (orderUuid == null || orderUuid.isEmpty) { | 51 | if (orderUuid == null || orderUuid.isEmpty) { |
| 52 | AppToast.show(l10n.purchaseOrderInfoUnavailable); | 52 | AppToast.show(l10n.purchaseOrderInfoUnavailable); |
| 53 | if (isFromOnboard) { | 53 | if (isFromOnboard) { |
| 54 | - Get.offAllNamed(AppRoutes.home); | 54 | + Get.offAllNamed(AppRoutes.home, arguments: {'isFromOnboard': true}); |
| 55 | } | 55 | } |
| 56 | return; | 56 | return; |
| 57 | } | 57 | } |
| @@ -78,7 +78,7 @@ class MembershipOfferController extends GetxController { | @@ -78,7 +78,7 @@ class MembershipOfferController extends GetxController { | ||
| 78 | 78 | ||
| 79 | AppToast.show(_applePaymentFailureMessage(result!)); | 79 | AppToast.show(_applePaymentFailureMessage(result!)); |
| 80 | if (isFromOnboard) { | 80 | if (isFromOnboard) { |
| 81 | - Get.offAllNamed(AppRoutes.home); | 81 | + Get.offAllNamed(AppRoutes.home, arguments: {'isFromOnboard': true}); |
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | 84 |
-
Please register or login to post a comment