|
|
@@ -4,6 +4,7 @@ import 'package:keyboard/data/api/response/item_list_response.dart';
|
|
|
import 'package:keyboard/data/api/response/order_pay_response.dart';
|
|
|
import 'package:keyboard/utils/http_handler.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
+import 'package:keyboard/utils/method_chanel_ios_util.dart';
|
|
|
import 'package:keyboard/widget/platform_util.dart';
|
|
|
import '../../base/app_base_request.dart';
|
|
|
import '../../di/get_it.dart';
|
|
|
@@ -47,6 +48,8 @@ class StoreRepository {
|
|
|
|
|
|
final RxBool hasAutoRenewal = false.obs;
|
|
|
|
|
|
+ final RxBool isDiscount = false.obs;
|
|
|
+
|
|
|
StoreRepository(this.atmobApi, this.accountRepository) {
|
|
|
print('$tag....init');
|
|
|
refreshNewDiscountGoodsInfoList();
|
|
|
@@ -79,12 +82,14 @@ class StoreRepository {
|
|
|
return await atmobApi
|
|
|
.getMemberUserResponse(AppBaseRequest())
|
|
|
.then(HttpHandler.handle(true))
|
|
|
- .then((data) {
|
|
|
+ .then((data) async {
|
|
|
_newDiscountGoodsInfoList.clear();
|
|
|
_newDiscountPayWayList.clear();
|
|
|
_charactersList.clear();
|
|
|
if (data.goodsInfoList?.isNotEmpty == true) {
|
|
|
_newDiscountGoodsInfoList.addAll(data.goodsInfoList!);
|
|
|
+ var isHasDiscount = await MethodChanelIOSUtil.isHasDiscount(_newDiscountGoodsInfoList.first.appleGoodsId);
|
|
|
+ isDiscount.value = isHasDiscount;
|
|
|
}
|
|
|
if (data.payInfoList?.isNotEmpty == true) {
|
|
|
_newDiscountPayWayList.addAll(data.payInfoList!);
|