|
@@ -135,6 +135,10 @@ export default function Page() {
|
|
|
dispatch(staticResources() as any);
|
|
dispatch(staticResources() as any);
|
|
|
console.log('计时器开始')
|
|
console.log('计时器开始')
|
|
|
pauseTimer = false;
|
|
pauseTimer = false;
|
|
|
|
|
+ mainTimer()
|
|
|
|
|
+ }, [])
|
|
|
|
|
+
|
|
|
|
|
+ function mainTimer(){
|
|
|
if (timer) {
|
|
if (timer) {
|
|
|
clearInterval(timer)
|
|
clearInterval(timer)
|
|
|
timer = null
|
|
timer = null
|
|
@@ -146,13 +150,15 @@ export default function Page() {
|
|
|
global.refrehWeekly()
|
|
global.refrehWeekly()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log('9527')
|
|
|
if (global.pauseIndexTimer || pauseTimer) {
|
|
if (global.pauseIndexTimer || pauseTimer) {
|
|
|
|
|
+ console.log('pause')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
setCount((prevCounter) => prevCounter + 1)
|
|
setCount((prevCounter) => prevCounter + 1)
|
|
|
|
|
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
- }, [])
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -344,6 +350,7 @@ export default function Page() {
|
|
|
if (nextAppState == 'active') {
|
|
if (nextAppState == 'active') {
|
|
|
checkTimeZone()
|
|
checkTimeZone()
|
|
|
updateNotificationStatus()
|
|
updateNotificationStatus()
|
|
|
|
|
+ mainTimer()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
};
|
|
};
|
|
@@ -816,7 +823,7 @@ export default function Page() {
|
|
|
</Box>
|
|
</Box>
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- user.isLogin && records.length > 0 && <View className="index_section" style={{ marginTop: -rpxToPx(25), marginBottom: -rpxToPx(20) }}>
|
|
|
|
|
|
|
+ user.isLogin && records.length > 0 && <View className="index_section" style={{ marginTop: -rpxToPx(25-12), marginBottom: -rpxToPx(20) }}>
|
|
|
<Text className="index_section_title">{t('feature.track_time_duration.record_fast_sleep.header.latest_record')}</Text>
|
|
<Text className="index_section_title">{t('feature.track_time_duration.record_fast_sleep.header.latest_record')}</Text>
|
|
|
{
|
|
{
|
|
|
process.env.TARO_ENV == 'weapp' && <Text className="fast_sleep_more index_more" onClick={more}>{t('feature.track_time_duration.record_fast_sleep.header.btn_show_all')}</Text>
|
|
process.env.TARO_ENV == 'weapp' && <Text className="fast_sleep_more index_more" onClick={more}>{t('feature.track_time_duration.record_fast_sleep.header.btn_show_all')}</Text>
|
|
@@ -828,6 +835,9 @@ export default function Page() {
|
|
|
}
|
|
}
|
|
|
</View>
|
|
</View>
|
|
|
}
|
|
}
|
|
|
|
|
+ {
|
|
|
|
|
+ user.isLogin && records.length==0 && <View style={{ marginTop: -rpxToPx(25) }}/>
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
user.isLogin && records.length > 0 && <View id="latest" className="fast_sleep_item_bg">
|
|
user.isLogin && records.length > 0 && <View id="latest" className="fast_sleep_item_bg">
|
|
@@ -859,13 +869,13 @@ export default function Page() {
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- user.isLogin && !showErrorPage && <View className="index_section" style={{height:rpxToPx(120)}}>
|
|
|
|
|
|
|
+ user.isLogin && !showErrorPage && <View className="index_section" style={{height:rpxToPx(120),marginTop:rpxToPx(40)}}>
|
|
|
<Text className="index_main_title">{t('feature.pro.for_pro')}</Text>
|
|
<Text className="index_main_title">{t('feature.pro.for_pro')}</Text>
|
|
|
</View>
|
|
</View>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- user.isLogin && !showErrorPage && <View className="index_section">
|
|
|
|
|
|
|
+ user.isLogin && !showErrorPage && <View className="index_section" style={{marginBottom:-rpxToPx(10),marginTop:-rpxToPx(40)}}>
|
|
|
<Text className="index_section_title">{t('feature.day_night.group_title')}</Text>
|
|
<Text className="index_section_title">{t('feature.day_night.group_title')}</Text>
|
|
|
</View>
|
|
</View>
|
|
|
}
|
|
}
|
|
@@ -874,13 +884,13 @@ export default function Page() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- user.isLogin && (process.env.TARO_ENV == 'weapp'||true) && <View className="index_section">
|
|
|
|
|
|
|
+ user.isLogin && (process.env.TARO_ENV == 'weapp') && <View className="index_section">
|
|
|
<Text className="index_section_title">{t('page.explore.title')}</Text>
|
|
<Text className="index_section_title">{t('page.explore.title')}</Text>
|
|
|
</View>
|
|
</View>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- user.isLogin && (process.env.TARO_ENV == 'weapp'||true) && <Discovery />
|
|
|
|
|
|
|
+ user.isLogin && (process.env.TARO_ENV == 'weapp') && <Discovery />
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|