Leon 1 år sedan
förälder
incheckning
388662d566

+ 1 - 1
ios/AppDelegate.mm

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

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

@@ -580,7 +580,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 132;
+				CURRENT_PROJECT_VERSION = 134;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = hola/Info.plist;
@@ -613,7 +613,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 132;
+				CURRENT_PROJECT_VERSION = 134;
 				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>132</string>
+	<string>134</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<false/>
 	<key>LSApplicationCategoryType</key>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
ios/main.jsbundle


+ 0 - 1
src/features/trackSomething/components/Metric.tsx

@@ -528,7 +528,6 @@ export default function Component(props: any) {
             setOrders(array)
             setNewOrders([])
             setGroups(JSON.parse(JSON.stringify(orignalGroups)))
-            // setGroups(orignalGroups)
         }
         else {
             setTempMetricItem(null)

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

@@ -416,6 +416,7 @@ export default function Page() {
             header={headerView()}
             triggered={triggered}
             refresh={refresh}
+            showPullToRefresh={true}
         >
             {
                 detail()

+ 25 - 4
src/pages/clock/ClockMain.tsx

@@ -352,7 +352,7 @@ export default function Page() {
             checkTimeZone()
             updateNotificationStatus()
             mainTimer()
-            if (user.isLogin){
+            if (user.isLogin) {
                 getUserAccess()
             }
         }
@@ -604,6 +604,22 @@ export default function Page() {
             })
     }
 
+    global.paySuccessRefresh = () => {
+        const start = new Date().getTime()
+        var timer = setInterval(() => {
+            userAccess().then(res => {
+                if ((res as any).member.subscription_status == 'ACTIVE_RENEWING' || (new Date().getTime() - start) >= 3 * 60 * 1000) {
+                    clearInterval(timer)
+                }
+                console.log('9527')
+                dispatch(setAccessData(res))
+                setAccess(res)
+            })
+        },
+            5000
+        )
+    }
+
     global.indexPageRefresh = () => {
         if (global.refreshStreaks) {
             global.refreshStreaks()
@@ -1033,13 +1049,18 @@ export default function Page() {
                 {
                     user.isLogin && user.test_user && homeData && access && <View style={{ display: 'flex', flexDirection: 'column' }}>
                         <Text style={{ color: '#fff', fontSize: 15 }}>member status:{access && access.member && access.member.status}</Text>
+
                         {
                             access && access.member && access.member.status == 'MEMBER' &&
-                            <Text style={{ color: '#fff', fontSize: 15 }}>会员过期时:{access.member.type == 'NON_CONSUMABLE' ? 'Lifelong' : dayjs(access.member.expire).format('YYYY-MM-DD HH:mm:ss')}</Text>
+                            <Text style={{ color: '#fff', fontSize: 15 }}>会员过期倒计时:{access.member.type == 'NON_CONSUMABLE' ? 'Lifelong' : TimeFormatter.countdown(access.member.expire)}</Text>
                         }
                         {
-                            access && access.member && access.member.status == 'MEMBER' &&
-                            <Text style={{ color: '#fff', fontSize: 15 }}>会员过期倒计时:{access.member.type == 'NON_CONSUMABLE' ? 'Lifelong' : TimeFormatter.countdown(access.member.expire)}</Text>
+                            access && access.member &&
+                            <Text style={{ color: '#fff', fontSize: 15 }}>expire:{dayjs(access.member.expire).format('YYYY-MM-DD HH:mm:ss')}</Text>
+                        }
+                        {
+                            access && access.member &&
+                            <Text style={{ color: '#fff', fontSize: 15 }}>renewal:{dayjs(access.member.renewal).format('YYYY-MM-DD HH:mm:ss')}</Text>
                         }
                         {
                             access && access.member && <Text style={{ color: '#fff', fontSize: 15 }}>subscription_status:{access.member.subscription_status}</Text>

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

@@ -93,6 +93,12 @@ export default function Page() {
         }, 1000)
     }, [])
 
+    useEffect(()=>{
+        if (accessObj.access){
+            getMemberStatus()
+        }
+    },[accessObj.access])
+
     useEffect(() => {
         if (!user.isLogin) {
             return;
@@ -144,7 +150,7 @@ export default function Page() {
         if (nextAppState == 'active') {
             rnNotification()
             checkSetting()
-            getMemberStatus()
+            // getMemberStatus()
             getLatestLocation()
         }
 
@@ -188,7 +194,9 @@ export default function Page() {
 
 
     function getMemberStatus() {
+        debugger
         const { access } = accessObj
+        console.log('member status',access)
         if (access && access.member) {
             if (access.member.status == 'NON_MEMBER') {
                 postNotifySettings({
@@ -216,6 +224,7 @@ export default function Page() {
     }
 
     useDidShow(() => {
+        console.log(accessObj)
         getSettings()
         getMemberStatus()
         checkSetting()

+ 17 - 2
src/pages/store/product_list.tsx

@@ -5,7 +5,7 @@ import { useEffect, useState } from "react";
 import { useDispatch, useSelector } from "react-redux";
 import './product_list.scss'
 import { ColorType } from "@/context/themes/color";
-import { order, orderCheck, payInfo, products } from "@/services/user";
+import { order, orderCheck, payInfo, products, userAccess } from "@/services/user";
 import Taro from "@tarojs/taro";
 import { useTranslation } from "react-i18next";
 import { AtActivityIndicator } from "taro-ui";
@@ -180,7 +180,7 @@ export default function ProductList() {
                     return
                 }
                 else {
-                    console.log(item.product.identifier,accessObj.access.member.product.product_id)
+                    console.log(item.product.identifier, accessObj.access.member.product.product_id)
                     if (item.product.identifier == accessObj.access.member.product.product_id) {
                         catchBuyAlert()
                         return
@@ -217,6 +217,21 @@ export default function ProductList() {
                 pay(item)
                 return;
             }
+            if (e.code === Purchases.PURCHASES_ERROR_CODE.STORE_PROBLEM_ERROR) {
+                if (global.paySuccessRefresh) {
+                    global.paySuccessRefresh()
+                }
+                if (process.env.TARO_ENV == 'rn') {
+                    navigation.pop(1)
+                }
+                else {
+                    Taro.navigateBack({
+                        delta: 1
+                    })
+                }
+
+                return;
+            }
 
             if (e.code === Purchases.PURCHASES_ERROR_CODE.PURCHASE_CANCELLED_ERROR) {
                 return

+ 1 - 1
src/services/http/api.js

@@ -1,4 +1,4 @@
-const online = process.env.TARO_ENV == 'weapp' ? false : false;
+const online = process.env.TARO_ENV == 'weapp' ? true : true;
 
 import { WX_VERSION as _WX_VERSION, APP_VERSION as _APP_VERSION, ANDROID_VERSION as _ANDROID_VERSION } from "../../../config/env";
 

Vissa filer visades inte eftersom för många filer har ändrats