测试问题修改
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',
|
// 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',//董高文
|
||||||
|
|
|
||||||
|
|
@ -37,22 +37,26 @@
|
||||||
</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">
|
||||||
|
|
@ -63,30 +67,77 @@
|
||||||
<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)
|
||||||
|
|
|
||||||
|
|
@ -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() {
|
||||||
|
|
||||||
|
setTimeout(()=>{
|
||||||
//获取预定日期
|
//获取预定日期
|
||||||
this.getReserveDate()
|
this.getReserveDate()
|
||||||
setTimeout(()=>{
|
|
||||||
//获取预定餐菜谱
|
|
||||||
this.getMenuListData()
|
|
||||||
},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()
|
||||||
},
|
},
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
|
|
@ -449,29 +450,35 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
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) {
|
||||||
|
if(!this.isHandle){
|
||||||
food.quantity--
|
food.quantity--
|
||||||
this.delShopCart(food)
|
this.delShopCart(food)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (food.quantity < food.restrictNum) {
|
if (food.quantity < food.restrictNum) {
|
||||||
|
if(!this.isHandle){
|
||||||
this.addShopCart(food)
|
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'),
|
||||||
|
|
|
||||||
|
|
@ -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,7 +122,8 @@ export default {
|
||||||
walletBal: 0 ,// 钱包余额
|
walletBal: 0 ,// 钱包余额
|
||||||
messageNumber:0,//未读通知数量
|
messageNumber:0,//未读通知数量
|
||||||
showNotice:false,
|
showNotice:false,
|
||||||
noticeData:{}
|
noticeData:{},
|
||||||
|
AppTitle:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
@ -130,6 +131,7 @@ export default {
|
||||||
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');
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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(() => { })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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){
|
||||||
|
|
|
||||||
|
|
@ -23,22 +23,26 @@
|
||||||
</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">
|
||||||
|
|
@ -49,30 +53,77 @@
|
||||||
<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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue