个人中心调整

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

5
package-lock.json generated
View File

@@ -172,6 +172,11 @@
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
},
"moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
},
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",

View File

@@ -27,8 +27,8 @@
"path": "pages/record/index",
"name": "Record",
"style": {
"navigationBarTitleText": "记录",
"navigationStyle": "custom"
"navigationBarTitleText": "记录"
// "navigationStyle": "custom"
}
},
{
@@ -740,16 +740,16 @@
"pagePath": "pages/index/index",
"text": "健康"
},
{
"iconPath": "static/tabBar/tabBar_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
"pagePath": "pages/service/index",
"text": "服务"
},
{
"iconPath": "static/tabBar/tabBar_02.png",
"selectedIconPath": "static/tabBar/tabBar_show_02.png",
"pagePath": "pages/store/index",
"text": "好物"
},
{
"iconPath": "static/tabBar/tabBar_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
"pagePath": "pages/service/index",
"text": "生活"
},
{

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