leon hace 1 año
padre
commit
169d3f505a

+ 4 - 2
src/features/trackTimeDuration/components/RecordFastSleep.tsx

@@ -471,10 +471,12 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
                     }
                 }
                 if (global.language == 'en') {
-                    return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('MMM D z')
+                    return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id,'MMM D z')
+                    // return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('MMM D z')
                 }
                 else {
-                    return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('M月D日 z')
+                    return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id,'M月D日 z')
+                    // return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('M月D日 z')
                 }
             }
             if (props.data.first_timezone.gmt == timeZoneFormatted) {

+ 6 - 14
src/pages/clock/Clock.tsx

@@ -124,6 +124,12 @@ export default function Page() {
     }
 
     useEffect(() => {
+        if (process.env.TARO_ENV=='weapp'){
+            showAlert({
+                title:'date',
+                content:new Date().toString()
+            })
+        }
         dispatch(staticResources() as any);
         timer = setInterval(() => {
             var now = new Date()
@@ -882,17 +888,6 @@ export default function Page() {
 
                 {
                     process.env.TARO_ENV == 'rn' && <DayNightSwiper count={count} />
-                    // <Swiper
-                    //     className="rn_swiper"
-                    //     indicatorDots indicatorColor='#333'
-                    //     indicatorActiveColor='#999'>
-                    //     <SwiperItem>
-                    //         <DayNightCard isNight={true} count={count} />
-                    //     </SwiperItem>
-                    //     <SwiperItem>
-                    //         <DayNightCard isNight={false} count={count} />
-                    //     </SwiperItem>
-                    // </Swiper>
                 }
 
                 {
@@ -927,9 +922,6 @@ export default function Page() {
                         <ChooseScenarioBtn title={t('feature.auth.login.login_now')} background={ColorType.fast} onClick={tapLogin} />
                     </View>
                 }
-                {/* {
-                    showErrorPage && <NoData refresh={() => { getCheckData() }} />
-                } */}
 
                 {
                     user.isLogin && !showErrorPage && <View style={{ marginTop: rpxToPx(60), display: 'flex', flexDirection: 'column' }}>