|
|
@@ -39,22 +39,22 @@ export default function Page() {
|
|
|
const [memberAlert, setMemberAlert] = useState(global.memberAlert)
|
|
|
const [baseDeviceTime, setBaseDeviceTime] = useState(false)
|
|
|
const accessObj = useSelector((state: any) => state.access);
|
|
|
- const [naviTitle,setNaviTitle] = useState('')
|
|
|
+ const [naviTitle, setNaviTitle] = useState('')
|
|
|
|
|
|
let navigation;
|
|
|
if (useNavigation) {
|
|
|
navigation = useNavigation()
|
|
|
}
|
|
|
|
|
|
- useEffect(()=>{
|
|
|
- if (user.isLogin){
|
|
|
+ useEffect(() => {
|
|
|
+ if (user.isLogin) {
|
|
|
checkBalance()
|
|
|
}
|
|
|
- },[user.isLogin])
|
|
|
+ }, [user.isLogin])
|
|
|
|
|
|
- useDidShow(()=>{
|
|
|
+ useDidShow(() => {
|
|
|
Taro.setNavigationBarTitle({
|
|
|
- title:naviTitle
|
|
|
+ title: naviTitle
|
|
|
})
|
|
|
})
|
|
|
|
|
|
@@ -106,7 +106,7 @@ export default function Page() {
|
|
|
|
|
|
}
|
|
|
|
|
|
- function checkBalance(){
|
|
|
+ function checkBalance() {
|
|
|
userAccess().then(res => {
|
|
|
// global.offsetTimestamp = 0;
|
|
|
// const { server_timestamp } = res as any
|
|
|
@@ -184,7 +184,7 @@ export default function Page() {
|
|
|
}
|
|
|
if (user.isLogin) {
|
|
|
debugger
|
|
|
- jumpPage(`/_account/pages/ProfileSetting?newuser=${user.is_new_user?'1':'0'}`, 'ProfileSetting', navigation)
|
|
|
+ jumpPage(`/_account/pages/ProfileSetting?newuser=${user.is_new_user ? '1' : '0'}`, 'ProfileSetting', navigation)
|
|
|
// jumpPage('/_account/pages/ProfileSetting?newuser='+user.is_new_user?'1':'0', 'ProfileSetting', navigation)
|
|
|
}
|
|
|
else {
|
|
|
@@ -222,17 +222,21 @@ export default function Page() {
|
|
|
icon: 'none'
|
|
|
})
|
|
|
Taro.setStorage({ key: '148alert', data: true })
|
|
|
- global.refreshWindow()
|
|
|
+ if (global.refreshWindow) {
|
|
|
+ global.refreshWindow()
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- function resetNewUser(){
|
|
|
- resetInfo({ is_new_user:true }).then(res => {
|
|
|
+ function resetNewUser() {
|
|
|
+ resetInfo({ is_new_user: true }).then(res => {
|
|
|
Taro.showToast({
|
|
|
title: '成功',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
- global.refreshWindow()
|
|
|
+ if (global.refreshWindow) {
|
|
|
+ global.refreshWindow()
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -355,7 +359,7 @@ export default function Page() {
|
|
|
display: 'flex', flexDirection: 'column',
|
|
|
width: rpxToPx(750),
|
|
|
alignItems: 'center',
|
|
|
- position:'relative'
|
|
|
+ position: 'relative'
|
|
|
}}
|
|
|
onClick={() => {
|
|
|
if (!user.isLogin) {
|
|
|
@@ -372,9 +376,9 @@ export default function Page() {
|
|
|
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
|
|
|
<IconVip width={rpxToPx(36)} color={MainColorType.blue} />
|
|
|
<View style={{ width: rpxToPx(8) }} />
|
|
|
- <View className="h34 bold" style={{ color: MainColorType.blue }}>{isMember()?t('page.more.pro_member'):t('health.no_vip_title')}</View>
|
|
|
+ <View className="h34 bold" style={{ color: MainColorType.blue }}>{isMember() ? t('page.more.pro_member') : t('health.no_vip_title')}</View>
|
|
|
</View>
|
|
|
- <View className="h24" style={{ color: MainColorType.g02, marginTop: rpxToPx(12),textAlign:'center' }}>{isMember() ? memberdesc() : t('health.no_vip_desc')}</View>
|
|
|
+ <View className="h24" style={{ color: MainColorType.g02, marginTop: rpxToPx(12), textAlign: 'center' }}>{isMember() ? memberdesc() : t('health.no_vip_desc')}</View>
|
|
|
<View style={{ height: rpxToPx(18), flexShrink: 0 }} />
|
|
|
</View>
|
|
|
<IconArrow width={rpxToPx(34)} color={MainColorType.g02} />
|
|
|
@@ -390,6 +394,14 @@ export default function Page() {
|
|
|
/>
|
|
|
|
|
|
<View className="profile_cell_space" /> */}
|
|
|
+ <IconTitleCell
|
|
|
+ onClick={() => {
|
|
|
+ jumpPage('/_health/pages/recents')
|
|
|
+ }}
|
|
|
+ title={t('health.recents')}
|
|
|
+ showLine
|
|
|
+ icon={<Image src={require('@assets/_health/setting_album.png')} className="profile_cell_icon" />}
|
|
|
+ />
|
|
|
<IconTitleCell
|
|
|
onClick={() => {
|
|
|
jumpPage('/_health/pages/schedules?mode=')
|
|
|
@@ -413,10 +425,10 @@ export default function Page() {
|
|
|
title={t('health.photos')}
|
|
|
icon={<Image src={require('@assets/_health/setting_album.png')} className="profile_cell_icon" />}
|
|
|
/>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
<View className="profile_cell_space" />
|
|
|
-
|
|
|
+
|
|
|
<IconTitleCell
|
|
|
onClick={goCalendar}
|
|
|
title={t('health.streaks')}
|
|
|
@@ -481,7 +493,7 @@ export default function Page() {
|
|
|
triggered={triggered}
|
|
|
refresh={refresh}
|
|
|
showPullToRefresh={true}
|
|
|
- updateTitle={(title)=>{
|
|
|
+ updateTitle={(title) => {
|
|
|
setNaviTitle(title)
|
|
|
}}
|
|
|
>
|