|
@@ -19,6 +19,8 @@ import showAlert from "@/components/basic/Alert";
|
|
|
import { kIsAndroid, kIsIOS, rpxToPx } from "@/utils/tools";
|
|
import { kIsAndroid, kIsIOS, rpxToPx } from "@/utils/tools";
|
|
|
import dayjs from "dayjs";
|
|
import dayjs from "dayjs";
|
|
|
import { MainColorType } from "@/context/themes/color";
|
|
import { MainColorType } from "@/context/themes/color";
|
|
|
|
|
+import NewHeader, { NewHeaderType } from "@/_health/components/new_header";
|
|
|
|
|
+import { IconCellArrow, IconVip } from "@/components/basic/Icons";
|
|
|
|
|
|
|
|
let useNavigation, SwitchRN;
|
|
let useNavigation, SwitchRN;
|
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
@@ -191,14 +193,14 @@ export default function Page() {
|
|
|
jumpPage('/_health/pages/streak_calendar')
|
|
jumpPage('/_health/pages/streak_calendar')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function goMetric(){
|
|
|
|
|
|
|
+ function goMetric() {
|
|
|
if (!user.isLogin) {
|
|
if (!user.isLogin) {
|
|
|
jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
|
|
jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
|
|
|
}
|
|
}
|
|
|
jumpPage('/pages/metric/Metric')
|
|
jumpPage('/pages/metric/Metric')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function goWeekly(){
|
|
|
|
|
|
|
+ function goWeekly() {
|
|
|
if (!user.isLogin) {
|
|
if (!user.isLogin) {
|
|
|
jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
|
|
jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
|
|
|
}
|
|
}
|
|
@@ -281,9 +283,25 @@ export default function Page() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function detail() {
|
|
function detail() {
|
|
|
- return <View style={{ display: 'flex', flexDirection: 'column',backgroundColor:'#f5f5f5' }}>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ return <View style={{ display: 'flex', flexDirection: 'column', backgroundColor: '#f5f5f5' }}>
|
|
|
|
|
+ {/* <NewHeader type={NewHeaderType.center}
|
|
|
|
|
+ title={user.isLogin ? user.nickname : t('page.more.un_login')}
|
|
|
|
|
+ /> */}
|
|
|
<View className="profile_card" onClick={tapProfile}>
|
|
<View className="profile_card" onClick={tapProfile}>
|
|
|
|
|
+ <Text className="h50 bold"
|
|
|
|
|
+ style={{
|
|
|
|
|
+ color: user.isLogin ? '#000' : MainColorType.g02,
|
|
|
|
|
+ // marginLeft: rpxToPx(52),
|
|
|
|
|
+ // marginRight: rpxToPx(52),
|
|
|
|
|
+ width:rpxToPx(640),
|
|
|
|
|
+ textAlign:'center',
|
|
|
|
|
+ marginTop: rpxToPx(24),
|
|
|
|
|
+ marginBottom: rpxToPx(24),
|
|
|
|
|
+ whiteSpace:'nowrap',
|
|
|
|
|
+ overflow:'hidden',
|
|
|
|
|
+ textOverflow:'ellipsis'
|
|
|
|
|
+ }}
|
|
|
|
|
+ >{user.isLogin ? user.nickname : t('page.more.un_login')}</Text>
|
|
|
<View className="avatar" style={{
|
|
<View className="avatar" style={{
|
|
|
opacity: user.isLogin ? 1 : 0.4,
|
|
opacity: user.isLogin ? 1 : 0.4,
|
|
|
background: user.isLogin ? 'transparent' : '#fff'
|
|
background: user.isLogin ? 'transparent' : '#fff'
|
|
@@ -294,7 +312,7 @@ export default function Page() {
|
|
|
}} /> : <Image src={require('@/assets/images/user.png')} className="avatar_placeholder" />
|
|
}} /> : <Image src={require('@/assets/images/user.png')} className="avatar_placeholder" />
|
|
|
}
|
|
}
|
|
|
</View>
|
|
</View>
|
|
|
- <Text className="h50 bold" style={{ color: user.isLogin ? '#000' : MainColorType.g02, marginTop: rpxToPx(24) }}>{user.isLogin ? user.nickname : t('page.more.un_login')}</Text>
|
|
|
|
|
|
|
+
|
|
|
</View>
|
|
</View>
|
|
|
<View style={{
|
|
<View style={{
|
|
|
display: 'flex', flexDirection: 'column',
|
|
display: 'flex', flexDirection: 'column',
|
|
@@ -311,19 +329,25 @@ export default function Page() {
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|
|
|
<Image style={{ width: rpxToPx(228), height: rpxToPx(36), marginTop: rpxToPx(26) }} src={require('@assets/images/center_arrow.png')} />
|
|
<Image style={{ width: rpxToPx(228), height: rpxToPx(36), marginTop: rpxToPx(26) }} src={require('@assets/images/center_arrow.png')} />
|
|
|
- <View className="profile_cell member_cell">
|
|
|
|
|
|
|
+ <View className="profile_cell member_cell" style={{height:rpxToPx(172)}}>
|
|
|
<View style={{ flex: 1, display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
|
<View style={{ flex: 1, display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
|
|
- <View className="h34 bold" style={{ color: MainColorType.blue, marginBottom: rpxToPx(12) }}>成为 Pro 会员</View>
|
|
|
|
|
- <View className="h24" style={{ color: MainColorType.g02 }}>{isMember() ? memberdesc() : '解锁会员专项功能'}</View>
|
|
|
|
|
|
|
+ <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 }}>成为 Pro 会员</View>
|
|
|
|
|
+ </View>
|
|
|
|
|
+
|
|
|
|
|
+ <View className="h24" style={{ color: MainColorType.g02,marginTop:rpxToPx(12) }}>{isMember() ? memberdesc() : '解锁会员专项功能'}</View>
|
|
|
|
|
+ <View style={{height:rpxToPx(18),flexShrink:0}}/>
|
|
|
</View>
|
|
</View>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
</View>
|
|
</View>
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
<View className="profile_cell profile_cell_space" onClick={goMetric}>
|
|
<View className="profile_cell profile_cell_space" onClick={goMetric}>
|
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
|
<Text style={{ flex: 1 }}>Metric</Text>
|
|
<Text style={{ flex: 1 }}>Metric</Text>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
<View className="profile_cell profile_cell_space" onClick={() => {
|
|
<View className="profile_cell profile_cell_space" onClick={() => {
|
|
@@ -331,7 +355,7 @@ export default function Page() {
|
|
|
}}>
|
|
}}>
|
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
|
<Text style={{ flex: 1 }}>Album</Text>
|
|
<Text style={{ flex: 1 }}>Album</Text>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
<View className="profile_cell_line" />
|
|
<View className="profile_cell_line" />
|
|
|
</View>
|
|
</View>
|
|
|
<View className="profile_cell" onClick={() => {
|
|
<View className="profile_cell" onClick={() => {
|
|
@@ -339,7 +363,7 @@ export default function Page() {
|
|
|
}}>
|
|
}}>
|
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
|
<Text style={{ flex: 1 }}>Journal</Text>
|
|
<Text style={{ flex: 1 }}>Journal</Text>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
<View className="profile_cell profile_cell_space" onClick={() => {
|
|
<View className="profile_cell profile_cell_space" onClick={() => {
|
|
@@ -347,25 +371,25 @@ export default function Page() {
|
|
|
}}>
|
|
}}>
|
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
|
<Text style={{ flex: 1 }}>Schedule</Text>
|
|
<Text style={{ flex: 1 }}>Schedule</Text>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
<View className="profile_cell_line" />
|
|
<View className="profile_cell_line" />
|
|
|
</View>
|
|
</View>
|
|
|
<View className="profile_cell" onClick={goCalendar}>
|
|
<View className="profile_cell" onClick={goCalendar}>
|
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
|
<Text style={{ flex: 1 }}>Calendar</Text>
|
|
<Text style={{ flex: 1 }}>Calendar</Text>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
<View className="profile_cell_line" />
|
|
<View className="profile_cell_line" />
|
|
|
</View>
|
|
</View>
|
|
|
<View className="profile_cell" onClick={goWeekly}>
|
|
<View className="profile_cell" onClick={goWeekly}>
|
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
|
<Text style={{ flex: 1 }}>Window</Text>
|
|
<Text style={{ flex: 1 }}>Window</Text>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
<View className="profile_cell profile_cell_space" onClick={goSetting}>
|
|
<View className="profile_cell profile_cell_space" onClick={goSetting}>
|
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />
|
|
|
<Text style={{ flex: 1 }}>Settings</Text>
|
|
<Text style={{ flex: 1 }}>Settings</Text>
|
|
|
- <Image src={require('@assets/_health/cell_arrow.png')} className="profile_cell_arrow" />
|
|
|
|
|
|
|
+ <IconCellArrow color={MainColorType.g03} width={rpxToPx(34)}/>
|
|
|
</View>
|
|
</View>
|
|
|
<View style={{ height: 40 }}></View>
|
|
<View style={{ height: 40 }}></View>
|
|
|
|
|
|