修复...
This commit is contained in:
@@ -11,21 +11,18 @@
|
|||||||
<!-- 进度 -->
|
<!-- 进度 -->
|
||||||
<view class="plan">
|
<view class="plan">
|
||||||
<view class="plan-1">
|
<view class="plan-1">
|
||||||
<span>基本信息</span>
|
<span>基本信息</span> <u-line-progress :percentage="percentplan1" activeColor="#34ce98" class="line-progress" :showText="false" />
|
||||||
<u-line-progress :percentage="percentplan1" activeColor="#34ce98" class="line-progress" :showText="false" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="plan-2">
|
<view class="plan-2">
|
||||||
<span>健康目标</span>
|
<span>健康目标</span> <u-line-progress :percentage="percentplan2" activeColor="#34ce98" width="200rpx" class="line-progress" :showText="false" />
|
||||||
<u-line-progress :percentage="percentplan2" activeColor="#34ce98" width="200rpx" class="line-progress" :showText="false" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="plan-3">
|
<view class="plan-3">
|
||||||
<span>行为习惯</span>
|
<span>行为习惯</span> <u-line-progress :percentage="percentplan3" activeColor="#34ce98" width="200rpx" class="line-progress" :showText="false" />
|
||||||
<u-line-progress :percentage="percentplan3" activeColor="#34ce98" width="200rpx" class="line-progress" :showText="false" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 进度1 基本信息 -->
|
<!-- 进度1 基本信息 -->
|
||||||
<view>
|
<block>
|
||||||
<!-- 进度1 基本信息页面展示 性别 -->
|
<!-- 进度1 基本信息页面展示 性别 -->
|
||||||
<view class="plan-content" v-if="sexShow">
|
<view class="plan-content" v-if="sexShow">
|
||||||
<view class="info-des">生理性别和激素会影响我们的身体代谢食物的方式</view>
|
<view class="info-des">生理性别和激素会影响我们的身体代谢食物的方式</view>
|
||||||
@@ -47,19 +44,7 @@
|
|||||||
<view class="age">
|
<view class="age">
|
||||||
<view class="info-title">你的出生日期是?</view>
|
<view class="info-title">你的出生日期是?</view>
|
||||||
<view class="year" @change="dateShow = true">{{ showBirthday }}</view>
|
<view class="year" @change="dateShow = true">{{ showBirthday }}</view>
|
||||||
<u-datetime-picker
|
<u-datetime-picker confirmColor="#34ce98" ref="datetimePicker" v-model="birthday" mode="date" :show="dateShow" :formatter="formatter" :minDate="-302688000" :maxDate="maxDate" :closeOnClickOverlay="true" @confirm="confirmBirthday" @cancel="camcelBirthday" />
|
||||||
confirmColor="#34ce98"
|
|
||||||
ref="datetimePicker"
|
|
||||||
v-model="birthday"
|
|
||||||
mode="date"
|
|
||||||
:show="dateShow"
|
|
||||||
:formatter="formatter"
|
|
||||||
:minDate="-302688000"
|
|
||||||
:maxDate="maxDate"
|
|
||||||
:closeOnClickOverlay="true"
|
|
||||||
@confirm="confirmBirthday"
|
|
||||||
@cancel="camcelBirthday"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -68,7 +53,6 @@
|
|||||||
<u-image class="sex-item-avatar" width="100rpx" height="100rpx" :src="require('../../static/imgs/avatar-1.png')" :lazy-load="true" shape="circle" />
|
<u-image class="sex-item-avatar" width="100rpx" height="100rpx" :src="require('../../static/imgs/avatar-1.png')" :lazy-load="true" shape="circle" />
|
||||||
<view class="info-des">身高体重信息对健康信息有重要参考价值</view>
|
<view class="info-des">身高体重信息对健康信息有重要参考价值</view>
|
||||||
<view class="info-title">您的身高是?</view>
|
<view class="info-title">您的身高是?</view>
|
||||||
<!-- -->
|
|
||||||
<view class="weight">
|
<view class="weight">
|
||||||
<view class="count"><span>{{ heightU }}</span>厘米</view>
|
<view class="count"><span>{{ heightU }}</span>厘米</view>
|
||||||
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollHeight" :scrollLeft="Number(heightU)" />
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollHeight" :scrollLeft="Number(heightU)" />
|
||||||
@@ -84,51 +68,18 @@
|
|||||||
<view class="next" @click="weightClick(2)">下一步</view>
|
<view class="next" @click="weightClick(2)">下一步</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</block>
|
||||||
|
|
||||||
<!-- 进度2 健康目标 -->
|
<!-- 进度2 健康目标 -->
|
||||||
<view>
|
<block>
|
||||||
<!-- 减脂类型 -->
|
<!-- 减脂类型 -->
|
||||||
<view v-if="targetShow" class="plan-content target-content">
|
<view v-if="targetShow" class="plan-content target-content">
|
||||||
<u-image class="sex-item-avatar" width="100rpx" height="100rpx" :src="require('../../static/imgs/avatar-1.png')" :lazy-load="true" shape="circle" />
|
<u-image class="sex-item-avatar" width="100rpx" height="100rpx" :src="require('../../static/imgs/avatar-1.png')" :lazy-load="true" shape="circle" />
|
||||||
<view class="info-title">您的目标是?</view>
|
<view class="info-title">您的目标是?</view>
|
||||||
<view class="target-type">
|
<view class="target-type">
|
||||||
<view class="target-type-item">
|
<view class="target-type-item"> <u-image class="target-img" width="160rpx" height="160rpx" @click="activedTarget = '1'" :src="activedTarget === '1' ? require('../../static/imgs/ic-w-s.png') : require('../../static/imgs/ic-w-n.png')" :lazy-load="true" shape="circle" /> 减肥 </view>
|
||||||
<u-image
|
<view class="target-type-item"> <u-image class="target-img" width="160rpx" height="160rpx" @click="activedTarget = '2'" :src="activedTarget === '2' ? require('../../static/imgs/ic-b-s.png') : require('../../static/imgs/ic-b-n.png')" :lazy-load="true" shape="circle" /> 保持体重 </view>
|
||||||
class="target-img"
|
<view class="target-type-item"> <u-image class="target-img" width="160rpx" height="160rpx" @click="activedTarget = '3'" :src="activedTarget === '3' ? require('../../static/imgs/ic-m-s.png') : require('../../static/imgs/ic-m-n.png')" :lazy-load="true" shape="circle" /> 增肌 </view>
|
||||||
width="160rpx"
|
|
||||||
height="160rpx"
|
|
||||||
@click="activedTarget = '1'"
|
|
||||||
:src="activedTarget === '1' ? require('../../static/imgs/ic-w-s.png') : require('../../static/imgs/ic-w-n.png')"
|
|
||||||
:lazy-load="true"
|
|
||||||
shape="circle"
|
|
||||||
/>
|
|
||||||
减肥
|
|
||||||
</view>
|
|
||||||
<view class="target-type-item">
|
|
||||||
<u-image
|
|
||||||
class="target-img"
|
|
||||||
width="160rpx"
|
|
||||||
height="160rpx"
|
|
||||||
@click="activedTarget = '2'"
|
|
||||||
:src="activedTarget === '2' ? require('../../static/imgs/ic-b-s.png') : require('../../static/imgs/ic-b-n.png')"
|
|
||||||
:lazy-load="true"
|
|
||||||
shape="circle"
|
|
||||||
/>
|
|
||||||
保持体重
|
|
||||||
</view>
|
|
||||||
<view class="target-type-item">
|
|
||||||
<u-image
|
|
||||||
class="target-img"
|
|
||||||
width="160rpx"
|
|
||||||
height="160rpx"
|
|
||||||
@click="activedTarget = '3'"
|
|
||||||
:src="activedTarget === '3' ? require('../../static/imgs/ic-m-s.png') : require('../../static/imgs/ic-m-n.png')"
|
|
||||||
:lazy-load="true"
|
|
||||||
shape="circle"
|
|
||||||
/>
|
|
||||||
增肌
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="pre-next">
|
<view class="pre-next">
|
||||||
<view class="pro" @click="targetClick(1)">上一步</view>
|
<view class="pro" @click="targetClick(1)">上一步</view>
|
||||||
@@ -141,10 +92,7 @@
|
|||||||
<view class="info-title">您的打算减脂多少?</view>
|
<view class="info-title">您的打算减脂多少?</view>
|
||||||
<view class="target-type">
|
<view class="target-type">
|
||||||
<view class="target-type-item">
|
<view class="target-type-item">
|
||||||
<view class="count">
|
<view class="count"> <span>{{ weightTargetU }}</span> 公斤 </view>
|
||||||
<span>{{ weightTargetU }}</span>
|
|
||||||
公斤
|
|
||||||
</view>
|
|
||||||
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollTargetWeight" :scrollLeft="Number(weightTargetU)" />
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollTargetWeight" :scrollLeft="Number(weightTargetU)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -153,7 +101,7 @@
|
|||||||
<view class="next" @click="targetWeightClick(2)">下一步</view>
|
<view class="next" @click="targetWeightClick(2)">下一步</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</block>
|
||||||
|
|
||||||
<!-- 进度3 行为习惯 -->
|
<!-- 进度3 行为习惯 -->
|
||||||
<!-- 减脂类型 -->
|
<!-- 减脂类型 -->
|
||||||
@@ -162,51 +110,19 @@
|
|||||||
<view class="info-title">您的运动量是?</view>
|
<view class="info-title">您的运动量是?</view>
|
||||||
<view class="target-type">
|
<view class="target-type">
|
||||||
<view class="target-type-item">
|
<view class="target-type-item">
|
||||||
<u-image
|
<u-image class="target-img" width="120rpx" height="120rpx" @click="activedbehaviarTarget = '1'" :src="activedbehaviarTarget === '1' ? require('../../static/imgs/ic-w-01.png') : require('../../static/imgs/ic-w-02.png')" :lazy-load="true" shape="circle" />
|
||||||
class="target-img"
|
|
||||||
width="120rpx"
|
|
||||||
height="120rpx"
|
|
||||||
@click="activedbehaviarTarget = '1'"
|
|
||||||
:src="activedbehaviarTarget === '1' ? require('../../static/imgs/ic-w-01.png') : require('../../static/imgs/ic-w-02.png')"
|
|
||||||
:lazy-load="true"
|
|
||||||
shape="circle"
|
|
||||||
/>
|
|
||||||
久坐不动
|
久坐不动
|
||||||
</view>
|
</view>
|
||||||
<view class="target-type-item">
|
<view class="target-type-item">
|
||||||
<u-image
|
<u-image class="target-img" width="120rpx" height="120rpx" @click="activedbehaviarTarget = '2'" :src="activedbehaviarTarget === '2' ? require('../../static/imgs/ic-w-03.png') : require('../../static/imgs/ic-w-04.png')" :lazy-load="true" shape="circle" />
|
||||||
class="target-img"
|
|
||||||
width="120rpx"
|
|
||||||
height="120rpx"
|
|
||||||
@click="activedbehaviarTarget = '2'"
|
|
||||||
:src="activedbehaviarTarget === '2' ? require('../../static/imgs/ic-w-03.png') : require('../../static/imgs/ic-w-04.png')"
|
|
||||||
:lazy-load="true"
|
|
||||||
shape="circle"
|
|
||||||
/>
|
|
||||||
少量运动
|
少量运动
|
||||||
</view>
|
</view>
|
||||||
<view class="target-type-item">
|
<view class="target-type-item">
|
||||||
<u-image
|
<u-image class="target-img" width="120rpx" height="120rpx" @click="activedbehaviarTarget = '3'" :src="activedbehaviarTarget === '3' ? require('../../static/imgs/ic-w-05.png') : require('../../static/imgs/ic-w-06.png')" :lazy-load="true" shape="circle" />
|
||||||
class="target-img"
|
|
||||||
width="120rpx"
|
|
||||||
height="120rpx"
|
|
||||||
@click="activedbehaviarTarget = '3'"
|
|
||||||
:src="activedbehaviarTarget === '3' ? require('../../static/imgs/ic-w-05.png') : require('../../static/imgs/ic-w-06.png')"
|
|
||||||
:lazy-load="true"
|
|
||||||
shape="circle"
|
|
||||||
/>
|
|
||||||
中等运动量
|
中等运动量
|
||||||
</view>
|
</view>
|
||||||
<view class="target-type-item">
|
<view class="target-type-item">
|
||||||
<u-image
|
<u-image class="target-img" width="120rpx" height="120rpx" @click="activedbehaviarTarget = '4'" :src="activedbehaviarTarget === '4' ? require('../../static/imgs/ic-w-07.png') : require('../../static/imgs/ic-w-08.png')" :lazy-load="true" shape="circle" />
|
||||||
class="target-img"
|
|
||||||
width="120rpx"
|
|
||||||
height="120rpx"
|
|
||||||
@click="activedbehaviarTarget = '4'"
|
|
||||||
:src="activedbehaviarTarget === '4' ? require('../../static/imgs/ic-w-07.png') : require('../../static/imgs/ic-w-08.png')"
|
|
||||||
:lazy-load="true"
|
|
||||||
shape="circle"
|
|
||||||
/>
|
|
||||||
超强度运动
|
超强度运动
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -274,7 +190,6 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
showBirthday() {
|
showBirthday() {
|
||||||
console.log(moment(this.birthday).format('YYYY年MM月DD日'));
|
|
||||||
return moment(this.birthday).format('YYYY年MM月DD日');
|
return moment(this.birthday).format('YYYY年MM月DD日');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -297,6 +212,7 @@ export default {
|
|||||||
this.percentplan1 = uni.$u.range(0, 100, this.percentplan1 + 33.33); // 增加进度
|
this.percentplan1 = uni.$u.range(0, 100, this.percentplan1 + 33.33); // 增加进度
|
||||||
this.heightWeightShow = true; // 展示身高体重模块
|
this.heightWeightShow = true; // 展示身高体重模块
|
||||||
},
|
},
|
||||||
|
|
||||||
// 年龄 ----- 取消选择年龄
|
// 年龄 ----- 取消选择年龄
|
||||||
camcelBirthday() {
|
camcelBirthday() {
|
||||||
this.birthdayShow = false; // // 年龄页面弹窗不显示
|
this.birthdayShow = false; // // 年龄页面弹窗不显示
|
||||||
@@ -304,6 +220,7 @@ export default {
|
|||||||
this.percentplan1 = 0; // 进度为0
|
this.percentplan1 = 0; // 进度为0
|
||||||
this.sexShow = true; // 显示性别页面
|
this.sexShow = true; // 显示性别页面
|
||||||
},
|
},
|
||||||
|
|
||||||
//年龄------------- 过滤出生年月日
|
//年龄------------- 过滤出生年月日
|
||||||
formatter(type, value) {
|
formatter(type, value) {
|
||||||
if (type === 'year') {return `${value}年`;}
|
if (type === 'year') {return `${value}年`;}
|
||||||
@@ -311,6 +228,8 @@ export default {
|
|||||||
if (type === 'day') {return `${value}日`;}
|
if (type === 'day') {return `${value}日`;}
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 体重---------标尺滚动
|
// 体重---------标尺滚动
|
||||||
scrollWeight(msg) {
|
scrollWeight(msg) {
|
||||||
this.weightU = msg;
|
this.weightU = msg;
|
||||||
@@ -332,6 +251,8 @@ export default {
|
|||||||
this.targetShow = true; // 目标页面展示
|
this.targetShow = true; // 目标页面展示
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 目标 ------------点击 1上一页 2 下一页
|
// 目标 ------------点击 1上一页 2 下一页
|
||||||
targetClick(type) {
|
targetClick(type) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
@@ -368,6 +289,8 @@ export default {
|
|||||||
this.behaviorShow = true; // 打开行为习惯页面
|
this.behaviorShow = true; // 打开行为习惯页面
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 目标 运动量--------- 1上一页 2 下一页
|
// 目标 运动量--------- 1上一页 2 下一页
|
||||||
targetBehaviorClick(type) {
|
targetBehaviorClick(type) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
@@ -391,7 +314,6 @@ export default {
|
|||||||
exercise: this.activedbehaviarTarget, // 运动量
|
exercise: this.activedbehaviarTarget, // 运动量
|
||||||
days: 1
|
days: 1
|
||||||
};
|
};
|
||||||
console.log(params, 'params.....');
|
|
||||||
recordsHealth(params)
|
recordsHealth(params)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -408,8 +330,10 @@ export default {
|
|||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
});
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,18 +9,7 @@
|
|||||||
<view class="evaluation">
|
<view class="evaluation">
|
||||||
<!-- 进度 -->
|
<!-- 进度 -->
|
||||||
<view class="percent">
|
<view class="percent">
|
||||||
<u-icon
|
<u-icon name="arrow-left" :color="colorList[colorIndex]" size="14" label="上一题" :labelColor="colorList[colorIndex]" labelSize="14" :bold="true" space="3" v-if="page !== 1" @click="preQ" />
|
||||||
name="arrow-left"
|
|
||||||
:color="colorList[colorIndex]"
|
|
||||||
size="14"
|
|
||||||
label="上一题"
|
|
||||||
:labelColor="colorList[colorIndex]"
|
|
||||||
labelSize="14"
|
|
||||||
:bold="true"
|
|
||||||
space="3"
|
|
||||||
v-if="page !== 1"
|
|
||||||
@click="preQ"
|
|
||||||
/>
|
|
||||||
<u-line-progress class="pre-ico" :percentage="percent" height="10" :showText="false" :activeColor="colorList[colorIndex]" />
|
<u-line-progress class="pre-ico" :percentage="percent" height="10" :showText="false" :activeColor="colorList[colorIndex]" />
|
||||||
<span :style="{ color: colorList[colorIndex] }">{{ percent }}%</span>
|
<span :style="{ color: colorList[colorIndex] }">{{ percent }}%</span>
|
||||||
</view>
|
</view>
|
||||||
@@ -30,15 +19,7 @@
|
|||||||
<view class="lists">
|
<view class="lists">
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<u-radio-group placement="column" @change="groupChange" iconPlacement="right" class="radio-g" :value="currentId">
|
<u-radio-group placement="column" @change="groupChange" iconPlacement="right" class="radio-g" :value="currentId">
|
||||||
<u-radio
|
<u-radio class="radio-item" :customStyle="{ marginBottom: '8px' }" v-for="(item, index) in currentInfo.options" :key="index" :label="item.title" :name="item.option_id" :activeColor="colorList[colorIndex]" />
|
||||||
class="radio-item"
|
|
||||||
:customStyle="{ marginBottom: '8px' }"
|
|
||||||
v-for="(item, index) in currentInfo.options"
|
|
||||||
:key="index"
|
|
||||||
:label="item.title"
|
|
||||||
:name="item.option_id"
|
|
||||||
:activeColor="colorList[colorIndex]"
|
|
||||||
></u-radio>
|
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</view>
|
</view>
|
||||||
<!-- 底部确认按钮 -->
|
<!-- 底部确认按钮 -->
|
||||||
@@ -47,13 +28,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { evaluationsQuestion, evaluationsAnswers } from '@/apis/interfaces/evaluation.js';
|
import {
|
||||||
export default {
|
evaluationsQuestion,
|
||||||
|
evaluationsAnswers
|
||||||
|
} from '@/apis/interfaces/evaluation.js';
|
||||||
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
percent: 70,
|
percent: 70,
|
||||||
colorList: ['#34ce98', '#b6c29a', '#f4d000', '#8a977b', '#e58308', '#dc5712'],
|
colorList: ['#34ce98', '#d04500', '#f4d000', '#55aa00', '#e58308', '#dc5a1d'],
|
||||||
colorIndex: Math.floor(Math.random() * 6), // 基本案列数据
|
colorIndex: Math.floor(Math.random() * 6), // 基本案列数据
|
||||||
currentInfo: {}, //当前题目的内容
|
currentInfo: {}, //当前题目的内容
|
||||||
option_ids: [], // 答案id的数组
|
option_ids: [], // 答案id的数组
|
||||||
@@ -70,11 +54,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 答题列表
|
||||||
getList() {
|
getList() {
|
||||||
evaluationsQuestion(this.$Route.query.id, this.page).then(res => {
|
evaluationsQuestion(this.$Route.query.id, this.page).then(res => {
|
||||||
this.currentInfo = res.data[0];
|
this.currentInfo = res.data[0];
|
||||||
this.percent = Number(((res.page.current - 1) / res.page.total).toFixed(2)) * 100;
|
this.percent = Number(((res.page.current - 1) / res.page.total).toFixed(2)) * 100;
|
||||||
this.has_more = res.page.has_more;
|
this.has_more = res.page.has_more;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
groupChange(n) {
|
groupChange(n) {
|
||||||
@@ -91,7 +83,10 @@ export default {
|
|||||||
next() {
|
next() {
|
||||||
if (this.has_more) {
|
if (this.has_more) {
|
||||||
if (this.currentId === '') {
|
if (this.currentId === '') {
|
||||||
uni.showToast({ title: '请选择答案', icon: 'none' });
|
uni.showToast({
|
||||||
|
title: '请选择答案',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.option_ids.push(this.currentId);
|
this.option_ids.push(this.currentId);
|
||||||
@@ -109,7 +104,6 @@ export default {
|
|||||||
};
|
};
|
||||||
evaluationsAnswers(data)
|
evaluationsAnswers(data)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res);
|
|
||||||
this.parent = 100;
|
this.parent = 100;
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '答题完成,立即查看结果',
|
title: '答题完成,立即查看结果',
|
||||||
@@ -124,17 +118,21 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message
|
title: err.message,
|
||||||
});
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.evaluation {
|
.evaluation {
|
||||||
padding: $padding $padding $padding * 4 $padding;
|
padding: $padding $padding $padding * 4 $padding;
|
||||||
|
|
||||||
.percent {
|
.percent {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@@ -142,18 +140,22 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: $title-size - 2;
|
font-size: $title-size - 2;
|
||||||
|
|
||||||
.pre-ico {
|
.pre-ico {
|
||||||
margin: $padding;
|
margin: $padding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: $title-size + 10;
|
font-size: $title-size + 10;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding-top: $padding;
|
padding-top: $padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lists {
|
.lists {
|
||||||
.radio-g {
|
.radio-g {
|
||||||
padding-top: $padding * 2;
|
padding-top: $padding * 2;
|
||||||
|
|
||||||
.radio-item {
|
.radio-item {
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
@@ -161,6 +163,7 @@ export default {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-btn {
|
.bottom-btn {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 24rpx $padding;
|
padding: 24rpx $padding;
|
||||||
@@ -173,5 +176,5 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { evaluationsInfo } from '@/apis/interfaces/evaluation.js';
|
import {evaluationsInfo} from '@/apis/interfaces/evaluation.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
@@ -32,17 +32,20 @@ export default {
|
|||||||
—
|
—
|
||||||
<br/>
|
<br/>
|
||||||
适用于18-65岁,存在亚健康或尿酸偏高人群`,
|
适用于18-65岁,存在亚健康或尿酸偏高人群`,
|
||||||
shadowStyle: {
|
shadowStyle: {backgroundImage: 'none',paddingTop: '0',marginTop: '20rpx'}
|
||||||
backgroundImage: 'none',
|
|
||||||
paddingTop: '0',
|
|
||||||
marginTop: '20rpx'
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
evaluationsInfo(this.$Route.query.id).then(res => {
|
evaluationsInfo(this.$Route.query.id).then(res => {
|
||||||
this.content = res.content;
|
this.content = res.content;
|
||||||
this.info = res;
|
this.info = res;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -52,19 +55,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
toResult() {
|
toResult() {
|
||||||
console.log('点击了测试');
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/evaluation/result?id=${this.$Route.query.id}`
|
url: `/pages/evaluation/result?id=${this.$Route.query.id}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.introduce {
|
.introduce {
|
||||||
background-color: $main-color;
|
background-color: $main-color;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
||||||
.intro-history {
|
.intro-history {
|
||||||
padding: $padding * 1.5 $padding;
|
padding: $padding * 1.5 $padding;
|
||||||
color: $window-color;
|
color: $window-color;
|
||||||
@@ -76,6 +79,7 @@ export default {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测评展示
|
// 测评展示
|
||||||
.intro-content {
|
.intro-content {
|
||||||
background: rgba($color: #fff, $alpha: 1);
|
background: rgba($color: #fff, $alpha: 1);
|
||||||
@@ -85,6 +89,7 @@ export default {
|
|||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0 0 10rpx 4rpx rgba($color: $main-color, $alpha: 0.1);
|
box-shadow: 0 0 10rpx 4rpx rgba($color: $main-color, $alpha: 0.1);
|
||||||
|
|
||||||
// 标题
|
// 标题
|
||||||
.intro-title {
|
.intro-title {
|
||||||
font-size: $title-size * 1.8;
|
font-size: $title-size * 1.8;
|
||||||
@@ -93,6 +98,7 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
top: -40rpx;
|
top: -40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 介绍
|
// 介绍
|
||||||
.intro-des {
|
.intro-des {
|
||||||
line-height: $title-size * 1.8;
|
line-height: $title-size * 1.8;
|
||||||
@@ -102,10 +108,12 @@ export default {
|
|||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 图片
|
// 图片
|
||||||
.intro-img {
|
.intro-img {
|
||||||
margin-top: $padding * 0.8;
|
margin-top: $padding * 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开始测评
|
// 开始测评
|
||||||
.answer {
|
.answer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -123,6 +131,7 @@ export default {
|
|||||||
font-size: $title-size-m + 6;
|
font-size: $title-size-m + 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 备注信息
|
// 备注信息
|
||||||
.remark {
|
.remark {
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
@@ -130,5 +139,5 @@ export default {
|
|||||||
padding: $padding * 2 $padding;
|
padding: $padding * 2 $padding;
|
||||||
line-height: $title-size * 1.3;
|
line-height: $title-size * 1.3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,44 +11,20 @@
|
|||||||
<!-- 评测列表主要内容 标题 图片 描述 -->
|
<!-- 评测列表主要内容 标题 图片 描述 -->
|
||||||
<view class="--content">
|
<view class="--content">
|
||||||
<u-image class="content-img" width="170rpx" height="170rpx" radius="20rpx" :src="item.cover ? item.cover : require('../../static/imgs/test.png')" :lazy-load="true" />
|
<u-image class="content-img" width="170rpx" height="170rpx" radius="20rpx" :src="item.cover ? item.cover : require('../../static/imgs/test.png')" :lazy-load="true" />
|
||||||
<view class="title-des">
|
<view class="title-des"> <view class="title">{{ item.title }}</view> <view class="des">{{ item.description || '--' }}</view> </view>
|
||||||
<view class="title">{{ item.title }}</view>
|
|
||||||
<view class="des">{{ item.description || '--' }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 分数 -->
|
<!-- 分数 -->
|
||||||
<view class="score" v-if="item.is_answer">
|
<view class="score" v-if="item.is_answer"> <span>{{ item.answer.total }}</span> 分 </view>
|
||||||
<span>{{ item.answer.total }}</span>
|
|
||||||
分
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 评测状态 -->
|
<!-- 评测状态 -->
|
||||||
<view class="--status">
|
<view class="--status">
|
||||||
<!-- 已测试展示 状态-->
|
<!-- 已测试展示 状态-->
|
||||||
<view class="status" v-if="item.is_answer">
|
<view class="status" v-if="item.is_answer"> <span class="dian">·</span> {{ item.remark }} </view>
|
||||||
<span class="dian">·</span>
|
|
||||||
{{ item.remark }}
|
|
||||||
</view>
|
|
||||||
<view v-if="item.is_answer" class="history" @click="toResult(item)">查看历史结果</view>
|
<view v-if="item.is_answer" class="history" @click="toResult(item)">查看历史结果</view>
|
||||||
<!-- 未测试展示 状态-->
|
<!-- 未测试展示 状态-->
|
||||||
<view class="status" v-if="!item.is_answer">
|
<view class="status" v-if="!item.is_answer"> <span class="dian">·</span> <span class="person">{{ item.remark }}</span> 人已测 | 约4~8分钟 </view>
|
||||||
<span class="dian">·</span>
|
<u-icon name="arrow-right" :color="item.is_answer ? '#26a377' : '#faa81a'" size="14" :bold="true" :label="item.is_answer ? '重新评测' : '开始测评'" labelPos="left" labelSize="14" space="1" :labelColor="item.is_answer ? '#26a377' : '#faa81a'" @click="nowEva(item)" />
|
||||||
<span class="person">{{ item.remark }}</span>
|
|
||||||
人已测 | 约4~8分钟
|
|
||||||
</view>
|
|
||||||
<u-icon
|
|
||||||
name="arrow-right"
|
|
||||||
:color="item.is_answer ? '#26a377' : '#faa81a'"
|
|
||||||
size="14"
|
|
||||||
:bold="true"
|
|
||||||
:label="item.is_answer ? '重新评测' : '开始测评'"
|
|
||||||
labelPos="left"
|
|
||||||
labelSize="14"
|
|
||||||
space="1"
|
|
||||||
:labelColor="item.is_answer ? '#26a377' : '#faa81a'"
|
|
||||||
@click="nowEva(item)"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 没有更多 -->
|
<!-- 没有更多 -->
|
||||||
@@ -72,6 +48,13 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
evaluations().then(res => {
|
evaluations().then(res => {
|
||||||
this.evalList = res;
|
this.evalList = res;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// nowEva
|
// nowEva
|
||||||
|
|||||||
@@ -53,9 +53,7 @@
|
|||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<view class="title-content"><view class="title">营养建议</view></view>
|
<view class="title-content"><view class="title">营养建议</view></view>
|
||||||
<block v-for="(item, index) in 3" :key="index">
|
<block v-for="(item, index) in 3" :key="index">
|
||||||
<view class="title2">
|
<view class="title2"> <span>{{ item }}. 低Gi</span> </view>
|
||||||
<span>{{ item }}. 低Gi</span>
|
|
||||||
</view>
|
|
||||||
<!-- 描述 -->
|
<!-- 描述 -->
|
||||||
<view class="des">饮食营养及生活方式对维持面部年轻态影响较大,建议注意食材选择,逐步清淡口味;规律作息,逐个改善不良生活习惯;帮助改善当前皮肤状态。</view>
|
<view class="des">饮食营养及生活方式对维持面部年轻态影响较大,建议注意食材选择,逐步清淡口味;规律作息,逐个改善不良生活习惯;帮助改善当前皮肤状态。</view>
|
||||||
</block>
|
</block>
|
||||||
@@ -63,10 +61,7 @@
|
|||||||
<!-- 更多 -->
|
<!-- 更多 -->
|
||||||
<view class="answer-item">
|
<view class="answer-item">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<view class="title-content">
|
<view class="title-content"> <view class="title">更多护肤知识</view> <u-icon name="arrow-right" color="#333" size="20" /> </view>
|
||||||
<view class="title">更多护肤知识</view>
|
|
||||||
<u-icon name="arrow-right" color="#333" size="20" />
|
|
||||||
</view>
|
|
||||||
<!-- 横向滚动推荐 -->
|
<!-- 横向滚动推荐 -->
|
||||||
<scroll-view class="scroll-view_H" scroll-x="true">
|
<scroll-view class="scroll-view_H" scroll-x="true">
|
||||||
<view v-for="(item, index) in 6" :key="index" id="demo1" class="scroll-view-item_H">
|
<view v-for="(item, index) in 6" :key="index" id="demo1" class="scroll-view-item_H">
|
||||||
@@ -109,6 +104,13 @@ export default {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
reEva() {
|
reEva() {
|
||||||
|
|||||||
@@ -60,11 +60,17 @@ export default {
|
|||||||
healthSports(data).then(res => {
|
healthSports(data).then(res => {
|
||||||
this.lists = this.lists.concat(res.data);
|
this.lists = this.lists.concat(res.data);
|
||||||
this.has_more = res.page.has_more;
|
this.has_more = res.page.has_more;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 显示弹窗内容
|
// 显示弹窗内容
|
||||||
addSport(item) {
|
addSport(item) {
|
||||||
console.log(item);
|
|
||||||
this.selectSports = item;
|
this.selectSports = item;
|
||||||
this.selectSports.duration = 60;
|
this.selectSports.duration = 60;
|
||||||
this.addSportsShow = true;
|
this.addSportsShow = true;
|
||||||
@@ -99,7 +105,6 @@ export default {
|
|||||||
//#region 搜索相关方法 start
|
//#region 搜索相关方法 start
|
||||||
// 点击搜索左侧按钮
|
// 点击搜索左侧按钮
|
||||||
searchCustom(e) {
|
searchCustom(e) {
|
||||||
console.log(e);
|
|
||||||
this.name = e;
|
this.name = e;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,11 +8,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="add-foods">
|
<view class="add-foods">
|
||||||
<view class="re">
|
<view class="re"> <view>低等热量</view> <view>中等热量</view> <view>高等热量</view> </view>
|
||||||
<view>低等热量</view>
|
|
||||||
<view>中等热量</view>
|
|
||||||
<view>高等热量</view>
|
|
||||||
</view>
|
|
||||||
<!-- 搜索页面 -->
|
<!-- 搜索页面 -->
|
||||||
<u-search :show-action="true" actionText="搜索" :animation="true" :clearabled="true" placeholder="请输入食品名称"
|
<u-search :show-action="true" actionText="搜索" :animation="true" :clearabled="true" placeholder="请输入食品名称"
|
||||||
@custom="searchCustom" @clear="clearSearch" v-model="name" />
|
@custom="searchCustom" @clear="clearSearch" v-model="name" />
|
||||||
@@ -59,8 +55,6 @@
|
|||||||
//没有id的时候就是新增要处理type
|
//没有id的时候就是新增要处理type
|
||||||
this.type = this.$Route.query.type;
|
this.type = this.$Route.query.type;
|
||||||
this.date = this.$Route.query.date;
|
this.date = this.$Route.query.date;
|
||||||
console.log(this.date,'date.........')
|
|
||||||
// this.getFoods();
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getFoods();
|
this.getFoods();
|
||||||
@@ -85,9 +79,15 @@
|
|||||||
name: this.name,
|
name: this.name,
|
||||||
};
|
};
|
||||||
healthFoods(data).then((res) => {
|
healthFoods(data).then((res) => {
|
||||||
console.log(res);
|
|
||||||
this.lists = this.lists.concat(res.data);
|
this.lists = this.lists.concat(res.data);
|
||||||
this.has_more = res.page.has_more;
|
this.has_more = res.page.has_more;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 监听点击键盘触发返回值新增食品
|
// 监听点击键盘触发返回值新增食品
|
||||||
@@ -100,17 +100,14 @@
|
|||||||
food_id: this.selectGoods[0].food_id,
|
food_id: this.selectGoods[0].food_id,
|
||||||
date: this.date,
|
date: this.date,
|
||||||
};
|
};
|
||||||
console.log(data,'data...........');
|
|
||||||
this.addHealthFoods(data);
|
this.addHealthFoods(data);
|
||||||
},
|
},
|
||||||
// 添加食物
|
// 添加食物
|
||||||
addHealthFoods(data) {
|
addHealthFoods(data) {
|
||||||
addHealthFoods(data).then((res) => {
|
addHealthFoods(data).then((res) => {
|
||||||
console.log(res);
|
|
||||||
this.addShow = false;
|
this.addShow = false;
|
||||||
this.$Router.back();
|
this.$Router.back();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err, '添加食物error');
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
@@ -133,7 +130,6 @@
|
|||||||
},
|
},
|
||||||
// 点击搜索左侧按钮
|
// 点击搜索左侧按钮
|
||||||
searchCustom(e) {
|
searchCustom(e) {
|
||||||
console.log(e);
|
|
||||||
this.name = e;
|
this.name = e;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,15 +28,10 @@
|
|||||||
</u-navbar>
|
</u-navbar>
|
||||||
<!-- 喝水及水杯文字 -->
|
<!-- 喝水及水杯文字 -->
|
||||||
<view class="drink-content">
|
<view class="drink-content">
|
||||||
<view class="title" v-if="!water.is_complete">
|
<view class="title" v-if="!water.is_complete"> 再喝 <span class="num">{{ water.lack.cup }}</span> 杯 <span
|
||||||
再喝
|
class="total">(约{{ water.lack.value }}ml)</span> </view>
|
||||||
<span class="num">{{ water.lack.cup }}</span>
|
|
||||||
杯
|
|
||||||
<span class="total">(约{{ water.lack.value }}ml)</span>
|
|
||||||
</view>
|
|
||||||
<view class="title" v-if="water.is_complete">
|
<view class="title" v-if="water.is_complete">
|
||||||
已喝
|
已喝 <span class="num">{{ water.total }}ml</span>
|
||||||
<span class="num">{{ water.total }}ml</span>
|
|
||||||
<u-image class="is_complete" :src="require('../../static/imgs/target.png')" :lazy-load="true"
|
<u-image class="is_complete" :src="require('../../static/imgs/target.png')" :lazy-load="true"
|
||||||
mode="widthFix" width="140rpx" />
|
mode="widthFix" width="140rpx" />
|
||||||
</view>
|
</view>
|
||||||
@@ -48,13 +43,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 目标 -->
|
<!-- 目标 -->
|
||||||
<view class="water-target">
|
<view class="water-target">
|
||||||
<view class="target-item" @click="targetShow = true">
|
<view class="target-item" @click="targetShow = true"> 今日目标
|
||||||
今日目标
|
|
||||||
<u-icon class="target-icon" name="arrow-right" color="#666" size="14" :bold="true"
|
<u-icon class="target-icon" name="arrow-right" color="#666" size="14" :bold="true"
|
||||||
:label="water.target + 'ml'" labelPos="left" labelSize="16" labelColor="#666" space="6" />
|
:label="water.target + 'ml'" labelPos="left" labelSize="16" labelColor="#666" space="6" />
|
||||||
</view>
|
</view>
|
||||||
<view class="target-item" @click="waterCShow = true">
|
<view class="target-item" @click="waterCShow = true"> 水杯容量
|
||||||
水杯容量
|
|
||||||
<u-icon class="target-icon" name="arrow-right" color="#666" size="14" :bold="true"
|
<u-icon class="target-icon" name="arrow-right" color="#666" size="14" :bold="true"
|
||||||
:label="water.ml + 'ml'" labelPos="left" labelSize="16" labelColor="#666" space="6" />
|
:label="water.ml + 'ml'" labelPos="left" labelSize="16" labelColor="#666" space="6" />
|
||||||
</view>
|
</view>
|
||||||
@@ -86,11 +79,7 @@
|
|||||||
<u-icon size="30" :name="require('../../static/icon/water-icon.png')" />
|
<u-icon size="30" :name="require('../../static/icon/water-icon.png')" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<view class="list-item-title">
|
<view class="list-item-title"> 水 <span>{{ item.time }}</span> </view> {{ item.ml }}ml
|
||||||
水
|
|
||||||
<span>{{ item.time }}</span>
|
|
||||||
</view>
|
|
||||||
{{ item.ml }}ml
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -156,12 +145,17 @@
|
|||||||
this.tagertsDefaultIndex = [res.tagerts.findIndex(item => item.number === res.water
|
this.tagertsDefaultIndex = [res.tagerts.findIndex(item => item.number === res.water
|
||||||
.target)];
|
.target)];
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 确认方法index===1 每日目标 2,水杯容量
|
// 确认方法index===1 每日目标 2,水杯容量
|
||||||
targetSure(index, e) {
|
targetSure(index, e) {
|
||||||
// console.log("触发了targetSure", index, e.value[0]);
|
|
||||||
// let date = moment(new Date()).format("YYYY--MM--DD");
|
|
||||||
let params = {};
|
let params = {};
|
||||||
if (index === '1') {
|
if (index === '1') {
|
||||||
params = {
|
params = {
|
||||||
@@ -180,25 +174,29 @@
|
|||||||
this.getWaters();
|
this.getWaters();
|
||||||
this.waterCShow = false;
|
this.waterCShow = false;
|
||||||
this.targetShow = false;
|
this.targetShow = false;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 喝水
|
// 喝水
|
||||||
drinkWater() {
|
drinkWater() {
|
||||||
console.log('喝水。。。')
|
|
||||||
let data = {
|
let data = {
|
||||||
date: this.today
|
date: this.today
|
||||||
}
|
}
|
||||||
console.log(data, 'data....')
|
|
||||||
drinkWater(data).then(res => {
|
drinkWater(data).then(res => {
|
||||||
this.getWaters();
|
this.getWaters();
|
||||||
this.dateLists()
|
this.dateLists()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err, '添加食物error');
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration:2000,
|
duration: 2000,
|
||||||
mask:true
|
mask: true
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -219,8 +217,10 @@
|
|||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
});
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -233,22 +233,21 @@
|
|||||||
month: this.month,
|
month: this.month,
|
||||||
type: this.dateType
|
type: this.dateType
|
||||||
}
|
}
|
||||||
console.log(data,'data.....')
|
|
||||||
dateList(data).then(res => {
|
dateList(data).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.calendarList = res.calendar
|
this.calendarList = res.calendar
|
||||||
this.dateType = ''
|
this.dateType = ''
|
||||||
this.month = res.month
|
this.month = res.month
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择日期
|
// 选择日期
|
||||||
dateClick(item) {
|
dateClick(item) {
|
||||||
console.log(item)
|
|
||||||
this.today = item.today
|
this.today = item.today
|
||||||
this.month = item.today
|
this.month = item.today
|
||||||
this.reset()
|
this.reset()
|
||||||
|
|||||||
@@ -10,53 +10,35 @@
|
|||||||
<view class="record--foods">
|
<view class="record--foods">
|
||||||
<!-- 自定义导航部分 -->
|
<!-- 自定义导航部分 -->
|
||||||
<u-navbar :safeAreaInsetTop="true" :fixed='true' bgColor="#34ce98" :autoBack="true">
|
<u-navbar :safeAreaInsetTop="true" :fixed='true' bgColor="#34ce98" :autoBack="true">
|
||||||
<view class="u-nav-slot" slot="left">
|
<view class="u-nav-slot" slot="left"> <u-icon name="arrow-leftward" :bold="true" size="20" color="#fff" /> </view>
|
||||||
<u-icon name="arrow-leftward" :bold="true" size="20" color="#fff" />
|
|
||||||
</view>
|
|
||||||
<view class="u-nav-slot u-center" slot="center" @click="dateShow = true,dateLists()">
|
<view class="u-nav-slot u-center" slot="center" @click="dateShow = true,dateLists()">
|
||||||
<u-icon name="play-left-fill" size="14" color="#fff" @click="datePreNext('before')" />
|
<u-icon name="play-left-fill" size="14" color="#fff" @click="datePreNext('before')" />
|
||||||
<view class="date"> <u-icon name="calendar" color="#fff" label-color="#fff" width="150" :label="today" label-size="14" size="20" /> </view>
|
<view class="date"> <u-icon name="calendar" color="#fff" label-color="#fff" width="150" :label="today" label-size="14" size="20" /> </view>
|
||||||
<u-icon name="play-right-fill" size="14" color="#fff" @click="datePreNext('after')" />
|
<u-icon name="play-right-fill" size="14" color="#fff" @click="datePreNext('after')" />
|
||||||
</view>
|
</view>
|
||||||
<view class="u-nav-slot" slot="right">
|
<view class="u-nav-slot" slot="right"> <u-icon :name="require('@/static/icon/sign-icon.gif')" :bold="true" size="30" @click="$Router.push({name:'signIndex'})" /> </view>
|
||||||
<u-icon :name="require('@/static/icon/sign-icon.gif')" :bold="true" size="30" @click="$Router.push({name:'signIndex'})" />
|
|
||||||
</view>
|
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
|
|
||||||
<!-- 饮食进度条 -->
|
<!-- 饮食进度条 -->
|
||||||
<view class="cricle-content">
|
<view class="cricle-content">
|
||||||
<view class="info">
|
<view class="info"> 饮食摄入 <span>{{ calorys.intake_total }}</span> </view>
|
||||||
饮食摄入
|
|
||||||
<span>{{ calorys.intake_total }}</span>
|
|
||||||
</view>
|
|
||||||
<arprogress :percent="calorys.exceeds ? 100 : calorys.ratio" inactiveColor="#f5f4f9"
|
<arprogress :percent="calorys.exceeds ? 100 : calorys.ratio" inactiveColor="#f5f4f9"
|
||||||
:activeColor="calorys.exceeds ? '#f00' : '#34ce98'" width="300" class="cricle" borderWidth="20">
|
:activeColor="calorys.exceeds ? '#c50000' : '#34ce98'" width="300" class="cricle" borderWidth="20">
|
||||||
<span>{{ calorys.exceeds ? '多吃了' : '还可以吃' }}</span>
|
<span>{{ calorys.exceeds ? '多吃了' : '还可以吃' }}</span>
|
||||||
<span :class="['num', calorys.exceeds ? 'num1' : '']">{{ calorys.amount }}</span>
|
<span :class="['num', calorys.exceeds ? 'num1' : '']">{{ calorys.amount }}</span>
|
||||||
<span>推荐预算{{ calorys.goal }}</span>
|
<span>推荐预算{{ calorys.goal }}</span>
|
||||||
</arprogress>
|
</arprogress>
|
||||||
<view class="info" @click="errToast">
|
<view class="info" @click="errToast"> 运动消耗 <span>{{ calorys.exercise_total }}</span> </view>
|
||||||
运动消耗
|
|
||||||
<span>{{ calorys.exercise_total }}</span>
|
|
||||||
</view>
|
|
||||||
<view class="ic-left">摄入量推荐</view>
|
<view class="ic-left">摄入量推荐</view>
|
||||||
<u-icon class="ic-day" name="checkmark-circle" color="#34ce98" size="10" :label="`${calorys.days}天`"
|
<u-icon class="ic-day" name="checkmark-circle" color="#34ce98" size="10" :label="`${calorys.days}天`" labelColor="#34ce98" labelSize="10" space="3" />
|
||||||
labelColor="#34ce98" labelSize="10" space="3" />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 有饮食记录 -->
|
<!-- 有饮食记录 -->
|
||||||
<template v-if="intakes.length > 0">
|
<template v-if="intakes.length > 0">
|
||||||
<view class="foods-add" v-for="(it, index) in intakes" :key="index">
|
<view class="foods-add" v-for="(it, index) in intakes" :key="index">
|
||||||
<view class="foods-title">
|
<view class="foods-title">
|
||||||
<view class="title-left">
|
<view class="title-left"> {{ it.name }} <span v-if="it.remark">{{ it.remark || '' }}</span> </view>
|
||||||
{{ it.name }}
|
<view class="title-right"> {{ it.total }} <span class="dw">千卡</span> <u-icon name="arrow-right" color="#ddd" size="13" :bold="true" /> </view>
|
||||||
<span v-if="it.remark">{{ it.remark || '' }}</span>
|
|
||||||
</view>
|
|
||||||
<view class="title-right">
|
|
||||||
{{ it.total }}
|
|
||||||
<span class="dw">千卡</span>
|
|
||||||
<u-icon name="arrow-right" color="#ddd" size="13" :bold="true" />
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<goodsList :lists="it.intake" type="no-dian" @editGoods="editGoods" @longClickGoods="longClickGoods" />
|
<goodsList :lists="it.intake" type="no-dian" @editGoods="editGoods" @longClickGoods="longClickGoods" />
|
||||||
</view>
|
</view>
|
||||||
@@ -66,31 +48,23 @@
|
|||||||
<template v-if="sportsTotal > 0">
|
<template v-if="sportsTotal > 0">
|
||||||
<view class="foods-title" style="padding-top:50rpx;">
|
<view class="foods-title" style="padding-top:50rpx;">
|
||||||
<view class="title-left">运动</view>
|
<view class="title-left">运动</view>
|
||||||
<view class="title-right">
|
<view class="title-right"> {{ sportsTotal }} <span class="dw">千卡</span> <u-icon name="arrow-right" color="#ddd" size="13" :bold="true" /> </view>
|
||||||
{{ sportsTotal }}
|
|
||||||
<span class="dw">千卡</span>
|
|
||||||
<u-icon name="arrow-right" color="#ddd" size="13" :bold="true" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<sports type="edit" :lists="sports" @editSport="editSport" @longClick="longClick" />
|
<sports type="edit" :lists="sports" @editSport="editSport" @longClick="longClick" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 没有饮食记录 -->
|
<!-- 没有饮食记录 -->
|
||||||
<view class="no-foods" v-if="sports.length === 0 && intakes.length === 0">
|
<view class="no-foods" v-if="sports.length === 0 && intakes.length === 0">
|
||||||
<u-image :src="require('../../static/imgs/no-foods.png')" :lazy-load="true" radius="10rpx" mode="widthFix"
|
<u-image :src="require('../../static/imgs/no-foods.png')" :lazy-load="true" radius="10rpx" mode="widthFix" width="300rpx" class="no-foods-img" />
|
||||||
width="300rpx" class="no-foods-img" />
|
|
||||||
<view>还没有添加今日饮食记录</view>
|
<view>还没有添加今日饮食记录</view>
|
||||||
<view>请点击屏幕下方按钮来添加</view>
|
<view>请点击屏幕下方按钮来添加</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 加餐模块 -->
|
<!-- 加餐模块 -->
|
||||||
<u-action-sheet :actions="addEatList" title="加餐模块" :closeOnClickOverlay="true" :closeOnClickAction="true"
|
<u-action-sheet :actions="addEatList" title="加餐模块" :closeOnClickOverlay="true" :closeOnClickAction="true" @select="selectClick" cancelText="取消" :show="addEatShow" @close="addEatShow = false" />
|
||||||
@select="selectClick" cancelText="取消" :show="addEatShow" @close="addEatShow = false"></u-action-sheet>
|
|
||||||
|
|
||||||
<!-- 底部 早餐等菜单 -->
|
<!-- 底部 早餐等菜单 -->
|
||||||
<u-tabbar :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" inactiveColor="#333"
|
<u-tabbar :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" inactiveColor="#333" @click="tabbarClick">
|
||||||
@click="tabbarClick">
|
|
||||||
<u-tabbar-item text="+早餐" @click="tabbarClick" :icon="require('../../static/imgs/foods-1.png')" />
|
<u-tabbar-item text="+早餐" @click="tabbarClick" :icon="require('../../static/imgs/foods-1.png')" />
|
||||||
<u-tabbar-item text="+午餐" @click="tabbarClick" :icon="require('../../static/imgs/foods-2.png')" />
|
<u-tabbar-item text="+午餐" @click="tabbarClick" :icon="require('../../static/imgs/foods-2.png')" />
|
||||||
<u-tabbar-item text="+晚餐" @click="tabbarClick" :icon="require('../../static/imgs/foods-3.png')" />
|
<u-tabbar-item text="+晚餐" @click="tabbarClick" :icon="require('../../static/imgs/foods-3.png')" />
|
||||||
@@ -99,17 +73,13 @@
|
|||||||
</u-tabbar>
|
</u-tabbar>
|
||||||
|
|
||||||
<!-- 添加食谱弹窗 -->
|
<!-- 添加食谱弹窗 -->
|
||||||
<addFoods v-if="addShow" :addShow="addShow" :selectGoods="selectGoods" :decimals="true" @confirm="confirmHandle"
|
<addFoods v-if="addShow" :addShow="addShow" :selectGoods="selectGoods" :decimals="true" @confirm="confirmHandle" @close="closeHandle" @delThis="delThis" @tabGoodsInfo="tabGoodsInfo" max="999" />
|
||||||
@close="closeHandle" @delThis="delThis" @tabGoodsInfo="tabGoodsInfo" max="999" />
|
|
||||||
|
|
||||||
<!-- 修改运动弹窗 -->
|
<!-- 修改运动弹窗 -->
|
||||||
<addPopup :selectSports="selectSports" :addSportsShow="addSportsShow" @comfirmSport="comfirmSport"
|
<addPopup :selectSports="selectSports" :addSportsShow="addSportsShow" @comfirmSport="comfirmSport" @cancleSport="cancleSport" @delSport="delSport" />
|
||||||
@cancleSport="cancleSport" @delSport="delSport" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 选择日历 -->
|
<!-- 选择日历 -->
|
||||||
<dateTemplate :lists="calendarList" :today="today" :month="month" :dateShow="dateShow" type='foods' @backDate="backDate"
|
<dateTemplate :lists="calendarList" :today="today" :month="month" :dateShow="dateShow" type='foods' @backDate="backDate" @dateClick="dateClick" @closeDate="closeDate" @datePreNext="datePreNext" />
|
||||||
@dateClick="dateClick" @closeDate="closeDate" @datePreNext="datePreNext" />
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -173,6 +143,13 @@
|
|||||||
this.intakes = res.intakes;
|
this.intakes = res.intakes;
|
||||||
this.sports = res.exercises.lists;
|
this.sports = res.exercises.lists;
|
||||||
this.sportsTotal = res.exercises.total;
|
this.sportsTotal = res.exercises.total;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -188,7 +165,6 @@
|
|||||||
exercise_id: item.exercise_id,
|
exercise_id: item.exercise_id,
|
||||||
title: '编辑运动'
|
title: '编辑运动'
|
||||||
};
|
};
|
||||||
// console.log(this.selectSports);
|
|
||||||
this.addSportsShow = true;
|
this.addSportsShow = true;
|
||||||
},
|
},
|
||||||
// 弹窗确认按钮新增 这里接口报错了 ,
|
// 弹窗确认按钮新增 这里接口报错了 ,
|
||||||
@@ -207,7 +183,9 @@
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -220,11 +198,17 @@
|
|||||||
let params = {
|
let params = {
|
||||||
exercise_id: this.selectSports.exercise_id //
|
exercise_id: this.selectSports.exercise_id //
|
||||||
};
|
};
|
||||||
console.log(params);
|
|
||||||
delHealthSports(params).then(res => {
|
delHealthSports(params).then(res => {
|
||||||
this.addSportsShow = false;
|
this.addSportsShow = false;
|
||||||
this.selectSports = {};
|
this.selectSports = {};
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 长按删除触发事件运动
|
// 长按删除触发事件运动
|
||||||
@@ -272,7 +256,6 @@
|
|||||||
},
|
},
|
||||||
// 底部按钮点击触发的事件 早餐1 午餐3 晚餐5 加餐(早2中4晚6)
|
// 底部按钮点击触发的事件 早餐1 午餐3 晚餐5 加餐(早2中4晚6)
|
||||||
tabbarClick(e) {
|
tabbarClick(e) {
|
||||||
console.log(e);
|
|
||||||
this.tabarIndex = e;
|
this.tabarIndex = e;
|
||||||
if (e === 3) {
|
if (e === 3) {
|
||||||
this.addEatShow = true;
|
this.addEatShow = true;
|
||||||
@@ -319,14 +302,14 @@
|
|||||||
// 添加食物
|
// 添加食物
|
||||||
editHealthFoods(data) {
|
editHealthFoods(data) {
|
||||||
editHealthFoods(data).then(res => {
|
editHealthFoods(data).then(res => {
|
||||||
console.log(res,'添加食物');
|
|
||||||
this.addShow = false;
|
this.addShow = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
console.log(res,'添加食物error');
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:err.message,
|
title: err.message,
|
||||||
icon:"none"
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -335,6 +318,13 @@
|
|||||||
delHealthFoods(this.selectGoods[0].intake_id).then(res => {
|
delHealthFoods(this.selectGoods[0].intake_id).then(res => {
|
||||||
this.addShow = false;
|
this.addShow = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 跳转到食品详情
|
// 跳转到食品详情
|
||||||
@@ -354,14 +344,15 @@
|
|||||||
type: this.dateType
|
type: this.dateType
|
||||||
}
|
}
|
||||||
dateList(data).then(res => {
|
dateList(data).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.calendarList = res.calendar
|
this.calendarList = res.calendar
|
||||||
this.dateType = ''
|
this.dateType = ''
|
||||||
this.month = res.month
|
this.month = res.month
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -398,7 +398,6 @@ export default {
|
|||||||
*/
|
*/
|
||||||
logs() {
|
logs() {
|
||||||
logs().then(res => {
|
logs().then(res => {
|
||||||
// console.log(res.is_login)
|
|
||||||
this.weight = res.weight;
|
this.weight = res.weight;
|
||||||
this.water = res.water;
|
this.water = res.water;
|
||||||
this.intake_run = res.intake_run;
|
this.intake_run = res.intake_run;
|
||||||
@@ -408,6 +407,13 @@ export default {
|
|||||||
this.banner = res.banner;
|
this.banner = res.banner;
|
||||||
this.user = res.user;
|
this.user = res.user;
|
||||||
this.notifications_count = res.notifications_count;
|
this.notifications_count = res.notifications_count;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -134,7 +134,6 @@
|
|||||||
//获取体重首页接口
|
//获取体重首页接口
|
||||||
getWeights() {
|
getWeights() {
|
||||||
weights(this.page).then((res) => {
|
weights(this.page).then((res) => {
|
||||||
console.log(res)
|
|
||||||
if (res.lists.page.current === 1) {
|
if (res.lists.page.current === 1) {
|
||||||
this.lists = []
|
this.lists = []
|
||||||
}
|
}
|
||||||
@@ -198,7 +197,6 @@
|
|||||||
|
|
||||||
// 点击底部切换
|
// 点击底部切换
|
||||||
tabbarClick(e) {
|
tabbarClick(e) {
|
||||||
console.log(e)
|
|
||||||
this.tabbarId = Number(e)
|
this.tabbarId = Number(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,18 +3,14 @@
|
|||||||
<!-- 更多管理 -->
|
<!-- 更多管理 -->
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="list-item" @click="updImgs">
|
<view class="list-item" @click="updImgs">
|
||||||
<view class="list-item-left">
|
<view class="list-item-left"> <span>修改头像</span> </view>
|
||||||
<span>修改头像</span>
|
|
||||||
</view>
|
|
||||||
<view class="avatar" >
|
<view class="avatar" >
|
||||||
<image :src="avatar.showPath || require('@/static/user/cover.png')" mode="aspectFill" />
|
<image :src="avatar.showPath || require('@/static/user/cover.png')" mode="aspectFill" />
|
||||||
<u-icon name="arrow-right" color="#999" size="20"></u-icon>
|
<u-icon name="arrow-right" color="#999" size="20"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<view class="list-item-left">
|
<view class="list-item-left"> <span>修改昵称</span> </view>
|
||||||
<span>修改昵称</span>
|
|
||||||
</view>
|
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input type="text" :value="nickname" @blur='blur' placeholder="请输入用户的昵称" maxlength="12" />
|
<input type="text" :value="nickname" @blur='blur' placeholder="请输入用户的昵称" maxlength="12" />
|
||||||
<u-icon name="arrow-right" color="#999" size="20"></u-icon>
|
<u-icon name="arrow-right" color="#999" size="20"></u-icon>
|
||||||
@@ -88,7 +84,9 @@
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -116,7 +114,9 @@
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon: 'none'
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,61 +4,42 @@
|
|||||||
<view class="files" @click="sexShow = true">
|
<view class="files" @click="sexShow = true">
|
||||||
<view class="name">性别</view>
|
<view class="name">性别</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<u-icon
|
<u-icon class="target-icon" :label="recordsData.sex == 1 ? '男士' : '女士'" name="arrow-right" color="#999"
|
||||||
class="target-icon"
|
size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
:label="recordsData.sex == 1 ? '男士' : '女士'"
|
|
||||||
name="arrow-right"
|
|
||||||
color="#999"
|
|
||||||
size="14"
|
|
||||||
labelSize="14"
|
|
||||||
labelColor="#666"
|
|
||||||
labelPos="left"
|
|
||||||
space="10"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-action-sheet
|
<u-action-sheet :actions="sexList" title="你的性别是?" :show="sexShow" cancelText="暂不修改"
|
||||||
:actions="sexList"
|
@select=" e => { (this.recordsData.sex = e.id), (this.sexShow = false); } " @close="sexShow = false" />
|
||||||
title="你的性别是?"
|
|
||||||
:show="sexShow"
|
|
||||||
cancelText="暂不修改"
|
|
||||||
@select=" e => { (this.recordsData.sex = e.id), (this.sexShow = false); } "
|
|
||||||
@close="sexShow = false"
|
|
||||||
/>
|
|
||||||
<!-- 性别 end -->
|
<!-- 性别 end -->
|
||||||
|
|
||||||
<!-- 生日 start -->
|
<!-- 生日 start -->
|
||||||
<view class="files" @click="birthdayShow = true">
|
<view class="files" @click="birthdayShow = true">
|
||||||
<view class="name">生日</view>
|
<view class="name">生日</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<u-icon class="target-icon" :label="showBirthday" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
<u-icon class="target-icon" :label="showBirthday" name="arrow-right" color="#999" size="14"
|
||||||
|
labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-datetime-picker
|
<u-datetime-picker confirmColor="#34ce98" v-model="recordsData.birthday" mode="date" :show="birthdayShow"
|
||||||
confirmColor="#34ce98"
|
:formatter="formatter" :minDate="-302688000" :maxDate="maxDate"
|
||||||
v-model="recordsData.birthday"
|
|
||||||
mode="date"
|
|
||||||
:show="birthdayShow"
|
|
||||||
:formatter="formatter"
|
|
||||||
:minDate="-302688000"
|
|
||||||
:maxDate="maxDate"
|
|
||||||
@confirm=" e => { this.recordsData.birthday = e.value, this.birthdayShow = false } "
|
@confirm=" e => { this.recordsData.birthday = e.value, this.birthdayShow = false } "
|
||||||
@cancel=" () => { this.birthdayShow = false; } "
|
@cancel=" () => { this.birthdayShow = false; } " />
|
||||||
/>
|
|
||||||
<!-- 生日 end -->
|
<!-- 生日 end -->
|
||||||
|
|
||||||
<!-- 身高 start-->
|
<!-- 身高 start-->
|
||||||
<view class="files" @click="heightShow = true">
|
<view class="files" @click="heightShow = true">
|
||||||
<view class="name">身高</view>
|
<view class="name">身高</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<u-icon class="target-icon" :label="recordsData.height + ` CM`" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
<u-icon class="target-icon" :label="recordsData.height + ` CM`" name="arrow-right" color="#999"
|
||||||
|
size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup :show="heightShow" @close="() => { heightShow = false }">
|
<u-popup :show="heightShow" @close="() => { heightShow = false }">
|
||||||
<view class="v-scale">
|
<view class="v-scale">
|
||||||
<view class="title"> 你的身高为?</view>
|
<view class="title"> 你的身高为?</view>
|
||||||
<view class="total"> {{recordsData.height}} CM </view>
|
<view class="total"> {{recordsData.height}} CM </view>
|
||||||
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollAll('height',$event)" :scrollLeft="Number(recordsData.height)" />
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles"
|
||||||
|
@scroll="scrollAll('height',$event)" :scrollLeft="Number(recordsData.height)" />
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- 身高 end -->
|
<!-- 身高 end -->
|
||||||
@@ -67,14 +48,16 @@
|
|||||||
<view class="files bt30" @click="weightShow = true">
|
<view class="files bt30" @click="weightShow = true">
|
||||||
<view class="name">最新体重</view>
|
<view class="name">最新体重</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<u-icon class="target-icon" :label="recordsData.weight + ` KG`" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
<u-icon class="target-icon" :label="recordsData.weight + ` KG`" name="arrow-right" color="#999"
|
||||||
|
size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup :show="weightShow" @close="() => { weightShow = false }">
|
<u-popup :show="weightShow" @close="() => { weightShow = false }">
|
||||||
<view class="v-scale">
|
<view class="v-scale">
|
||||||
<view class="title"> 你的当前体重为?</view>
|
<view class="title"> 你的当前体重为?</view>
|
||||||
<view class="total"> {{recordsData.weight}} KG </view>
|
<view class="total"> {{recordsData.weight}} KG </view>
|
||||||
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollAll('weight',$event)" :scrollLeft="Number(recordsData.weight)" />
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles"
|
||||||
|
@scroll="scrollAll('weight',$event)" :scrollLeft="Number(recordsData.weight)" />
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- 生日 end -->
|
<!-- 生日 end -->
|
||||||
@@ -83,29 +66,29 @@
|
|||||||
<view class="files" @click="targetShow = true">
|
<view class="files" @click="targetShow = true">
|
||||||
<view class="name">目标</view>
|
<view class="name">目标</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<u-icon class="target-icon" :label="targetList[selectedTargetIndex].name" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
<u-icon class="target-icon" :label="targetList[selectedTargetIndex].name" name="arrow-right"
|
||||||
|
color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-action-sheet
|
<u-action-sheet :actions="targetList" title="你的目标是?" :show="targetShow" cancelText="暂不修改"
|
||||||
:actions="targetList"
|
|
||||||
title="你的目标是?"
|
|
||||||
:show="targetShow"
|
|
||||||
cancelText="暂不修改"
|
|
||||||
@select=" e => { (this.selectedTargetIndex = this.targetList.findIndex(item => e.id === item.id)), (this.targetShow = false); } "
|
@select=" e => { (this.selectedTargetIndex = this.targetList.findIndex(item => e.id === item.id)), (this.targetShow = false); } "
|
||||||
@close="targetShow = false"
|
@close="targetShow = false" />
|
||||||
/>
|
|
||||||
<!-- 目标 end -->
|
<!-- 目标 end -->
|
||||||
|
|
||||||
<!-- 目标体重 start-->
|
<!-- 目标体重 start-->
|
||||||
<view class="files" @click="targetWeightShow = true">
|
<view class="files" @click="targetWeightShow = true">
|
||||||
<view class="name">目标体重</view>
|
<view class="name">目标体重</view>
|
||||||
<view class="text"><u-icon class="target-icon" :label="recordsData.goal_weight + ` KG`" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" /></view>
|
<view class="text">
|
||||||
|
<u-icon class="target-icon" :label="recordsData.goal_weight + ` KG`" name="arrow-right" color="#999"
|
||||||
|
size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup :show="targetWeightShow" @close="() => { targetWeightShow = false }">
|
<u-popup :show="targetWeightShow" @close="() => { targetWeightShow = false }">
|
||||||
<view class="v-scale">
|
<view class="v-scale">
|
||||||
<view class="title"> 你的目标体重为?</view>
|
<view class="title"> 你的目标体重为?</view>
|
||||||
<view class="total"> {{recordsData.goal_weight}} KG </view>
|
<view class="total"> {{recordsData.goal_weight}} KG </view>
|
||||||
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollAll('goalweight',$event)" :scrollLeft="Number(recordsData.goal_weight)" />
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles"
|
||||||
|
@scroll="scrollAll('goalweight',$event)" :scrollLeft="Number(recordsData.goal_weight)" />
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- 目标体重 end -->
|
<!-- 目标体重 end -->
|
||||||
@@ -114,17 +97,13 @@
|
|||||||
<view class="files" @click="exerciseShow = true">
|
<view class="files" @click="exerciseShow = true">
|
||||||
<view class="name">运动量</view>
|
<view class="name">运动量</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<u-icon class="target-icon" :label="exerciseList[selectExerciseIndex].name" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
<u-icon class="target-icon" :label="exerciseList[selectExerciseIndex].name" name="arrow-right"
|
||||||
|
color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-action-sheet
|
<u-action-sheet :actions="exerciseList" title="你的运动量是?" :show="exerciseShow" cancelText="暂不修改"
|
||||||
:actions="exerciseList"
|
|
||||||
title="你的运动量是?"
|
|
||||||
:show="exerciseShow"
|
|
||||||
cancelText="暂不修改"
|
|
||||||
@select=" e => { (this.selectExerciseIndex = this.exerciseList.findIndex(item => e.id === item.id)), (this.exerciseShow = false); } "
|
@select=" e => { (this.selectExerciseIndex = this.exerciseList.findIndex(item => e.id === item.id)), (this.exerciseShow = false); } "
|
||||||
@close="exerciseShow = false"
|
@close="exerciseShow = false" />
|
||||||
/>
|
|
||||||
<!-- 运动量 end -->
|
<!-- 运动量 end -->
|
||||||
<view class="sureBtn" @click="sureBtn"> 确认修改 </view>
|
<view class="sureBtn" @click="sureBtn"> 确认修改 </view>
|
||||||
<view class="des">修改资料后可更新并查看最新方案,预算热量可能会发生变化</view>
|
<view class="des">修改资料后可更新并查看最新方案,预算热量可能会发生变化</view>
|
||||||
@@ -132,11 +111,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { editHealthBefore,editHealth } from '@/apis/interfaces/essentialInfo.js';
|
import {
|
||||||
import moment from 'moment';
|
editHealthBefore,
|
||||||
import vueScale from '@/components/vueScale'; // 体重标尺
|
editHealth
|
||||||
export default {
|
} from '@/apis/interfaces/essentialInfo.js';
|
||||||
components:{
|
import moment from 'moment';
|
||||||
|
import vueScale from '@/components/vueScale'; // 体重标尺
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
vueScale
|
vueScale
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -145,16 +127,43 @@ export default {
|
|||||||
birthdayShow: false, // 出生日期展示
|
birthdayShow: false, // 出生日期展示
|
||||||
maxDate: new Date().getTime(),
|
maxDate: new Date().getTime(),
|
||||||
sexShow: false, // 性别弹窗是否显示
|
sexShow: false, // 性别弹窗是否显示
|
||||||
sexList: [{name: '男士',id: 1},{name: '女士',id: 2}],
|
sexList: [{
|
||||||
|
name: '男士',
|
||||||
|
id: 1
|
||||||
|
}, {
|
||||||
|
name: '女士',
|
||||||
|
id: 2
|
||||||
|
}],
|
||||||
targetShow: false, // 目标弹窗是否显示
|
targetShow: false, // 目标弹窗是否显示
|
||||||
targetList: [{name: '减脂',id: 1},{name: '保持体重',id: 2},{name: '增肌',id: 3}],
|
targetList: [{
|
||||||
selectedTargetIndex: 0,// 默认选择了那个target
|
name: '减脂',
|
||||||
exerciseShow:false,// 运动量弹窗是否显示
|
id: 1
|
||||||
exerciseList:[{name:'久坐不动',id:1},{name:'少量运动',id:2},{name:'中等运动量',id:3},{name:'超强度运动',id:4}],
|
}, {
|
||||||
selectExerciseIndex:0,//默认选择运动量是久坐不懂得
|
name: '保持体重',
|
||||||
heightShow:false,
|
id: 2
|
||||||
weightShow:false,
|
}, {
|
||||||
targetWeightShow:false,
|
name: '增肌',
|
||||||
|
id: 3
|
||||||
|
}],
|
||||||
|
selectedTargetIndex: 0, // 默认选择了那个target
|
||||||
|
exerciseShow: false, // 运动量弹窗是否显示
|
||||||
|
exerciseList: [{
|
||||||
|
name: '久坐不动',
|
||||||
|
id: 1
|
||||||
|
}, {
|
||||||
|
name: '少量运动',
|
||||||
|
id: 2
|
||||||
|
}, {
|
||||||
|
name: '中等运动量',
|
||||||
|
id: 3
|
||||||
|
}, {
|
||||||
|
name: '超强度运动',
|
||||||
|
id: 4
|
||||||
|
}],
|
||||||
|
selectExerciseIndex: 0, //默认选择运动量是久坐不懂得
|
||||||
|
heightShow: false,
|
||||||
|
weightShow: false,
|
||||||
|
targetWeightShow: false,
|
||||||
styles: {
|
styles: {
|
||||||
line: '#dbdbdb',
|
line: '#dbdbdb',
|
||||||
bginner: '#fbfbfb',
|
bginner: '#fbfbfb',
|
||||||
@@ -180,94 +189,118 @@ export default {
|
|||||||
this.selectExerciseIndex = this.exerciseList.findIndex(item => item.id === res.exercise)
|
this.selectExerciseIndex = this.exerciseList.findIndex(item => item.id === res.exercise)
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
conso.log(err);
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 身高 体重 目标体重 滚动
|
// 身高 体重 目标体重 滚动
|
||||||
scrollAll(type,value) {
|
scrollAll(type, value) {
|
||||||
if(type === 'height'){
|
if (type === 'height') {
|
||||||
return this.recordsData.height = value;
|
return this.recordsData.height = value;
|
||||||
}
|
}
|
||||||
if(type === 'weight'){
|
if (type === 'weight') {
|
||||||
return this.recordsData.weight = value;
|
return this.recordsData.weight = value;
|
||||||
}
|
}
|
||||||
if(type === 'goalweight'){
|
if (type === 'goalweight') {
|
||||||
return this.recordsData.goal_weight = value;
|
return this.recordsData.goal_weight = value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 年龄 - 过滤 - 自定义 - 出生年月日
|
// 年龄 - 过滤 - 自定义 - 出生年月日
|
||||||
formatter(type, value) {
|
formatter(type, value) {
|
||||||
if (type === 'year') {return `${value}年`;}
|
if (type === 'year') {
|
||||||
if (type === 'month') {return `${value}月`;}
|
return `${value}年`;
|
||||||
if (type === 'day') {return `${value}日`;}
|
}
|
||||||
|
if (type === 'month') {
|
||||||
|
return `${value}月`;
|
||||||
|
}
|
||||||
|
if (type === 'day') {
|
||||||
|
return `${value}日`;
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
sureBtn(){
|
sureBtn() {
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
record_id:this.recordsData.record_id,
|
record_id: this.recordsData.record_id,
|
||||||
birthday:moment(this.recordsData.birthday).format('YYYY-MM-DD'),
|
birthday: moment(this.recordsData.birthday).format('YYYY-MM-DD'),
|
||||||
sex:this.recordsData.sex,
|
sex: this.recordsData.sex,
|
||||||
height:this.recordsData.height,
|
height: this.recordsData.height,
|
||||||
weight:this.recordsData.weight,
|
weight: this.recordsData.weight,
|
||||||
exercise:this.exerciseList[this.selectExerciseIndex].id,
|
exercise: this.exerciseList[this.selectExerciseIndex].id,
|
||||||
goal_weight:this.recordsData.goal_weight,
|
goal_weight: this.recordsData.goal_weight,
|
||||||
days:1
|
days: 1
|
||||||
}
|
}
|
||||||
editHealth(params.record_id,params).then(res=>{
|
editHealth(params.record_id, params).then(res => {
|
||||||
this.$Router.back()
|
this.$Router.back()
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
this.$Router.back()
|
this.$Router.back()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.content {
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
}
|
}
|
||||||
.files {
|
|
||||||
|
.files {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: $padding + 10 $padding - 20;
|
padding: $padding + 10 $padding - 20;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: #f9f9f9 2rpx solid;
|
border-bottom: #f9f9f9 2rpx solid;
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.v-scale{
|
|
||||||
|
.v-scale {
|
||||||
padding: $padding * 2 0;
|
padding: $padding * 2 0;
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: $title-size + 10;
|
font-size: $title-size + 10;
|
||||||
margin-bottom: $margin;
|
margin-bottom: $margin;
|
||||||
}
|
}
|
||||||
.total{
|
|
||||||
|
.total {
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
color: $main-color;
|
color: $main-color;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.des {
|
|
||||||
|
.des {
|
||||||
color: $text-gray-m;
|
color: $text-gray-m;
|
||||||
font-size: $title-size-m - 4;
|
font-size: $title-size-m - 4;
|
||||||
margin-top: $margin * 2;
|
margin-top: $margin * 2;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.sureBtn{
|
|
||||||
|
.sureBtn {
|
||||||
background-color: $main-color;
|
background-color: $main-color;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
@@ -275,8 +308,9 @@ export default {
|
|||||||
padding: $padding;
|
padding: $padding;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
margin-top: $margin * 2;
|
margin-top: $margin * 2;
|
||||||
}
|
}
|
||||||
.bt30 {
|
|
||||||
|
.bt30 {
|
||||||
border-bottom: #f9f9f9 20rpx solid;
|
border-bottom: #f9f9f9 20rpx solid;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -316,7 +316,7 @@
|
|||||||
|
|
||||||
.user-content {
|
.user-content {
|
||||||
padding-left: 158rpx;
|
padding-left: 158rpx;
|
||||||
height: 128rpx;
|
height: 140rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user