个人中心调整
This commit is contained in:
@@ -37,16 +37,16 @@
|
||||
<view class="btn" @click="openVip">开通</view>
|
||||
</view>
|
||||
<!-- 健康数据 -->
|
||||
<view class="health-flex">
|
||||
<view class="health-flex" v-if="userInfo.has_record">
|
||||
<view class="health-flex-item">
|
||||
<view class="title">
|
||||
体脂率
|
||||
<image class="icon" src="@/static/user/icon_04.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="num">
|
||||
22<text>%</text>
|
||||
{{userInfo.record.fat.fat}}<text>%</text>
|
||||
</view>
|
||||
<view class="hith">处于正常范围</view>
|
||||
<view class="hith">{{userInfo.record.fat.text}}</view>
|
||||
</view>
|
||||
<view class="health-flex-item">
|
||||
<view class="title">
|
||||
@@ -54,9 +54,9 @@
|
||||
<image class="icon" src="@/static/user/icon_05.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="num">
|
||||
78.0<text>KG</text>
|
||||
{{userInfo.record.weight.weight}}<text>KG</text>
|
||||
</view>
|
||||
<view class="hith">你上周减少1.2kg</view>
|
||||
<view class="hith">{{userInfo.record.weight.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
@@ -135,6 +135,7 @@
|
||||
getInfo(){
|
||||
if(this.$store.state.token === '') return
|
||||
info().then(res => {
|
||||
console.log(res)
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.nickname
|
||||
})
|
||||
@@ -200,6 +201,10 @@
|
||||
},
|
||||
// 退出登录
|
||||
logOut(){
|
||||
this.userInfo = {
|
||||
nickname: "",
|
||||
avatar : ""
|
||||
}
|
||||
this.$store.commit('setToken', '')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user