测试问题修改

This commit is contained in:
zzyuan 2025-05-27 10:26:44 +08:00
parent 3b20cadbde
commit 6a6f18c263
9 changed files with 253 additions and 87 deletions

View File

@ -119,6 +119,17 @@ export function getCarouselImageListApi(data) {
} }
/**
* @data 标题
*/
export function getBaseSettingByKeyApi(data) {
return request({
url: '/smart-canteen/android/baseSetting/getBaseSettingByKey',
method: 'post',
data:data
})
}

View File

@ -4,9 +4,9 @@ module.exports = {
// baseUrl: 'http://192.168.0.39:21995', // baseUrl: 'http://192.168.0.39:21995',
// #ifdef H5 // #ifdef H5
// baseUrl: '/canteen/dev-api', // baseUrl: '/canteen/dev-api',
// baseUrl: '/dev-api', baseUrl: '/dev-api',
// baseUrl: 'http://192.168.0.244:38380',//测试 // baseUrl: 'http://192.168.0.244:38380',//测试
baseUrl: 'http://192.168.0.244:48380',//测试 // baseUrl: 'http://192.168.0.244:48380',//测试
// baseUrl: 'http://192.168.0.244:58580',//测试 // baseUrl: 'http://192.168.0.244:58580',//测试
// baseUrl: 'http://192.168.2.82:58080',//张天强 // baseUrl: 'http://192.168.2.82:58080',//张天强
// baseUrl: 'http://192.168.2.69:58080',//董高文 // baseUrl: 'http://192.168.2.69:58080',//董高文

View File

@ -37,56 +37,107 @@
</view> </view>
<view class="tab-content"> <view class="tab-content">
<view class="info-box" v-if="hIndex==0"> <view class="info-box" v-if="hIndex==0">
<view style="margin-bottom: 20px;"> <view style="margin-bottom: 20px;word-break: break-all;">
<text style="color: #959FA4;">菜品简介</text> <text style="color: #959FA4;margin-right: 20px;">菜品简介</text>
<text style="margin-left: 20px;word-break: break-all;">{{dashesData.intro||'-'}}</text> <text style="word-break: break-all;">{{dashesData.intro||'-'}}</text>
</view> </view>
<view style="margin-bottom: 20px;"> <view style="margin-bottom: 20px;word-break: break-all;">
<text style="color: #959FA4;">主料</text> <text style="color: #959FA4;margin-right: 20px;">主料</text>
<text style="margin-left: 20px;word-break: break-all;">-</text> <text>
{{dashesData.mainMaterialStr||'-'}}
</text>
</view> </view>
<view style="margin-bottom: 20px;"> <view style="margin-bottom: 20px;word-break: break-all;">
<text style="color: #959FA4;">辅料</text> <text style="color: #959FA4;margin-right: 20px;">辅料</text>
<text style="margin-left: 20px;word-break: break-all;">-</text> <text>
{{dashesData.subMaterialStr||'-'}}
</text>
</view> </view>
<view style="margin-bottom: 20px;"> <!-- <view style="margin-bottom: 20px;">
<text style="color: #959FA4;">口味</text> <text style="color: #959FA4;">口味</text>
<text style="margin-left: 20px;word-break: break-all;">-</text> <text style="margin-left: 20px;word-break: break-all;">-</text>
</view> </view> -->
</view> </view>
<view class="nutrition-box" v-if="hIndex==1"> <view class="nutrition-box" v-if="hIndex==1">
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>项目()</view> <view>项目()</view>
<view>热量()</view> <view>热量()</view>
<view>蛋白质()</view> <view>蛋白质()</view>
<view>脂肪()</view> <view>脂肪()</view>
<view>碳水化合物()</view> <view>碳水化合物()</view>
<view>膳食纤维()</view> <view>膳食纤维()</view>
<view>胆固醇()</view> <view>胆固醇()</view>
<!-- <view>维生素A()</view>
<view>维生素C()</view>
<view>维生素E()</view> -->
<!-- <view>胡萝卜素()</view>
<view>视黄醇()</view>
<view>硫胺素()</view>
<view>核黄素()</view> -->
<view>()</view> <view>()</view>
<!-- <view>()</view>
<view>()</view> -->
<view>()</view> <view>()</view>
<!-- <view>()</view>
<view>()</view>
<view>()</view>
<view>()</view>
<view>()</view>
<view>()</view> -->
</view> </view>
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>含量</view> <view>含量</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].calories||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].protein||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].fat||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].carbohydrate||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].dietaryFiber||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].cholesterol||'-'}}</view>
<view>-</view> <!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].vitaminC||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminE||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].carotene||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].retinol||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].thiamine||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].riboflavin||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].calcium||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].phosphorus||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].kalium||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].sodium||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].magnesium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].iron||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].zinc||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].selenium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cuprum||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].manganese||'-'}}</view> -->
</view> </view>
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>NRV%</view> <view>NRV%</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].caloriesNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].proteinNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].fatNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].carbohydrateNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].dietaryFiberNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].cholesterolNrv||'-'}}</view>
<view>-</view> <!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].vitaminC||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminE||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].caroteneNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].retinol||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].thiamine||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].riboflavin||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].calciumNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].phosphorus||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].kalium||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].sodiumNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].magnesium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].iron||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].zinc||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].selenium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cuprum||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].manganese||'-'}}</view> -->
</view> </view>
</view> </view>
<view class="evaluate-box" v-if="hIndex==2"> <view class="evaluate-box" v-if="hIndex==2">
@ -282,6 +333,19 @@ export default {
const res = await getMenudishesDetailAPI(param) const res = await getMenudishesDetailAPI(param)
if(res.code==200){ if(res.code==200){
this.dashesData = res.data; this.dashesData = res.data;
if(this.dashesData.materialList&&this.dashesData.materialList.length>0){
let arr1=[]
let arr2=[]
this.dashesData.materialList.forEach(item=>{
if(item.materialType==1){ arr1.push(item.materialName) }
if(item.materialType==2){ arr2.push(item.materialName) }
})
this.dashesData.mainMaterialStr = arr1.join("、")
this.dashesData.subMaterialStr = arr2.join("、")
}else{
this.dashesData.mainMaterialStr = ""
this.dashesData.subMaterialStr = ""
}
this.$set(this.dashesData, 'quantity', 0) this.$set(this.dashesData, 'quantity', 0)
this.$set(this.dashesData, 'monthlySales', this.dashesData.dishesDetailList[0].monthlySales) this.$set(this.dashesData, 'monthlySales', this.dashesData.dishesDetailList[0].monthlySales)
this.$set(this.dashesData, 'goodProbability', this.dashesData.dishesDetailList[0].goodProbability) this.$set(this.dashesData, 'goodProbability', this.dashesData.dishesDetailList[0].goodProbability)

View File

@ -215,6 +215,7 @@ export default {
active: 1, // 1 2 active: 1, // 1 2
// canteenName: '/', // canteenName: '/',
canteenType: '自取', // 1 2 canteenType: '自取', // 1 2
isHandle:false
} }
}, },
onLoad(options) { onLoad(options) {
@ -227,11 +228,10 @@ export default {
this.recipeId=options.recipeId; this.recipeId=options.recipeId;
}, },
onShow() { onShow() {
//
this.getReserveDate()
setTimeout(()=>{ setTimeout(()=>{
// //
this.getMenuListData() this.getReserveDate()
},200) },200)
}, },
methods: { methods: {
@ -244,6 +244,7 @@ export default {
const res = await getlistReserveDateAPI(param) const res = await getlistReserveDateAPI(param)
this.getNowFormatDate(res.data[0]) this.getNowFormatDate(res.data[0])
this.getNowFormatDate2(res.data[0]) this.getNowFormatDate2(res.data[0])
//
this.getMenuListData() this.getMenuListData()
}, },
// //
@ -269,7 +270,7 @@ export default {
async getMenuListData() { async getMenuListData() {
let param = { let param = {
"recipeId":this.recipeId, "recipeId":this.recipeId,
"applyDate":this.newDate2, "applyDate":this.newDate2,
// "applyDate":"2025-04-18", // "applyDate":"2025-04-18",
} }
const res = await getAdvanceDetailListAPI(param) const res = await getAdvanceDetailListAPI(param)
@ -443,35 +444,41 @@ export default {
} }
console.log(cartItem) console.log(cartItem)
} }
} }
}) })
}) })
}) })
}) })
console.log(this.shoppingCartList) console.log(this.shoppingCartList)
this.isHandle = false
// //
this.handleTotalPrice() this.handleTotalPrice()
}else{ }else{
this.isHandle = false
this.shoppingCartList = [] this.shoppingCartList = []
} }
}, },
// //
handleFoodNum(type, food) { handleFoodNum(type, food) {
console.log(food)
if (type === 1) { if (type === 1) {
if (food.quantity > 0) { if (food.quantity > 0) {
food.quantity-- if(!this.isHandle){
this.delShopCart(food) food.quantity--
this.delShopCart(food)
}
} }
} else { } else {
if (food.quantity < food.restrictNum) { if (food.quantity < food.restrictNum) {
this.addShopCart(food) if(!this.isHandle){
this.addShopCart(food)
}
} }
} }
}, },
async addShopCart(item){ async addShopCart(item){
console.log('?? ~ handleFoodNum ~ type', "新增") console.log('?? ~ handleFoodNum ~ type', "新增")
console.log(item) console.log(item)
this.isHandle = true
let param = { let param = {
"userId":uni.getStorageSync('userId'), "userId":uni.getStorageSync('userId'),
"orderType": 2, "orderType": 2,
@ -504,6 +511,7 @@ export default {
async delShopCart(item){ async delShopCart(item){
console.log('?? ~ handleFoodNum ~ type', "减少") console.log('?? ~ handleFoodNum ~ type', "减少")
console.log(item) console.log(item)
this.isHandle = true
if(item.quantity>0){ if(item.quantity>0){
let param = { let param = {
"userId":uni.getStorageSync('userId'), "userId":uni.getStorageSync('userId'),

View File

@ -12,7 +12,7 @@
> >
</u-navbar> --> </u-navbar> -->
<view class="header"> <view class="header">
<text class="header-text">皖送e餐</text> <text class="header-text">{{AppTitle}}</text>
<view v-if="fontValue==8" style="font-size: 28rpx;display: flex;align-items: center;" @click="onChangeSize"> <view v-if="fontValue==8" style="font-size: 28rpx;display: flex;align-items: center;" @click="onChangeSize">
<image src="/static/images/index/switch.png" style="width: 38rpx;height: 38rpx;margin-right: 10rpx;" mode="aspectFit"></image> <image src="/static/images/index/switch.png" style="width: 38rpx;height: 38rpx;margin-right: 10rpx;" mode="aspectFit"></image>
<text>关怀版</text> <text>关怀版</text>
@ -91,7 +91,7 @@
</template> </template>
<script> <script>
import { getWalletBalanceAPI, getOrderQRCodeAPI,getCarouselImageListApi } from '../api/index/index' import { getWalletBalanceAPI, getOrderQRCodeAPI,getCarouselImageListApi,getBaseSettingByKeyApi } from '../api/index/index'
import { queryUserInformApi,queryUnreadInformNumApi } from '@/api/mine/index' import { queryUserInformApi,queryUnreadInformNumApi } from '@/api/mine/index'
export default { export default {
data() { data() {
@ -122,14 +122,16 @@ export default {
walletBal: 0 ,// walletBal: 0 ,//
messageNumber:0,// messageNumber:0,//
showNotice:false, showNotice:false,
noticeData:{} noticeData:{},
AppTitle:''
} }
}, },
onShow() { onShow() {
this.getUserInfo() this.getUserInfo()
this.getCarouselImageList() this.getCarouselImageList()
}, },
onLoad() { onLoad() {
this.getBaseSettingByKey()
// this.getUnReadNoticeNum() // this.getUnReadNoticeNum()
// this.timer = setInterval(() => { // this.timer = setInterval(() => {
// this.getWalletBalanceData() // this.getWalletBalanceData()
@ -141,9 +143,9 @@ export default {
// uni.navigateBack() // uni.navigateBack()
}, },
methods: { methods: {
leftClick() { // leftClick() {
uni.navigateTo({ url: '/pages/system' }) // uni.navigateTo({ url: '/pages/system' })
}, // },
/* 关怀版 */ /* 关怀版 */
onChangeSize() { onChangeSize() {
if(this.fontValue==8){ if(this.fontValue==8){
@ -234,8 +236,9 @@ export default {
// //
async getCarouselImageList() { async getCarouselImageList() {
let param = { let param = {
// "pageNum": 1, "isEnabled":'0',
// "pageSize": 100, "pageNum": 1,
"pageSize": 100,
} }
const { rows: res } = await getCarouselImageListApi(param) const { rows: res } = await getCarouselImageListApi(param)
this.bannerList = [] this.bannerList = []
@ -244,6 +247,17 @@ export default {
}) })
console.log(this.bannerList) console.log(this.bannerList)
}, },
async getBaseSettingByKey() {
let param = {
"key":'首页标题',
}
const { data: res } = await getBaseSettingByKeyApi(param)
this.AppTitle = res.value
},
open() { open() {
// console.log('open'); // console.log('open');
}, },

View File

@ -102,7 +102,7 @@ export default {
if(this.loginForm.username&&this.loginForm.password){ if(this.loginForm.username&&this.loginForm.password){
this.loginForm.encryptPassword = AES.encrypt(this.loginForm.password) this.loginForm.encryptPassword = AES.encrypt(this.loginForm.password)
this.$store.dispatch('Login', this.loginForm).then(() => { this.$store.dispatch('Login', this.loginForm).then(() => {
this.$tab.reLaunch('/pages/system') this.$tab.reLaunch('/pages/index')
}).catch(() => { }) }).catch(() => { })
} }
} }

View File

@ -25,7 +25,7 @@
<!-- 提示信息 --> <!-- 提示信息 -->
<view class="tips"> <view class="tips">
<text class="tip-item">·五官端正面部无遮挡请使用人脸照片</text> <text class="tip-item">·五官端正面部无遮挡请使用人脸照片</text>
<text class="tip-item">·不要带视频如墨镜等</text> <text class="tip-item">·不要带饰品如墨镜等</text>
<text class="tip-item">·请在光线明亮的纯色背景下拍照建议背景颜色为白色</text> <text class="tip-item">·请在光线明亮的纯色背景下拍照建议背景颜色为白色</text>
<text class="tip-item">·上传照片后需保存保存失败照片将被清除</text> <text class="tip-item">·上传照片后需保存保存失败照片将被清除</text>
</view> </view>

View File

@ -2,12 +2,12 @@
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta> <page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
<view class="work-container"> <view class="work-container">
<!-- 第一个条目 --> <!-- 第一个条目 -->
<view class="item" v-for="item in weekCookList" :key="item.recipeId" @click="goMenuList(item)"> <view class="item" v-for="(item,index) in weekCookList" :key="index" @click="goMenuList(item)">
<image class="image" :src="item.canteenImgUrl"></image> <image class="image" :src="item.canteenImgUrl"></image>
<view class="content"> <view class="content">
<text class="title">本周菜谱</text> <text class="title">本周菜谱</text>
<text class="sub-title">食堂{{ item.canteenName }}</text> <text class="sub-title">食堂{{ item.canteenName||'' }}</text>
<text class="sub-title">档口{{ item.stallName }}</text> <text class="sub-title">档口{{ item.stallName||'' }}</text>
</view> </view>
</view> </view>
@ -47,7 +47,10 @@ export default {
async getWeekCookbookData() { async getWeekCookbookData() {
this.queryParams.userId = uni.getStorageSync('userId') this.queryParams.userId = uni.getStorageSync('userId')
const res = await getWeekCookbookAPI(this.queryParams) const res = await getWeekCookbookAPI(this.queryParams)
this.weekCookList = res.data this.weekCookList = []
res.data.forEach(item=>{
if(item&&item.recipeId){ this.weekCookList.push(item) }
})
console.log(res, '一周菜谱') console.log(res, '一周菜谱')
}, },
goMenuList(item){ goMenuList(item){

View File

@ -23,56 +23,107 @@
</view> </view>
<view class="tab-content"> <view class="tab-content">
<view class="info-box" v-if="hIndex==0"> <view class="info-box" v-if="hIndex==0">
<view style="margin-bottom: 20px;"> <view style="margin-bottom: 20px;word-break: break-all;">
<text style="color: #959FA4;">菜品简介</text> <text style="color: #959FA4;margin-right: 20px;">菜品简介</text>
<text style="margin-left: 20px;word-break: break-all;">{{dashesData.intro||'-'}}</text> <text style="word-break: break-all;">{{dashesData.intro||'-'}}</text>
</view> </view>
<view style="margin-bottom: 20px;"> <view style="margin-bottom: 20px;word-break: break-all;">
<text style="color: #959FA4;">主料</text> <text style="color: #959FA4;margin-right: 20px;">主料</text>
<text style="margin-left: 20px;word-break: break-all;">-</text> <text>
{{dashesData.mainMaterialStr||'-'}}
</text>
</view> </view>
<view style="margin-bottom: 20px;"> <view style="margin-bottom: 20px;word-break: break-all;">
<text style="color: #959FA4;">辅料</text> <text style="color: #959FA4;margin-right: 20px;">辅料</text>
<text style="margin-left: 20px;word-break: break-all;">-</text> <text>
{{dashesData.subMaterialStr||'-'}}
</text>
</view> </view>
<view style="margin-bottom: 20px;"> <!-- <view style="margin-bottom: 20px;">
<text style="color: #959FA4;">口味</text> <text style="color: #959FA4;">口味</text>
<text style="margin-left: 20px;word-break: break-all;">-</text> <text style="margin-left: 20px;word-break: break-all;">-</text>
</view> </view> -->
</view> </view>
<view class="nutrition-box" v-if="hIndex==1"> <view class="nutrition-box" v-if="hIndex==1">
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>项目()</view> <view>项目()</view>
<view>热量()</view> <view>热量()</view>
<view>蛋白质()</view> <view>蛋白质()</view>
<view>脂肪()</view> <view>脂肪()</view>
<view>碳水化合物()</view> <view>碳水化合物()</view>
<view>膳食纤维()</view> <view>膳食纤维()</view>
<view>胆固醇()</view> <view>胆固醇()</view>
<!-- <view>维生素A()</view>
<view>维生素C()</view>
<view>维生素E()</view> -->
<!-- <view>胡萝卜素()</view>
<view>视黄醇()</view>
<view>硫胺素()</view>
<view>核黄素()</view> -->
<view>()</view> <view>()</view>
<!-- <view>()</view>
<view>()</view> -->
<view>()</view> <view>()</view>
<!-- <view>()</view>
<view>()</view>
<view>()</view>
<view>()</view>
<view>()</view>
<view>()</view> -->
</view> </view>
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>含量</view> <view>含量</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].calories||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].protein||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].fat||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].carbohydrate||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].dietaryFiber||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].cholesterol||'-'}}</view>
<view>-</view> <!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].vitaminC||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminE||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].carotene||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].retinol||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].thiamine||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].riboflavin||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].calcium||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].phosphorus||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].kalium||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].sodium||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].magnesium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].iron||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].zinc||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].selenium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cuprum||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].manganese||'-'}}</view> -->
</view> </view>
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>NRV%</view> <view>NRV%</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].caloriesNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].proteinNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].fatNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].carbohydrateNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].dietaryFiberNrv||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].cholesterolNrv||'-'}}</view>
<view>-</view> <!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</view>
<view>-</view> <view>{{dashesData.dishesDetailList[0].vitaminC||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminE||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].caroteneNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].retinol||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].thiamine||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].riboflavin||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].calciumNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].phosphorus||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].kalium||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].sodiumNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].magnesium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].iron||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].zinc||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].selenium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cuprum||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].manganese||'-'}}</view> -->
</view> </view>
</view> </view>
<view class="evaluate-box" v-if="hIndex==2"> <view class="evaluate-box" v-if="hIndex==2">
@ -154,6 +205,19 @@ export default {
const res = await getMenudishesDetailAPI(param) const res = await getMenudishesDetailAPI(param)
if(res.code==200){ if(res.code==200){
this.dashesData = res.data; this.dashesData = res.data;
if(this.dashesData.materialList&&this.dashesData.materialList.length>0){
let arr1=[]
let arr2=[]
this.dashesData.materialList.forEach(item=>{
if(item.materialType==1){ arr1.push(item.materialName) }
if(item.materialType==2){ arr2.push(item.materialName) }
})
this.dashesData.mainMaterialStr = arr1.join("、")
this.dashesData.subMaterialStr = arr2.join("、")
}else{
this.dashesData.mainMaterialStr = ""
this.dashesData.subMaterialStr = ""
}
this.$forceUpdate() this.$forceUpdate()
// this.$modal.msgError("") // this.$modal.msgError("")
} }
@ -296,15 +360,17 @@ page {
// background-color: #DD7D3C; // background-color: #DD7D3C;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
overflow-y: auto;
.nutrition-box-item{ .nutrition-box-item{
width: 28%; width: 30%;
margin: 0 2%; margin: 0 2%;
height: 100%; height: 100%;
text-align: center; text-align: center;
// background-color: #DD7D3C; // background-color: #DD7D3C;
view{ view{
margin-bottom: 10px; margin-bottom: 10px;
height: 20px;
} }
} }