Forráskód Böngészése

[fix]修改弹窗价格为优惠价格

Destiny 10 hónapja
szülő
commit
8b6714b8f6

+ 0 - 4
ios/Runner.xcodeproj/project.pbxproj

@@ -168,8 +168,6 @@
 		FE05FA2D2DCE0CFC00CBA944 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
 		FE8F00052DCC4A7B00AA2562 /* AiKeyboard.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AiKeyboard.entitlements; sourceTree = "<group>"; };
 		FE8F00092DCC4D6F00AA2562 /* FlutterMethodChannelManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterMethodChannelManager.swift; sourceTree = "<group>"; };
-		FE9139CA2DE83AB5001A8E42 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
-		FE9139CB2DE83AB5001A8E42 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
 		FED899702DD1D044001808D5 /* KeyboardTipsPopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardTipsPopView.swift; sourceTree = "<group>"; };
 		FED899782DD3446A001808D5 /* KeyboardGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardGuideView.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -768,7 +766,6 @@
 			isa = PBXVariantGroup;
 			children = (
 				97C146FB1CF9000F007C117D /* Base */,
-				FE9139CA2DE83AB5001A8E42 /* zh-Hans */,
 			);
 			name = Main.storyboard;
 			sourceTree = "<group>";
@@ -777,7 +774,6 @@
 			isa = PBXVariantGroup;
 			children = (
 				97C147001CF9000F007C117D /* Base */,
-				FE9139CB2DE83AB5001A8E42 /* zh-Hans */,
 			);
 			name = LaunchScreen.storyboard;
 			sourceTree = "<group>";

+ 8 - 5
ios/Runner/Base.lproj/Main.storyboard

@@ -1,8 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
         <!--Flutter View Controller-->
@@ -14,13 +16,14 @@
                         <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
             </objects>
+            <point key="canvasLocation" x="62" y="-34"/>
         </scene>
     </scenes>
 </document>

+ 6 - 1
lib/data/repository/store_repository.dart

@@ -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!);

+ 5 - 3
lib/module/store/new_ticket/new_discount_ticket_dialog.dart

@@ -94,14 +94,16 @@ class NewDiscountTicketDialog {
                                   clipBehavior: Clip.none,
                                   children: [
                                     Obx(() {
+                                      var amountText = controller.secondAmount?.amountText;
+                                      if (controller.storeRepository.isDiscount.value) {
+                                        amountText = controller.secondAmount?.firstAmountText;
+                                      }
                                       return Text(
-                                        controller.secondAmount?.amountText ??
-                                            "",
+                                        amountText,
                                         style: TextStyle(
                                           color: const Color(0xFFFF005A),
                                           fontSize: 42.sp,
                                           fontWeight: FontWeight.w900,
-
                                           height: 0,
                                         ),
                                       );

+ 1 - 1
lib/module/store/store_page.dart

@@ -415,7 +415,7 @@ class StorePage extends BasePage<StoreController> {
         ),
         // 倒计时
         Positioned(
-          top: 0,
+          top: 2,
           right: 8,
           child: Visibility(
             visible: hasCountdown,

+ 1 - 1
pubspec.yaml

@@ -3,7 +3,7 @@ description: "A new Flutter project."
 
 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 
-version: 1.1.1+13
+version: 1.1.2+14
 
 environment:
   sdk: ^3.7.0