diff --git a/pages/essentialInfo/index.vue b/pages/essentialInfo/index.vue
index 357dd56..a149002 100644
--- a/pages/essentialInfo/index.vue
+++ b/pages/essentialInfo/index.vue
@@ -11,21 +11,18 @@
- 基本信息
-
+ 基本信息
- 健康目标
-
+ 健康目标
- 行为习惯
-
+ 行为习惯
-
+
生理性别和激素会影响我们的身体代谢食物的方式
@@ -47,19 +44,7 @@
你的出生日期是?
{{ showBirthday }}
-
+
@@ -68,7 +53,6 @@
身高体重信息对健康信息有重要参考价值
您的身高是?
-
{{ heightU }}厘米
@@ -84,51 +68,18 @@
下一步
-
+
-
+
您的目标是?
-
-
- 减肥
-
-
-
- 保持体重
-
-
-
- 增肌
-
+ 减肥
+ 保持体重
+ 增肌
上一步
@@ -141,10 +92,7 @@
您的打算减脂多少?
-
- {{ weightTargetU }}
- 公斤
-
+ {{ weightTargetU }} 公斤
@@ -153,7 +101,7 @@
下一步
-
+
@@ -162,51 +110,19 @@
您的运动量是?
-
+
久坐不动
-
+
少量运动
-
+
中等运动量
-
+
超强度运动
@@ -274,7 +190,6 @@ export default {
},
computed: {
showBirthday() {
- console.log(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.heightWeightShow = true; // 展示身高体重模块
},
+
// 年龄 ----- 取消选择年龄
camcelBirthday() {
this.birthdayShow = false; // // 年龄页面弹窗不显示
@@ -304,6 +220,7 @@ export default {
this.percentplan1 = 0; // 进度为0
this.sexShow = true; // 显示性别页面
},
+
//年龄------------- 过滤出生年月日
formatter(type, value) {
if (type === 'year') {return `${value}年`;}
@@ -311,6 +228,8 @@ export default {
if (type === 'day') {return `${value}日`;}
return value;
},
+
+
// 体重---------标尺滚动
scrollWeight(msg) {
this.weightU = msg;
@@ -332,6 +251,8 @@ export default {
this.targetShow = true; // 目标页面展示
}
},
+
+
// 目标 ------------点击 1上一页 2 下一页
targetClick(type) {
if (type === 1) {
@@ -368,6 +289,8 @@ export default {
this.behaviorShow = true; // 打开行为习惯页面
}
},
+
+
// 目标 运动量--------- 1上一页 2 下一页
targetBehaviorClick(type) {
if (type === 1) {
@@ -391,7 +314,6 @@ export default {
exercise: this.activedbehaviarTarget, // 运动量
days: 1
};
- console.log(params, 'params.....');
recordsHealth(params)
.then(res => {
uni.showModal({
@@ -406,10 +328,12 @@ export default {
});
})
.catch(err => {
- uni.showToast({
- title: err.message,
- icon: 'none'
- });
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
});
}
}
diff --git a/pages/evaluation/index.vue b/pages/evaluation/index.vue
index e97b152..b512745 100644
--- a/pages/evaluation/index.vue
+++ b/pages/evaluation/index.vue
@@ -6,172 +6,175 @@
* @LastEditTime: 2022-01-13 17:16:09
-->
-
-
-
-
-
- {{ percent }}%
-
-
- {{ page }}.{{ currentInfo.title }}
-
-
-
-
-
-
-
-
- 下一步
-
-
+
+
+
+
+
+ {{ percent }}%
+
+
+ {{ page }}.{{ currentInfo.title }}
+
+
+
+
+
+
+
+
+ 下一步
+
+
diff --git a/pages/evaluation/introduce.vue b/pages/evaluation/introduce.vue
index 8850f9d..37b52d7 100644
--- a/pages/evaluation/introduce.vue
+++ b/pages/evaluation/introduce.vue
@@ -6,129 +6,138 @@
* @LastEditTime: 2022-01-13 17:26:38
-->
-
- 测评记录
- 暂未测评
-
- {{ info.title }}
-
-
-
-
- 开始测评
-
-
-
+
+ 测评记录
+ 暂未测评
+
+ {{ info.title }}
+
+
+
+
+ 开始测评
+
+
+
diff --git a/pages/evaluation/list.vue b/pages/evaluation/list.vue
index c2a4daa..896493b 100644
--- a/pages/evaluation/list.vue
+++ b/pages/evaluation/list.vue
@@ -11,44 +11,20 @@
-
- {{ item.title }}
- {{ item.description || '--' }}
-
+ {{ item.title }} {{ item.description || '--' }}
-
- {{ item.answer.total }}
- 分
-
+ {{ item.answer.total }} 分
-
- ·
- {{ item.remark }}
-
+ · {{ item.remark }}
查看历史结果
-
- ·
- {{ item.remark }}
- 人已测 | 约4~8分钟
-
-
+ · {{ item.remark }} 人已测 | 约4~8分钟
+
@@ -72,7 +48,14 @@ export default {
getList() {
evaluations().then(res => {
this.evalList = res;
- });
+ }).catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
+ });
},
// nowEva
nowEva(item) {
diff --git a/pages/evaluation/result.vue b/pages/evaluation/result.vue
index 29fa042..6888e1e 100644
--- a/pages/evaluation/result.vue
+++ b/pages/evaluation/result.vue
@@ -53,9 +53,7 @@
营养建议
-
- {{ item }}. 低Gi
-
+ {{ item }}. 低Gi
饮食营养及生活方式对维持面部年轻态影响较大,建议注意食材选择,逐步清淡口味;规律作息,逐个改善不良生活习惯;帮助改善当前皮肤状态。
@@ -63,10 +61,7 @@
-
- 更多护肤知识
-
-
+ 更多护肤知识
@@ -109,7 +104,14 @@ export default {
]
};
this.loaded = true;
- });
+ }).catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
+ });
},
reEva() {
uni.navigateTo({
diff --git a/pages/record/addExercises.vue b/pages/record/addExercises.vue
index 8390a35..5b4e857 100644
--- a/pages/record/addExercises.vue
+++ b/pages/record/addExercises.vue
@@ -60,11 +60,17 @@ export default {
healthSports(data).then(res => {
this.lists = this.lists.concat(res.data);
this.has_more = res.page.has_more;
- });
+ }).catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
+ });
},
// 显示弹窗内容
addSport(item) {
- console.log(item);
this.selectSports = item;
this.selectSports.duration = 60;
this.addSportsShow = true;
@@ -99,7 +105,6 @@ export default {
//#region 搜索相关方法 start
// 点击搜索左侧按钮
searchCustom(e) {
- console.log(e);
this.name = e;
this.reset();
},
diff --git a/pages/record/addFoods.vue b/pages/record/addFoods.vue
index b273661..97f95d3 100644
--- a/pages/record/addFoods.vue
+++ b/pages/record/addFoods.vue
@@ -8,11 +8,7 @@
-
- 低等热量
- 中等热量
- 高等热量
-
+ 低等热量 中等热量 高等热量
@@ -59,8 +55,6 @@
//没有id的时候就是新增要处理type
this.type = this.$Route.query.type;
this.date = this.$Route.query.date;
- console.log(this.date,'date.........')
- // this.getFoods();
},
onLoad() {
this.getFoods();
@@ -85,9 +79,15 @@
name: this.name,
};
healthFoods(data).then((res) => {
- console.log(res);
this.lists = this.lists.concat(res.data);
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,
date: this.date,
};
- console.log(data,'data...........');
this.addHealthFoods(data);
},
// 添加食物
addHealthFoods(data) {
addHealthFoods(data).then((res) => {
- console.log(res);
this.addShow = false;
this.$Router.back();
}).catch(err => {
- console.log(err, '添加食物error');
uni.showToast({
title: err.message,
icon: "none",
@@ -133,7 +130,6 @@
},
// 点击搜索左侧按钮
searchCustom(e) {
- console.log(e);
this.name = e;
this.reset();
},
diff --git a/pages/record/drink.vue b/pages/record/drink.vue
index 68a6caa..f14219b 100644
--- a/pages/record/drink.vue
+++ b/pages/record/drink.vue
@@ -28,15 +28,10 @@
-
- 再喝
- {{ water.lack.cup }}
- 杯
- (约{{ water.lack.value }}ml)
-
+ 再喝 {{ water.lack.cup }} 杯 (约{{ water.lack.value }}ml)
- 已喝
- {{ water.total }}ml
+ 已喝 {{ water.total }}ml
@@ -48,13 +43,11 @@
-
- 今日目标
+ 今日目标
-
- 水杯容量
+ 水杯容量
@@ -86,11 +79,7 @@
-
- 水
- {{ item.time }}
-
- {{ item.ml }}ml
+ 水 {{ item.time }} {{ item.ml }}ml
@@ -156,12 +145,17 @@
this.tagertsDefaultIndex = [res.tagerts.findIndex(item => item.number === res.water
.target)];
this.loaded = true;
+ }).catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
});
},
// 确认方法index===1 每日目标 2,水杯容量
targetSure(index, e) {
- // console.log("触发了targetSure", index, e.value[0]);
- // let date = moment(new Date()).format("YYYY--MM--DD");
let params = {};
if (index === '1') {
params = {
@@ -180,25 +174,29 @@
this.getWaters();
this.waterCShow = false;
this.targetShow = false;
+ }).catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
});
},
// 喝水
drinkWater() {
- console.log('喝水。。。')
let data = {
date: this.today
}
- console.log(data, 'data....')
drinkWater(data).then(res => {
this.getWaters();
this.dateLists()
}).catch(err => {
- console.log(err, '添加食物error');
uni.showToast({
title: err.message,
icon: "none",
- duration:2000,
- mask:true
+ duration: 2000,
+ mask: true
})
});
},
@@ -219,8 +217,10 @@
.catch(err => {
uni.showToast({
title: err.message,
- icon: 'none'
- });
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
});
}
}
@@ -233,22 +233,21 @@
month: this.month,
type: this.dateType
}
- console.log(data,'data.....')
dateList(data).then(res => {
- console.log(res)
this.calendarList = res.calendar
this.dateType = ''
this.month = res.month
}).catch(err => {
uni.showToast({
title: err.message,
- icon: 'none'
+ icon: "none",
+ duration: 2000,
+ mask: true
})
})
},
// 选择日期
dateClick(item) {
- console.log(item)
this.today = item.today
this.month = item.today
this.reset()
diff --git a/pages/record/foods.vue b/pages/record/foods.vue
index c0be654..7488c32 100644
--- a/pages/record/foods.vue
+++ b/pages/record/foods.vue
@@ -10,53 +10,35 @@
-
-
-
+
-
-
-
+
-
- 饮食摄入
- {{ calorys.intake_total }}
-
+ 饮食摄入 {{ calorys.intake_total }}
+ :activeColor="calorys.exceeds ? '#c50000' : '#34ce98'" width="300" class="cricle" borderWidth="20">
{{ calorys.exceeds ? '多吃了' : '还可以吃' }}
{{ calorys.amount }}
推荐预算{{ calorys.goal }}
-
- 运动消耗
- {{ calorys.exercise_total }}
-
+ 运动消耗 {{ calorys.exercise_total }}
摄入量推荐
-
+
-
- {{ it.name }}
- {{ it.remark || '' }}
-
-
- {{ it.total }}
- 千卡
-
-
+ {{ it.name }} {{ it.remark || '' }}
+ {{ it.total }} 千卡
@@ -66,31 +48,23 @@
运动
-
- {{ sportsTotal }}
- 千卡
-
-
+ {{ sportsTotal }} 千卡
-
-
+
还没有添加今日饮食记录
请点击屏幕下方按钮来添加
-
+
-
+
@@ -99,17 +73,13 @@
-
+
-
-
+
-
+
@@ -173,6 +143,13 @@
this.intakes = res.intakes;
this.sports = res.exercises.lists;
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,
title: '编辑运动'
};
- // console.log(this.selectSports);
this.addSportsShow = true;
},
// 弹窗确认按钮新增 这里接口报错了 ,
@@ -207,7 +183,9 @@
}).catch(err => {
uni.showToast({
title: err.message,
- icon: 'none'
+ icon: "none",
+ duration: 2000,
+ mask: true
})
});
},
@@ -220,11 +198,17 @@
let params = {
exercise_id: this.selectSports.exercise_id //
};
- console.log(params);
delHealthSports(params).then(res => {
this.addSportsShow = false;
this.selectSports = {};
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)
tabbarClick(e) {
- console.log(e);
this.tabarIndex = e;
if (e === 3) {
this.addEatShow = true;
@@ -319,14 +302,14 @@
// 添加食物
editHealthFoods(data) {
editHealthFoods(data).then(res => {
- console.log(res,'添加食物');
this.addShow = false;
this.getList();
- }).catch(err=>{
- console.log(res,'添加食物error');
+ }).catch(err => {
uni.showToast({
- title:err.message,
- icon:"none"
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
})
});
},
@@ -335,6 +318,13 @@
delHealthFoods(this.selectGoods[0].intake_id).then(res => {
this.addShow = false;
this.getList();
+ }).catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
});
},
// 跳转到食品详情
@@ -354,14 +344,15 @@
type: this.dateType
}
dateList(data).then(res => {
- console.log(res)
this.calendarList = res.calendar
this.dateType = ''
this.month = res.month
}).catch(err => {
uni.showToast({
title: err.message,
- icon: 'none'
+ icon: "none",
+ duration: 2000,
+ mask: true
})
})
},
diff --git a/pages/record/index.vue b/pages/record/index.vue
index dfa5f76..54b15aa 100644
--- a/pages/record/index.vue
+++ b/pages/record/index.vue
@@ -398,7 +398,6 @@ export default {
*/
logs() {
logs().then(res => {
- // console.log(res.is_login)
this.weight = res.weight;
this.water = res.water;
this.intake_run = res.intake_run;
@@ -408,7 +407,14 @@ export default {
this.banner = res.banner;
this.user = res.user;
this.notifications_count = res.notifications_count;
- });
+ }).catch(err => {
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
+ });
},
/**
* @description:跳转登录页面
diff --git a/pages/record/weight.vue b/pages/record/weight.vue
index 9f4661e..bad53fb 100644
--- a/pages/record/weight.vue
+++ b/pages/record/weight.vue
@@ -134,7 +134,6 @@
//获取体重首页接口
getWeights() {
weights(this.page).then((res) => {
- console.log(res)
if (res.lists.page.current === 1) {
this.lists = []
}
@@ -198,7 +197,6 @@
// 点击底部切换
tabbarClick(e) {
- console.log(e)
this.tabbarId = Number(e)
}
},
diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue
index 7f9ba30..124931b 100644
--- a/pages/setting/setting.vue
+++ b/pages/setting/setting.vue
@@ -3,18 +3,14 @@
-
- 修改头像
-
+ 修改头像
-
- 修改昵称
-
+ 修改昵称
@@ -86,11 +82,13 @@
this.avatar.showPath = pathRes.url[0]
this.resetUserInfo('avatar',pathRes.url[0])
}).catch(err => {
- uni.showToast({
- title: err.message,
- icon: 'none'
- })
- })
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
+ })
}
})
},
@@ -114,11 +112,13 @@
})
this.getUserInfo()
}).catch(err => {
- uni.showToast({
- title: err.message,
- icon: 'none'
- })
- })
+ uni.showToast({
+ title: err.message,
+ icon: "none",
+ duration: 2000,
+ mask: true
+ })
+ })
}
}
}
diff --git a/pages/user/files.vue b/pages/user/files.vue
index 3a1dc8a..0271b33 100644
--- a/pages/user/files.vue
+++ b/pages/user/files.vue
@@ -1,282 +1,316 @@
-
-
-
- 性别
-
-
-
-
- { (this.recordsData.sex = e.id), (this.sexShow = false); } "
- @close="sexShow = false"
- />
-
+
+
+
+ 性别
+
+
+
+
+ { (this.recordsData.sex = e.id), (this.sexShow = false); } " @close="sexShow = false" />
+
-
-
- 生日
-
-
-
-
- { this.recordsData.birthday = e.value, this.birthdayShow = false } "
- @cancel=" () => { this.birthdayShow = false; } "
- />
-
+
+
+ 生日
+
+
+
+
+ { this.recordsData.birthday = e.value, this.birthdayShow = false } "
+ @cancel=" () => { this.birthdayShow = false; } " />
+
-
-
- 身高
-
-
-
-
- { heightShow = false }">
-
- 你的身高为?
- {{recordsData.height}} CM
-
-
-
-
+
+
+ 身高
+
+
+
+
+ { heightShow = false }">
+
+ 你的身高为?
+ {{recordsData.height}} CM
+
+
+
+
-
-
- 最新体重
-
-
-
-
- { weightShow = false }">
-
- 你的当前体重为?
- {{recordsData.weight}} KG
-
-
-
-
+
+
+ 最新体重
+
+
+
+
+ { weightShow = false }">
+
+ 你的当前体重为?
+ {{recordsData.weight}} KG
+
+
+
+
-
-
- 目标
-
-
-
-
- { (this.selectedTargetIndex = this.targetList.findIndex(item => e.id === item.id)), (this.targetShow = false); } "
- @close="targetShow = false"
- />
-
+
+
+ 目标
+
+
+
+
+ { (this.selectedTargetIndex = this.targetList.findIndex(item => e.id === item.id)), (this.targetShow = false); } "
+ @close="targetShow = false" />
+
-
-
- 目标体重
-
-
- { targetWeightShow = false }">
-
- 你的目标体重为?
- {{recordsData.goal_weight}} KG
-
-
-
-
+
+
+ 目标体重
+
+
+
+
+ { targetWeightShow = false }">
+
+ 你的目标体重为?
+ {{recordsData.goal_weight}} KG
+
+
+
+
-
-
- 运动量
-
-
-
-
- { (this.selectExerciseIndex = this.exerciseList.findIndex(item => e.id === item.id)), (this.exerciseShow = false); } "
- @close="exerciseShow = false"
- />
-
- 确认修改
- 修改资料后可更新并查看最新方案,预算热量可能会发生变化
-
+
+
+ 运动量
+
+
+
+
+ { (this.selectExerciseIndex = this.exerciseList.findIndex(item => e.id === item.id)), (this.exerciseShow = false); } "
+ @close="exerciseShow = false" />
+
+ 确认修改
+ 修改资料后可更新并查看最新方案,预算热量可能会发生变化
+
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 9f92075..50cdd88 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -316,7 +316,7 @@
.user-content {
padding-left: 158rpx;
- height: 128rpx;
+ height: 140rpx;
display: flex;
flex-direction: column;
justify-content: center;