leon 1 jaar geleden
bovenliggende
commit
67932b2ca6

+ 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 DEBUG
+#if DEBUGaaa
   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 = 91;
+				CURRENT_PROJECT_VERSION = 95;
 				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 = 91;
+				CURRENT_PROJECT_VERSION = 95;
 				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>91</string>
+	<string>95</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<false/>
 	<key>LSApplicationCategoryType</key>

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


+ 13 - 3
src/features/trackTimeDuration/components/CheckAccess.tsx

@@ -87,12 +87,17 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
                 
                 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' &&
-                    global.ring.current_record.scenario != 'FAST') {
+                if (member_expire && new Date().getTime() > member_expire){
                     if (global.indexPageRefresh) {
                         global.indexPageRefresh()
                     }
                 }
+                // 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()
+                //     }
+                // }
             }
 
             if (obj.current_record.status != 'WAIT_FOR_START') {
@@ -145,11 +150,15 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
             setKeepContent(false)
         }
 
-        global.paySuccess = () => {
+        global.paySuccess = (res) => {
             cancelAction = null
             confirmAction = null
             setShowFastAlert(false)
             setKeepContent(false)
+            setTimeout(()=>{
+                global.refreshAccess(res)
+            },2000)
+            
         }
         global.checkAccess = (acccessData: any) => {
             const currentStatus = acccessData.current.qualification.status
@@ -497,6 +506,7 @@ const CheckAccess = memo((props: { record: any, count: number, access: any }) =>
                 }
                 {
                     user.test_user && <View style={{ display: 'flex', flexDirection: 'column' }}>
+                        <Text style={{ color: '#fff', fontSize: 12 }}>member status:{props.access.member.status}</Text>
                         <Text style={{ color: '#fff', fontSize: 12 }}>current status:{props.access.fast_sleep.current.qualification.status}</Text>
                         <Text style={{ color: '#fff', fontSize: 12 }}>previous status:{props.access.fast_sleep.previous.qualification.status}</Text>
                         <Text style={{ color: '#fff', fontSize: 12 }}>trigger event:{props.access.fast_sleep.current.qualification.trigger_event}</Text>

+ 1 - 1
src/features/trackTimeDuration/components/WeekCalendar.tsx

@@ -290,7 +290,7 @@ const WeekCalendar = memo((props: { isFastSleep: boolean }) => {
                     !summary || (props.isFastSleep?summary.sleep.avg == 0:summary.wake.avg == 0) ? <View className="calendar-empty-bg" style={{ borderColor: props.isFastSleep ? ColorType.sleep : ColorType.activity }}>
                         <View className="calendar-empty-line" style={{ backgroundColor: props.isFastSleep ? ColorType.sleep : ColorType.activity }} />
                     </View> :
-                        <View className={lastSleepValue > summary.sleep.avg ? 'calendar-arrow-bg-down' : 'calendar-arrow-bg'} style={{ backgroundColor: props.isFastSleep ? ColorType.sleep : ColorType.activity }}>
+                        <View className={lastSleepValue > (props.isFastSleep?summary.sleep.avg:summary.wake.avg) ? 'calendar-arrow-bg-down' : 'calendar-arrow-bg'} style={{ backgroundColor: props.isFastSleep ? ColorType.sleep : ColorType.activity }}>
                             <IconBigArrow color="#fff" width={rpxToPx(32)} />
                         </View>
                 }

+ 18 - 9
src/pages/clock/ClockMain.tsx

@@ -118,7 +118,7 @@ export default function Page() {
 
     const permission = useSelector((state: any) => state.permission);
     const common = useSelector((state: any) => state.common);
-    const [access,setAccess] = useState<any>(null)
+    const [access, setAccess] = useState<any>(null)
 
     const scrollRef = useRef(null);
 
@@ -535,12 +535,16 @@ export default function Page() {
         if (user.isLogin) {
             getHistory()
             userAccess().then(res => {
-                console.log('useraccess',res)
+                console.log('useraccess', res)
                 setAccess(res)
             })
         }
     }
 
+    global.refreshAccess = (res) => {
+        setAccess(res)
+    }
+
     function setCheckData(list: any) {
         setHomeData(list[0])
         setSchedules(list[1].scenarios)
@@ -859,7 +863,7 @@ export default function Page() {
                         <IndexItem type="FAST_SLEEP" data={homeData} time={timestamp} showStage={false} />
                         {
 
-                            user.isLogin ? <IndexConsole record={homeData} count={count} access={access}/> : <StageSelector />
+                            user.isLogin ? <IndexConsole record={homeData} count={count} access={access} /> : <StageSelector />
                         }
 
                     </View>
@@ -967,12 +971,17 @@ export default function Page() {
                 }
 
                 {
-                    user.isLogin && user.test_user && homeData && (homeData as any).access && <View style={{ display: 'flex', flexDirection: 'column' }}>
-                        <Text style={{ color: '#fff', fontSize: 15 }}>current status:{(homeData as any).access.current.qualification.status}</Text>
-                        <Text style={{ color: '#fff', fontSize: 15 }}>previous status:{(homeData as any).access.previous.qualification.status}</Text>
-                        <Text style={{ color: '#fff', fontSize: 15 }}>trigger event:{(homeData as any).access.current.qualification.trigger_event}</Text>
-                        <Text style={{ color: '#fff', fontSize: 15 }}>lost_access_total:{(homeData as any).access.current.qualification.condition.lost_access_total}</Text>
-                        <Text style={{ color: '#fff', fontSize: 15 }}>streak_fast_min_required:{(homeData as any).access.current.qualification.condition.streak_fast_min_required}</Text>
+                    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 }}>会员过期时间:{TimeFormatter.countdown(access.member.expire)}</Text>
+                        }
+                        <Text style={{ color: '#fff', fontSize: 15 }}>current status:{access.fast_sleep.current.qualification.status}</Text>
+                        <Text style={{ color: '#fff', fontSize: 15 }}>previous status:{access.fast_sleep.previous.qualification.status}</Text>
+                        <Text style={{ color: '#fff', fontSize: 15 }}>trigger event:{access.fast_sleep.current.qualification.trigger_event}</Text>
+                        <Text style={{ color: '#fff', fontSize: 15 }}>lost_access_total:{access.fast_sleep.current.qualification.condition.lost_access_total}</Text>
+                        <Text style={{ color: '#fff', fontSize: 15 }}>streak_fast_min_required:{access.fast_sleep.current.qualification.condition.streak_fast_min_required}</Text>
                     </View>
                 }
                 {

+ 1 - 1
src/pages/store/product_list.tsx

@@ -88,7 +88,7 @@ export default function ProductList() {
                 productIdentifier,
                 transaction
             }).then(res => {
-                global.paySuccess()
+                global.paySuccess(res)
                 if (process.env.TARO_ENV == 'rn') {
                     navigation.pop(1)
                 }

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