测试问题修改
This commit is contained in:
parent
3b20cadbde
commit
6a6f18c263
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ module.exports = {
|
|||
// baseUrl: 'http://192.168.0.39:21995',
|
||||
// #ifdef H5
|
||||
// baseUrl: '/canteen/dev-api',
|
||||
// baseUrl: '/dev-api',
|
||||
baseUrl: '/dev-api',
|
||||
// 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.2.82:58080',//张天强
|
||||
// baseUrl: 'http://192.168.2.69:58080',//董高文
|
||||
|
|
|
|||
|
|
@ -37,56 +37,107 @@
|
|||
</view>
|
||||
<view class="tab-content">
|
||||
<view class="info-box" v-if="hIndex==0">
|
||||
<view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">菜品简介</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
||||
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||
<text style="color: #959FA4;margin-right: 20px;">菜品简介</text>
|
||||
<text style="word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
||||
</view>
|
||||
<view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">主料</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
||||
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||
<text style="color: #959FA4;margin-right: 20px;">主料</text>
|
||||
<text>
|
||||
{{dashesData.mainMaterialStr||'-'}}
|
||||
</text>
|
||||
</view>
|
||||
<view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">辅料</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
||||
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||
<text style="color: #959FA4;margin-right: 20px;">辅料</text>
|
||||
<text>
|
||||
{{dashesData.subMaterialStr||'-'}}
|
||||
</text>
|
||||
</view>
|
||||
<view style="margin-bottom: 20px;">
|
||||
<!-- <view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">口味</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="nutrition-box" v-if="hIndex==1">
|
||||
<view class="nutrition-box-item">
|
||||
<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 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>{{dashesData.dishesDetailList[0].calories||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].protein||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].fat||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].carbohydrate||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].dietaryFiber||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].cholesterol||'-'}}</view>
|
||||
<!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</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 class="nutrition-box-item">
|
||||
<view>NRV%</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>{{dashesData.dishesDetailList[0].caloriesNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].proteinNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].fatNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].carbohydrateNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].dietaryFiberNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].cholesterolNrv||'-'}}</view>
|
||||
<!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</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 class="evaluate-box" v-if="hIndex==2">
|
||||
|
|
@ -282,6 +333,19 @@ export default {
|
|||
const res = await getMenudishesDetailAPI(param)
|
||||
if(res.code==200){
|
||||
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, 'monthlySales', this.dashesData.dishesDetailList[0].monthlySales)
|
||||
this.$set(this.dashesData, 'goodProbability', this.dashesData.dishesDetailList[0].goodProbability)
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ export default {
|
|||
active: 1, // 1 自取 2 外卖
|
||||
// canteenName: '宏源工业园/本周菜谱',
|
||||
canteenType: '自取', // 1 自取 2 外卖
|
||||
isHandle:false
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -227,11 +228,10 @@ export default {
|
|||
this.recipeId=options.recipeId;
|
||||
},
|
||||
onShow() {
|
||||
//获取预定日期
|
||||
this.getReserveDate()
|
||||
|
||||
setTimeout(()=>{
|
||||
//获取预定餐菜谱
|
||||
this.getMenuListData()
|
||||
//获取预定日期
|
||||
this.getReserveDate()
|
||||
},200)
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -244,6 +244,7 @@ export default {
|
|||
const res = await getlistReserveDateAPI(param)
|
||||
this.getNowFormatDate(res.data[0])
|
||||
this.getNowFormatDate2(res.data[0])
|
||||
//获取预定餐菜谱
|
||||
this.getMenuListData()
|
||||
},
|
||||
// 获取当前时间
|
||||
|
|
@ -269,7 +270,7 @@ export default {
|
|||
async getMenuListData() {
|
||||
let param = {
|
||||
"recipeId":this.recipeId,
|
||||
"applyDate":this.newDate2,
|
||||
"applyDate":this.newDate2,
|
||||
// "applyDate":"2025-04-18",
|
||||
}
|
||||
const res = await getAdvanceDetailListAPI(param)
|
||||
|
|
@ -443,35 +444,41 @@ export default {
|
|||
}
|
||||
console.log(cartItem)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
console.log(this.shoppingCartList)
|
||||
this.isHandle = false
|
||||
//计算总价
|
||||
this.handleTotalPrice()
|
||||
}else{
|
||||
this.isHandle = false
|
||||
this.shoppingCartList = []
|
||||
}
|
||||
},
|
||||
//菜谱加减操作
|
||||
handleFoodNum(type, food) {
|
||||
console.log(food)
|
||||
handleFoodNum(type, food) {
|
||||
if (type === 1) {
|
||||
if (food.quantity > 0) {
|
||||
food.quantity--
|
||||
this.delShopCart(food)
|
||||
if(!this.isHandle){
|
||||
food.quantity--
|
||||
this.delShopCart(food)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (food.quantity < food.restrictNum) {
|
||||
this.addShopCart(food)
|
||||
if(!this.isHandle){
|
||||
this.addShopCart(food)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async addShopCart(item){
|
||||
console.log('?? ~ handleFoodNum ~ type', "新增")
|
||||
console.log(item)
|
||||
this.isHandle = true
|
||||
let param = {
|
||||
"userId":uni.getStorageSync('userId'),
|
||||
"orderType": 2,
|
||||
|
|
@ -504,6 +511,7 @@ export default {
|
|||
async delShopCart(item){
|
||||
console.log('?? ~ handleFoodNum ~ type', "减少")
|
||||
console.log(item)
|
||||
this.isHandle = true
|
||||
if(item.quantity>0){
|
||||
let param = {
|
||||
"userId":uni.getStorageSync('userId'),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
>
|
||||
</u-navbar> -->
|
||||
<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">
|
||||
<image src="/static/images/index/switch.png" style="width: 38rpx;height: 38rpx;margin-right: 10rpx;" mode="aspectFit"></image>
|
||||
<text>关怀版</text>
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
</template>
|
||||
|
||||
<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'
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -122,14 +122,16 @@ export default {
|
|||
walletBal: 0 ,// 钱包余额
|
||||
messageNumber:0,//未读通知数量
|
||||
showNotice:false,
|
||||
noticeData:{}
|
||||
noticeData:{},
|
||||
AppTitle:''
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo()
|
||||
this.getCarouselImageList()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad() {
|
||||
this.getBaseSettingByKey()
|
||||
// this.getUnReadNoticeNum()
|
||||
// this.timer = setInterval(() => {
|
||||
// this.getWalletBalanceData()
|
||||
|
|
@ -141,9 +143,9 @@ export default {
|
|||
// uni.navigateBack()
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: '/pages/system' })
|
||||
},
|
||||
// leftClick() {
|
||||
// uni.navigateTo({ url: '/pages/system' })
|
||||
// },
|
||||
/* 关怀版 */
|
||||
onChangeSize() {
|
||||
if(this.fontValue==8){
|
||||
|
|
@ -234,8 +236,9 @@ export default {
|
|||
// 获取轮播图
|
||||
async getCarouselImageList() {
|
||||
let param = {
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 100,
|
||||
"isEnabled":'0',
|
||||
"pageNum": 1,
|
||||
"pageSize": 100,
|
||||
}
|
||||
const { rows: res } = await getCarouselImageListApi(param)
|
||||
this.bannerList = []
|
||||
|
|
@ -244,6 +247,17 @@ export default {
|
|||
})
|
||||
console.log(this.bannerList)
|
||||
},
|
||||
|
||||
async getBaseSettingByKey() {
|
||||
let param = {
|
||||
"key":'首页标题',
|
||||
}
|
||||
const { data: res } = await getBaseSettingByKeyApi(param)
|
||||
this.AppTitle = res.value
|
||||
},
|
||||
|
||||
|
||||
|
||||
open() {
|
||||
// console.log('open');
|
||||
},
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export default {
|
|||
if(this.loginForm.username&&this.loginForm.password){
|
||||
this.loginForm.encryptPassword = AES.encrypt(this.loginForm.password)
|
||||
this.$store.dispatch('Login', this.loginForm).then(() => {
|
||||
this.$tab.reLaunch('/pages/system')
|
||||
this.$tab.reLaunch('/pages/index')
|
||||
}).catch(() => { })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<!-- 提示信息 -->
|
||||
<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>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||
<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>
|
||||
<view class="content">
|
||||
<text class="title">本周菜谱</text>
|
||||
<text class="sub-title">食堂:{{ item.canteenName }}</text>
|
||||
<text class="sub-title">档口:{{ item.stallName }}</text>
|
||||
<text class="sub-title">食堂:{{ item.canteenName||'' }}</text>
|
||||
<text class="sub-title">档口:{{ item.stallName||'' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -47,7 +47,10 @@ export default {
|
|||
async getWeekCookbookData() {
|
||||
this.queryParams.userId = uni.getStorageSync('userId')
|
||||
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, '一周菜谱')
|
||||
},
|
||||
goMenuList(item){
|
||||
|
|
|
|||
|
|
@ -23,56 +23,107 @@
|
|||
</view>
|
||||
<view class="tab-content">
|
||||
<view class="info-box" v-if="hIndex==0">
|
||||
<view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">菜品简介</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
||||
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||
<text style="color: #959FA4;margin-right: 20px;">菜品简介</text>
|
||||
<text style="word-break: break-all;">{{dashesData.intro||'-'}}</text>
|
||||
</view>
|
||||
<view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">主料</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
||||
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||
<text style="color: #959FA4;margin-right: 20px;">主料</text>
|
||||
<text>
|
||||
{{dashesData.mainMaterialStr||'-'}}
|
||||
</text>
|
||||
</view>
|
||||
<view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">辅料</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
||||
<view style="margin-bottom: 20px;word-break: break-all;">
|
||||
<text style="color: #959FA4;margin-right: 20px;">辅料</text>
|
||||
<text>
|
||||
{{dashesData.subMaterialStr||'-'}}
|
||||
</text>
|
||||
</view>
|
||||
<view style="margin-bottom: 20px;">
|
||||
<!-- <view style="margin-bottom: 20px;">
|
||||
<text style="color: #959FA4;">口味</text>
|
||||
<text style="margin-left: 20px;word-break: break-all;">-</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="nutrition-box" v-if="hIndex==1">
|
||||
<view class="nutrition-box-item">
|
||||
<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 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>{{dashesData.dishesDetailList[0].calories||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].protein||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].fat||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].carbohydrate||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].dietaryFiber||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].cholesterol||'-'}}</view>
|
||||
<!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</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 class="nutrition-box-item">
|
||||
<view>NRV%</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>-</view>
|
||||
<view>{{dashesData.dishesDetailList[0].caloriesNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].proteinNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].fatNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].carbohydrateNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].dietaryFiberNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].cholesterolNrv||'-'}}</view>
|
||||
<!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</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 class="evaluate-box" v-if="hIndex==2">
|
||||
|
|
@ -154,6 +205,19 @@ export default {
|
|||
const res = await getMenudishesDetailAPI(param)
|
||||
if(res.code==200){
|
||||
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.$modal.msgError("收藏成功")
|
||||
}
|
||||
|
|
@ -296,15 +360,17 @@ page {
|
|||
// background-color: #DD7D3C;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow-y: auto;
|
||||
|
||||
.nutrition-box-item{
|
||||
width: 28%;
|
||||
width: 30%;
|
||||
margin: 0 2%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
// background-color: #DD7D3C;
|
||||
view{
|
||||
margin-bottom: 10px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue