mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-12 22:35:37 +08:00
更新会员中心ui
This commit is contained in:
@@ -431,13 +431,17 @@ function MemberIndex(props) {
|
||||
Taro.navigateTo({ url: link })
|
||||
}
|
||||
}
|
||||
|
||||
const onLoginChange = (url) => {
|
||||
if (!isLogin) return
|
||||
Taro.navigateTo({ url })
|
||||
}
|
||||
|
||||
const VipGradeDom = () => {
|
||||
return (
|
||||
<View
|
||||
className='user-grade-name'
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: '/subpages/member/member-level' })
|
||||
}}
|
||||
onClick={() => onLoginChange('/subpages/member/member-level')}
|
||||
>
|
||||
<Text>
|
||||
{{
|
||||
@@ -478,15 +482,11 @@ function MemberIndex(props) {
|
||||
className='header-block'
|
||||
style={userInfo?.gradeInfo?.grade_background ? memberBckStyle : {}}
|
||||
>
|
||||
<View className='user-info-card'>
|
||||
<SpLogin className='user-info-card'>
|
||||
<View className='user-info-header'>
|
||||
<View
|
||||
className='user-avatar'
|
||||
onClick={() => {
|
||||
if (isLogin) {
|
||||
Taro.navigateTo({ url: '/subpages/member/user-info' })
|
||||
}
|
||||
}}
|
||||
onClick={() => onLoginChange('/subpages/member/user-info')}
|
||||
style={{ width: '72px', height: '72px' }}
|
||||
>
|
||||
<SpImage
|
||||
@@ -502,7 +502,7 @@ function MemberIndex(props) {
|
||||
<>
|
||||
<View
|
||||
className='user-name'
|
||||
onClick={() => Taro.navigateTo({ url: '/subpages/member/user-info' })}
|
||||
onClick={() => onLoginChange('/subpages/member/user-info')}
|
||||
>
|
||||
{userInfo?.username || userInfo?.mobile}
|
||||
</View>
|
||||
@@ -517,9 +517,7 @@ function MemberIndex(props) {
|
||||
</View>
|
||||
</>
|
||||
) : (
|
||||
<SpLogin newUser={isNewUser}>
|
||||
<Text className='login-text font-medium text-34'>点击登录</Text>
|
||||
</SpLogin>
|
||||
<Text className='login-text font-medium text-34'>点击登录</Text>
|
||||
)}
|
||||
</View>
|
||||
|
||||
@@ -541,38 +539,27 @@ function MemberIndex(props) {
|
||||
{isLogin && config.menu.member_code && (
|
||||
<Text
|
||||
className='iconfont icon-erweima-01'
|
||||
onClick={() => Taro.navigateTo({ url: '/marketing/pages/member/member-code' })}
|
||||
onClick={() => onLoginChange('/marketing/pages/member/member-code')}
|
||||
></Text>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View className='user-stats'>
|
||||
<SpLogin
|
||||
onChange={() => {
|
||||
Taro.navigateTo({ url: '/subpages/marketing/coupon' })
|
||||
}}
|
||||
<View
|
||||
className='stat-item'
|
||||
onClick={() => onLoginChange('/subpages/marketing/coupon')}
|
||||
>
|
||||
<View
|
||||
className='stat-item'
|
||||
// onClick={() => }
|
||||
>
|
||||
<Text className='stat-value'>{isLogin ? state.couponCount || 0 : '···'}</Text>
|
||||
<Text className='stat-label'>优惠券</Text>
|
||||
</View>
|
||||
</SpLogin>
|
||||
<SpLogin
|
||||
onChange={() => {
|
||||
handleClickLink('/subpages/member/point-detail')
|
||||
}}
|
||||
>
|
||||
<View className='stat-item'>
|
||||
<Text className='stat-value'>{isLogin ? state.point || 0 : '···'}</Text>
|
||||
<Text className='stat-label'>积分</Text>
|
||||
</View>
|
||||
</SpLogin>
|
||||
<Text className='stat-value'>{isLogin ? state.couponCount || 0 : '···'}</Text>
|
||||
<Text className='stat-label'>优惠券</Text>
|
||||
</View>
|
||||
|
||||
<View className='stat-item' onClick={() => onLoginChange('/subpages/member/point-detail')}>
|
||||
<Text className='stat-value'>{isLogin ? state.point || 0 : '···'}</Text>
|
||||
<Text className='stat-label'>积分</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</SpLogin>
|
||||
{/* <View className='header-block__ft'></View> */}
|
||||
</View>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user