调整个人中心会员身份

This commit is contained in:
唐明明
2022-01-14 14:41:44 +08:00
parent e7d4e15459
commit a93a07a7e5
6 changed files with 33 additions and 272 deletions

View File

@@ -8,7 +8,7 @@
<view class="user-content">
<block v-if="$store.state.token != ''">
<view class="name">{{userInfo.nickname}}</view>
<view class="tabs">
<view class="tabs" v-if="userInfo.identity.length != 0">
<view class="tabs-item"><image src="@/static/user/icon_07.png"></image>会员</view>
</view>
</block>
@@ -34,7 +34,7 @@
direction="column"
></u-notice-bar>
</view>
<view class="btn" @click="openVip">开通</view>
<view class="btn" @click="openVip" v-if="userInfo.identity.length === 0">开通</view>
</view>
<!-- 健康数据 -->
<view class="health-flex" v-if="userInfo.has_record">
@@ -100,7 +100,7 @@
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
</view>
</view>
<view class="btns-box">
<view class="btns-box" v-if="$store.state.token != ''">
<view class="btns-box-item" @click="logOut">
<image class="icon" src="@/static/user/userIcon_05.png" mode="widthFix"></image>
退出登录
@@ -123,7 +123,8 @@
cardText: ['新用户首单即赠会员', '老用户专属验证开通会员'],
userInfo: {
nickname: "",
avatar : ""
avatar : "",
identity: []
}
};
},
@@ -188,7 +189,6 @@
onFiles(){
if(this.isLogin()){
if(!this.userInfo.has_record){
console.log('未完善资料')
this.$Router.push({name: 'EssentialInfo'})
return
}
@@ -212,9 +212,10 @@
},
// 退出登录
logOut(){
this.userInfo = {
nickname: "",
avatar : ""
this.userInfo = {
nickname: "",
avatar : "",
identity: []
}
this.$store.commit('setToken', '')
}