个人中心调整
This commit is contained in:
5
package-lock.json
generated
5
package-lock.json
generated
@@ -172,6 +172,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
||||||
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
|
"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": {
|
"randombytes": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||||
|
|||||||
16
pages.json
16
pages.json
@@ -27,8 +27,8 @@
|
|||||||
"path": "pages/record/index",
|
"path": "pages/record/index",
|
||||||
"name": "Record",
|
"name": "Record",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "记录",
|
"navigationBarTitleText": "记录"
|
||||||
"navigationStyle": "custom"
|
// "navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -740,16 +740,16 @@
|
|||||||
"pagePath": "pages/index/index",
|
"pagePath": "pages/index/index",
|
||||||
"text": "健康"
|
"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",
|
"iconPath": "static/tabBar/tabBar_02.png",
|
||||||
"selectedIconPath": "static/tabBar/tabBar_show_02.png",
|
"selectedIconPath": "static/tabBar/tabBar_show_02.png",
|
||||||
"pagePath": "pages/store/index",
|
"pagePath": "pages/store/index",
|
||||||
|
"text": "好物"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"iconPath": "static/tabBar/tabBar_01.png",
|
||||||
|
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
|
||||||
|
"pagePath": "pages/service/index",
|
||||||
"text": "生活"
|
"text": "生活"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,6 +44,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view @click="$Router.push({name: 'Record'})">
|
||||||
|
临时记录
|
||||||
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -141,11 +141,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import arprogress from "@/components/ar-circle-progress/index.vue";
|
import arprogress from "@/components/ar-circle-progress/index.vue";
|
||||||
import goodsList from "@/components/foods";
|
import goodsList from "@/components/foods";
|
||||||
import {
|
import { plans, editHealthFoods, delHealthFoods } from "@/apis/interfaces/foods.js";
|
||||||
plans,
|
|
||||||
editHealthFoods,
|
|
||||||
delHealthFoods,
|
|
||||||
} from "@/apis/interfaces/foods.js";
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import addFoods from "@/components/add-goods-template/add-goods-template";
|
import addFoods from "@/components/add-goods-template/add-goods-template";
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -37,16 +37,16 @@
|
|||||||
<view class="btn" @click="openVip">开通</view>
|
<view class="btn" @click="openVip">开通</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 健康数据 -->
|
<!-- 健康数据 -->
|
||||||
<view class="health-flex">
|
<view class="health-flex" v-if="userInfo.has_record">
|
||||||
<view class="health-flex-item">
|
<view class="health-flex-item">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
体脂率
|
体脂率
|
||||||
<image class="icon" src="@/static/user/icon_04.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/icon_04.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
22<text>%</text>
|
{{userInfo.record.fat.fat}}<text>%</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="hith">处于正常范围</view>
|
<view class="hith">{{userInfo.record.fat.text}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="health-flex-item">
|
<view class="health-flex-item">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
@@ -54,9 +54,9 @@
|
|||||||
<image class="icon" src="@/static/user/icon_05.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/icon_05.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
78.0<text>KG</text>
|
{{userInfo.record.weight.weight}}<text>KG</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="hith">你上周减少1.2kg</view>
|
<view class="hith">{{userInfo.record.weight.text}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单 -->
|
<!-- 订单 -->
|
||||||
@@ -135,6 +135,7 @@
|
|||||||
getInfo(){
|
getInfo(){
|
||||||
if(this.$store.state.token === '') return
|
if(this.$store.state.token === '') return
|
||||||
info().then(res => {
|
info().then(res => {
|
||||||
|
console.log(res)
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: res.nickname
|
title: res.nickname
|
||||||
})
|
})
|
||||||
@@ -200,6 +201,10 @@
|
|||||||
},
|
},
|
||||||
// 退出登录
|
// 退出登录
|
||||||
logOut(){
|
logOut(){
|
||||||
|
this.userInfo = {
|
||||||
|
nickname: "",
|
||||||
|
avatar : ""
|
||||||
|
}
|
||||||
this.$store.commit('setToken', '')
|
this.$store.commit('setToken', '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user