Leon 1 jaar geleden
bovenliggende
commit
9090affc34

+ 1 - 1
ios/AppDelegate.mm

@@ -132,7 +132,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
 - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
 {
 //  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#if DEBUGaaa
+#if DEBUGaa
   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
 #else
   return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

+ 2 - 2
ios/hola.xcodeproj/project.pbxproj

@@ -576,7 +576,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 84;
+				CURRENT_PROJECT_VERSION = 86;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = hola/Info.plist;
@@ -609,7 +609,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 84;
+				CURRENT_PROJECT_VERSION = 86;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				INFOPLIST_FILE = hola/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (

+ 1 - 1
ios/hola/Info.plist

@@ -32,7 +32,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>84</string>
+	<string>86</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<false/>
 	<key>LSApplicationCategoryType</key>

File diff suppressed because it is too large
+ 0 - 0
ios/main.jsbundle


+ 8 - 5
src/features/trackTimeDuration/components/CheckAccess.tsx

@@ -19,7 +19,7 @@ let confirmAction: any = null;
 let cancelAction: any = null;
 let timer;
 let access;
-let useNavigation, AppState, Modal,useIsFocused;
+let useNavigation, AppState, Modal, useIsFocused;
 if (process.env.TARO_ENV == 'rn') {
     AppState = require("react-native").AppState
     Modal = require("react-native").Modal
@@ -64,7 +64,9 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
             const preStatus = props.access.fast_sleep.previous.qualification.status
             if ((preStatus == 'PROVISIONAL_QUALIFIED' || preStatus == 'QUALIFIED_UNTIL_EXPIRE') &&
                 currentStatus == 'PENDING' &&
+                global.ring.current_record.scenario != 'FAST' &&
                 obj.current_record.status == 'WAIT_FOR_START') {
+                debugger
                 loseGain(props.access.fast_sleep)
             }
             else if (currentStatus == 'PROVISIONAL_QUALIFIED') {
@@ -85,7 +87,8 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
             else if (currentStatus == 'QUALIFIED_UNTIL_EXPIRE') {
                 Taro.setStorage({ key: 'showedDisqualifiedAlert', data: false })
                 const member_expire = props.access.member.expire
-                if (member_expire && new Date().getTime() > member_expire && obj.current_record.status == 'WAIT_FOR_START') {
+                if (member_expire && new Date().getTime() > member_expire && obj.current_record.status == 'WAIT_FOR_START' &&
+                    global.ring.current_record.scenario != 'FAST') {
                     if (global.indexPageRefresh) {
                         global.indexPageRefresh()
                     }
@@ -245,7 +248,7 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
                 setShowCancel(false)
                 setConfirmText(t('feature.check_access.stay_qualified.btn'))
             }
-            else if ((preStatus == 'QUALIFIED_UNTIL_EXPIRE' || preStatus == 'PROVISIONAL_QUALIFIED') && currentStatus == 'PENDING') {
+            else if ((preStatus == 'QUALIFIED_UNTIL_EXPIRE' || preStatus == 'PROVISIONAL_QUALIFIED') && currentStatus == 'PENDING' && global.ring.current_record.scenario != 'FAST') {
                 loseGain(acccessData);
             }
         }
@@ -255,7 +258,7 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
         setShowFastAlert(false)
     }
 
-    
+
 
     async function loseGain(access) {
         var showedDisqualifiedAlert = await getStorage('showedDisqualifiedAlert') || false;
@@ -350,7 +353,7 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
         }
     }
 
-    
+
 
     function upgrade() {
         const { prev_input, valid, start_time, end_time } = global.ring.schedule.sleep

+ 1 - 1
src/pages/account/Profile.tsx

@@ -98,7 +98,7 @@ export default function Page() {
 
     function tapBalance(e) {
         if (user.isLogin) {
-
+            jumpPage('','ProductList',navigation)
         }
         else {
             jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)

+ 1 - 1
src/pages/notification/setting.tsx

@@ -175,7 +175,7 @@ export default function Page() {
     function pro() {
         return <ScrollView style={{ flex: 1 }}>
             {/* <ProductList /> */}
-            <Text style={{fontSize:30,color:'#fff'}} onClick={iap}>iap test</Text>
+            {/* <Text style={{fontSize:30,color:'#fff'}} onClick={iap}>iap test</Text> */}
             <View className="setting_container">
                 <View className="setting_section">
                     <Text className="setting_section_title">Fasting with/or Sleep</Text>

+ 5 - 0
src/pages/store/product_list.tsx

@@ -20,6 +20,7 @@ export default function ProductList() {
     const user = useSelector((state: any) => state.user);
     // - State for displaying an overlay view
     const [isPurchasing, setIsPurchasing] = useState(false);
+    const [errorCode,setErrorCode] = useState<any>(-1)
 
     let navigation;
     if (useNavigation) {
@@ -100,6 +101,7 @@ export default function ProductList() {
             console.log('result', customerInfo)
         } catch (e) {
             debugger
+            setErrorCode(e.code)
             if (e.code === Purchases.PURCHASES_ERROR_CODE.PURCHASE_CANCELLED_ERROR) {
 
             }
@@ -141,5 +143,8 @@ export default function ProductList() {
         {
             isPurchasing && <Text style={{ color: '#fff', fontSize: 40 }}>正在付款</Text>
         }
+        {
+            errorCode!=-1 && <Text style={{ color: '#fff', fontSize: 40 }}>出错了,错误代码{errorCode}</Text>
+        }
     </View>
 }

Some files were not shown because too many files changed in this diff