diff --git a/api/index.js b/api/index.js
index 26f7505..ac890d4 100644
--- a/api/index.js
+++ b/api/index.js
@@ -75,7 +75,7 @@ export default { // 所有接口
hasLifestyleAssessment: (param) => ajax.get('dis-day-task/hasLifestyleAssessment', param), //查询生活方式评估状态
sendTheVerificationCodeApp: (param) => ajax.get('sysUser/sendTheVerificationCodeApp', param), // 发送手机号验证码
selectFoodsInfo: (param) => ajax.get(`doodsInfo/selectFoodsInfo`, param), // 查询食材详情
- selectDictListByFoodList: (param) => ajax.get('disease-assess-dict/selectDictListByFoodList', param), //查询疾病字典
+ selectDictListByFoodList: (param) => ajax.get('disease-assess-dict/selectDictListByFoodList2', param), //查询疾病字典
getDiseaseFoodsLevel: (param) => ajax.get(`healthTools/getDiseaseFoodsLevel`, param), //食物榜单
getFoodTypes: (param) => ajax.get('healthTools/getFoodTypes', param),
selectFoodsList: (param) => ajax.get(`healthTools/selectFoodsList`, param), //食物成分
diff --git a/src/pages/hairtailScreen/exchangePortion/detail/detail.scss b/src/pages/hairtailScreen/exchangePortion/detail/detail.scss
index b5e09e8..827fc7f 100644
--- a/src/pages/hairtailScreen/exchangePortion/detail/detail.scss
+++ b/src/pages/hairtailScreen/exchangePortion/detail/detail.scss
@@ -127,6 +127,28 @@ page {
color: #51CED5;
font-weight: 500;
}
+ .descri{
+ width:100%;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ font-weight: 400;
+ font-size: 26px;
+ margin-top:15px;
+ color: #6E7477;
+ }
+ .descri-content{
+ width:100%;
+ margin-top:15px;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ .content{
+ font-weight: 400;
+ font-size: 26px;
+ color: #6E7477;
+ }
+ }
.bottomTitle{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
diff --git a/src/pages/hairtailScreen/exchangePortion/detail/detail.vue b/src/pages/hairtailScreen/exchangePortion/detail/detail.vue
index 17466a7..39690e5 100644
--- a/src/pages/hairtailScreen/exchangePortion/detail/detail.vue
+++ b/src/pages/hairtailScreen/exchangePortion/detail/detail.vue
@@ -10,8 +10,10 @@
{{fomeData.foodName}}
- 100g
- {{fomeData.foodKcal}}{{fomeData.foodUnit}}
+ 100g
+ {{fomeData.foodKcal}}{{fomeData.foodUnit}}
+ {{fomeData.foodKcal}}{{fomeData.foodUnit}}钠
+ {{fomeData.foodWeight}}ml
@@ -19,12 +21,27 @@
-
+
{{item.foodName}}
- 100g
- {{item.foodKcal}}{{item.foodUnit}}
+
+ 盐
+
+
+
+ 糖
+
+
+ 100g
+ {{item.foodKcal}}{{item.foodUnit}}
+ {{ item.foodSalt }}g
+
+ 注:1克食盐≈400mg钠
+
+
+ 注:成年人每天的添加糖摄入量不应超过 50 克,最好控制在 25 克以下。
+
+
@@ -51,12 +68,14 @@
return {
fomeData: {},
id: null, //食物id
+ type:"", //食物分类
pageShow: false,
isHome: false, //返回首页图标是否显示
}
},
onLoad(opt) {
this.id = opt.id
+ this.type = opt.type
this.getFoodsInfo()
},
methods: {
diff --git a/src/pages/hairtailScreen/exchangePortion/index/index.vue b/src/pages/hairtailScreen/exchangePortion/index/index.vue
index 9056fcf..4b75c2e 100644
--- a/src/pages/hairtailScreen/exchangePortion/index/index.vue
+++ b/src/pages/hairtailScreen/exchangePortion/index/index.vue
@@ -17,11 +17,20 @@
{{item.foodName}}
-
+
{{item.foodKcal}}
千卡
/100克
+
+ {{item.foodKcal}}
+ mg钠
+ /100克
+
+
+ {{item.foodSalt}}
+ ml
+
@@ -43,7 +52,7 @@
-
+
搜索
@@ -98,6 +107,7 @@
total: 0, //总条数
isPageShow: false, //列表是否显示
isHome: false, //返回首页图标是否显示
+ foodClass:"", //点击食品分类
}
},
onLoad() {
@@ -106,12 +116,13 @@
userId: 29
}
}).then(res => {
- this.diseaseList = res.data
+ this.diseaseList = res.data.slice(0,3)
})
},
methods: {
// 选择
twoChane(item, index) {
+ this.foodClass = item.id //食品分类,1,高油类,2,高钠类,3,饮料与糖
this.selectIndex = index
this.typeCode = item.id
this.pageNum = 1
@@ -149,7 +160,7 @@
},
goDetail(item) {
uni.navigateTo({
- url: '/pages/hairtailScreen/exchangePortion/detail/detail?id=' + item.id
+ url: '/pages/hairtailScreen/exchangePortion/detail/detail?id=' + item.id + '&type=' + this.foodClass
})
},
// 上一页