个人中心调整

This commit is contained in:
唐明明
2022-01-14 12:43:31 +08:00
parent b3c1244309
commit 7c965b7bfc
6 changed files with 30 additions and 20 deletions

View File

@@ -44,6 +44,10 @@
</view>
</view>
</view>
<view @click="$Router.push({name: 'Record'})">
临时记录
</view>
</block>
</view>
</template>

View File

@@ -141,11 +141,7 @@
<script>
import arprogress from "@/components/ar-circle-progress/index.vue";
import goodsList from "@/components/foods";
import {
plans,
editHealthFoods,
delHealthFoods,
} from "@/apis/interfaces/foods.js";
import { plans, editHealthFoods, delHealthFoods } from "@/apis/interfaces/foods.js";
import moment from "moment";
import addFoods from "@/components/add-goods-template/add-goods-template";
export default {

View File

@@ -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', '')
}
}