Showing
3 changed files
with
8 additions
and
6 deletions
| @@ -7,6 +7,7 @@ import 'package:doublefeel_flutter/app/modules/home/controllers/trend/trend_cont | @@ -7,6 +7,7 @@ import 'package:doublefeel_flutter/app/modules/home/controllers/trend/trend_cont | ||
| 7 | import 'package:doublefeel_flutter/app/modules/home/widgets/today/friend_select_bottom_sheet.dart'; | 7 | import 'package:doublefeel_flutter/app/modules/home/widgets/today/friend_select_bottom_sheet.dart'; |
| 8 | import 'package:doublefeel_flutter/app/modules/home/widgets/today/no_health_data_page.dart'; | 8 | import 'package:doublefeel_flutter/app/modules/home/widgets/today/no_health_data_page.dart'; |
| 9 | import 'package:doublefeel_flutter/app/routes/app_pages.dart'; | 9 | import 'package:doublefeel_flutter/app/routes/app_pages.dart'; |
| 10 | +import 'package:doublefeel_flutter/core/constants/membership.dart'; | ||
| 10 | import 'package:doublefeel_flutter/core/logging/app_logger.dart'; | 11 | import 'package:doublefeel_flutter/core/logging/app_logger.dart'; |
| 11 | import 'package:doublefeel_flutter/core/network/api/friend_api.dart'; | 12 | import 'package:doublefeel_flutter/core/network/api/friend_api.dart'; |
| 12 | import 'package:doublefeel_flutter/core/network/api/health_api.dart'; | 13 | import 'package:doublefeel_flutter/core/network/api/health_api.dart'; |
| @@ -263,8 +264,7 @@ class TodayController extends GetMaterialController { | @@ -263,8 +264,7 @@ class TodayController extends GetMaterialController { | ||
| 263 | /// 上传 Apple Health 新数据。 | 264 | /// 上传 Apple Health 新数据。 |
| 264 | Future<void> _performDataUpload() async { | 265 | Future<void> _performDataUpload() async { |
| 265 | try { | 266 | try { |
| 266 | - final result = | ||
| 267 | - await _hostApi.performHealthUpload(); | 267 | + final result = await _hostApi.performHealthUpload(); |
| 268 | // AppLogger.i( | 268 | // AppLogger.i( |
| 269 | // 'Apple Health upload finished: ' | 269 | // 'Apple Health upload finished: ' |
| 270 | // 'common=${result.commonUploadSuccess}(${result.commonCount}), ' | 270 | // 'common=${result.commonUploadSuccess}(${result.commonCount}), ' |
| @@ -543,8 +543,7 @@ class TodayController extends GetMaterialController { | @@ -543,8 +543,7 @@ class TodayController extends GetMaterialController { | ||
| 543 | .where((product) => _nonEmpty(product.appleId) != null) | 543 | .where((product) => _nonEmpty(product.appleId) != null) |
| 544 | .toList(); | 544 | .toList(); |
| 545 | yearlyProduct.value = products | 545 | yearlyProduct.value = products |
| 546 | - // .firstWhereOrNull((p) => p.appleId == 'com.doublefeel.yearly_v1'); | ||
| 547 | - .firstWhereOrNull((p) => p.appleId == 'com.doublefeel.yearly'); | 546 | + .firstWhereOrNull((p) => p.appleId == Membership.yearlyProductId); |
| 548 | AppLogger.e(yearlyProduct); | 547 | AppLogger.e(yearlyProduct); |
| 549 | if (yearlyProduct.value != null) { | 548 | if (yearlyProduct.value != null) { |
| 550 | final appleProductId = _nonEmpty(yearlyProduct.value!.appleId); | 549 | final appleProductId = _nonEmpty(yearlyProduct.value!.appleId); |
| 1 | import 'dart:math'; | 1 | import 'dart:math'; |
| 2 | 2 | ||
| 3 | +import 'package:doublefeel_flutter/core/constants/membership.dart'; | ||
| 3 | import 'package:doublefeel_flutter/core/logging/app_logger.dart'; | 4 | import 'package:doublefeel_flutter/core/logging/app_logger.dart'; |
| 4 | import 'package:doublefeel_flutter/core/network/api/pay_api.dart'; | 5 | import 'package:doublefeel_flutter/core/network/api/pay_api.dart'; |
| 5 | import 'package:doublefeel_flutter/core/network/api/vip_api.dart'; | 6 | import 'package:doublefeel_flutter/core/network/api/vip_api.dart'; |
| @@ -174,8 +175,7 @@ class MembershipOfferController extends GetxController { | @@ -174,8 +175,7 @@ class MembershipOfferController extends GetxController { | ||
| 174 | .where((product) => _nonEmpty(product.appleId) != null) | 175 | .where((product) => _nonEmpty(product.appleId) != null) |
| 175 | .toList(); | 176 | .toList(); |
| 176 | yearlyProduct.value = products | 177 | yearlyProduct.value = products |
| 177 | - // .firstWhereOrNull((p) => p.appleId == 'com.doublefeel.yearly_v1'); | ||
| 178 | - .firstWhereOrNull((p) => p.appleId == 'com.doublefeel.yearly'); | 178 | + .firstWhereOrNull((p) => p.appleId == Membership.yearlyProductId); |
| 179 | 179 | ||
| 180 | if (yearlyProduct.value != null) { | 180 | if (yearlyProduct.value != null) { |
| 181 | final appleProductId = _nonEmpty(yearlyProduct.value!.appleId); | 181 | final appleProductId = _nonEmpty(yearlyProduct.value!.appleId); |
lib/core/constants/membership.dart
0 → 100644
-
Please register or login to post a comment