参数修改
This commit is contained in:
parent
fde3f5461d
commit
3bd80f6972
|
|
@ -38,20 +38,12 @@ export function getMenudishesDetailAPI(data) {
|
|||
//菜品评价列表
|
||||
export function getMenuEvaluaorderAPI(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v1/applet/menuevaluaorder/page/meal',
|
||||
method: 'post',
|
||||
data
|
||||
url: '/smart-canteen/cook_evalua_detail/list',
|
||||
method: 'get',
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
//菜品评价数量
|
||||
export function getMenuEvaluaCountAPI(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v1/applet/menuevaluaorder/evaluate/count',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getMenudishesDetailAPI,getMenuEvaluaorderAPI,getMenuEvaluaCountAPI } from '../../api/week-menu/index'
|
||||
import { getMenudishesDetailAPI,getMenuEvaluaorderAPI } from '../../api/week-menu/index'
|
||||
import { getAdvanceDetailListAPI,addAdvancehoppingCartAPI,updateAdvancehoppingCartAPI,clearAdvancehoppingCartAPI,getShoppingCartListAPI } from '@/api/advanceOrder/index.js'
|
||||
import Tabs from '@/pages/components/Tabs.vue'
|
||||
|
||||
|
|
@ -272,8 +272,7 @@ export default {
|
|||
this.menuData = options
|
||||
this.newDate2 = this.menuData.orderDate
|
||||
this.getMenudishesDetail()
|
||||
// this.getMenuEvaluaorderList()
|
||||
// this.getMenuEvaluaCount()
|
||||
// this.getMenuEvaluaorderList()
|
||||
this.getMenuListData()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -314,19 +313,12 @@ export default {
|
|||
// }
|
||||
// console.log(res,'获取菜品详情')
|
||||
},
|
||||
async getMenuEvaluaCount() {
|
||||
let param = {
|
||||
"dishesId": this.menuData.baseDishesId,
|
||||
}
|
||||
const res = await getMenuEvaluaCountAPI(param)
|
||||
this.totalCount = res.totalCount
|
||||
},
|
||||
//获取菜品评价
|
||||
async getMenuEvaluaorderList(){
|
||||
let param = {
|
||||
// "current": 1,
|
||||
// "size": 10,
|
||||
"mealId": this.menuData.baseDishesId,
|
||||
"mealId": this.menuData.dishesId,
|
||||
// "mealId": "383143288183459840",
|
||||
"shopstallId": this.menuData.stallId,
|
||||
// "shopstallId": "379082300370980864",
|
||||
|
|
@ -335,7 +327,8 @@ export default {
|
|||
}
|
||||
const res = await getMenuEvaluaorderAPI(param)
|
||||
if(res.code==200){
|
||||
this.evaluaList = res.data.evaluaList||[]
|
||||
this.evaluaList = res.rows||[]
|
||||
this.totalCount = res.total
|
||||
}
|
||||
},
|
||||
goAllEvaluate(){
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<script>
|
||||
|
||||
import Tabs from '@/pages/components/Tabs.vue'
|
||||
import { getMenuEvaluaorderAPI,getMenuEvaluaCountAPI } from '../../api/week-menu/index'
|
||||
import { getMenuEvaluaorderAPI } from '../../api/week-menu/index'
|
||||
import { getDate } from '../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/util'
|
||||
export default {
|
||||
components: { Tabs },
|
||||
|
|
@ -69,8 +69,7 @@ export default {
|
|||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.menuData = JSON.parse(options.params)
|
||||
this.getMenuEvaluaCount()
|
||||
this.menuData = JSON.parse(options.params)
|
||||
this.getMenuEvaluaorderList()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -80,30 +79,18 @@ export default {
|
|||
this.tabIndex = index+1;
|
||||
this.getMenuEvaluaorderList()
|
||||
},
|
||||
async getMenuEvaluaCount() {
|
||||
let param = {
|
||||
"dishesId": this.menuData.baseDishesId,
|
||||
}
|
||||
const res = await getMenuEvaluaCountAPI(param)
|
||||
console.log(res)
|
||||
this.tabList[0] = "全部"+res.totalCount;
|
||||
this.tabList[1] = "有图"+res.imageCount;
|
||||
this.tabList[2] = "最新";
|
||||
this.$refs.tabs.$forceUpdate()
|
||||
|
||||
},
|
||||
async getMenuEvaluaorderList() {
|
||||
let param = {
|
||||
// "current": 1,
|
||||
// "size": 10,
|
||||
"mealId": this.menuData.baseDishesId,
|
||||
"mealId": this.menuData.dishesId,
|
||||
"shopstallId": this.menuData.stallId,
|
||||
"searchType": this.tabIndex+"",
|
||||
"mealType": "1"
|
||||
}
|
||||
const res = await getMenuEvaluaorderAPI(param)
|
||||
console.log(res)
|
||||
this.evaluaList = res.data.evaluaList
|
||||
this.evaluaList = res.rows
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 翻页
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
|
||||
<view>
|
||||
<view class="image-box">
|
||||
<image style="width: 100%;height: 100%;" :src="dashesData.imageUrl"></image>
|
||||
<image style="width: 100%;height: 100%;" :src="dashesData.dishesImgUrl"></image>
|
||||
<!-- <image style="width: 100%;height: 100%;" src="../../static/images/code.png"></image> -->
|
||||
</view>
|
||||
<view class="menuContent">
|
||||
|
|
@ -53,77 +53,32 @@
|
|||
<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>{{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>{{dashesData.dishesDetailList[0].nutritionInfo.calories||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.protein||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.fat||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.carbohydrate||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.dietaryFiber||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.cholesterol||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.carotene||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.calcium||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.sodium||'-'}}</view>
|
||||
</view>
|
||||
<view class="nutrition-box-item">
|
||||
<view>NRV%</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>{{dashesData.dishesDetailList[0].nutritionInfo.caloriesNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.proteinNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.fatNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.carbohydrateNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.dietaryFiberNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.cholesterolNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.caroteneNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.calciumNrv||'-'}}</view>
|
||||
<view>{{dashesData.dishesDetailList[0].nutritionInfo.sodiumNrv||'-'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="evaluate-box" v-if="hIndex==2">
|
||||
|
|
@ -169,7 +124,7 @@
|
|||
|
||||
<script>
|
||||
|
||||
import { getMenudishesDetailAPI,addCollectionDishesAPI,delCollectionDishesAPI,getMenuEvaluaorderAPI,getMenuEvaluaCountAPI } from '../../api/week-menu/index'
|
||||
import { getMenudishesDetailAPI,addCollectionDishesAPI,delCollectionDishesAPI,getMenuEvaluaorderAPI } from '../../api/week-menu/index'
|
||||
import Tabs from '@/pages/components/Tabs.vue'
|
||||
export default {
|
||||
components: { Tabs },
|
||||
|
|
@ -190,22 +145,22 @@ export default {
|
|||
this.menuData.stallId=options.stallId
|
||||
this.getMenudishesDetail()
|
||||
console.log(this.menuData)
|
||||
// this.getMenuEvaluaorderList()
|
||||
// this.getMenuEvaluaCount()
|
||||
this.getMenuEvaluaorderList()
|
||||
|
||||
},
|
||||
methods: {
|
||||
//获取菜品详情
|
||||
async getMenudishesDetail(){
|
||||
let param = {
|
||||
"userId": uni.getStorageSync('userId') ,
|
||||
"detailId": this.menuData.recipeDetailId,
|
||||
"baseDishesId": this.menuData.baseDishesId,
|
||||
// "delFlag": 2
|
||||
}
|
||||
const res = await getMenudishesDetailAPI(param)
|
||||
if(res.code==200){
|
||||
this.dashesData = res.data;
|
||||
// let param = {
|
||||
// "userId": uni.getStorageSync('userId') ,
|
||||
// "detailId": this.menuData.recipeDetailId,
|
||||
// "baseDishesId": this.menuData.baseDishesId,
|
||||
// // "delFlag": 2
|
||||
// }
|
||||
// const res = await getMenudishesDetailAPI(param)
|
||||
// if(res.code==200){
|
||||
// this.dashesData = res.data;
|
||||
this.dashesData = this.menuData;
|
||||
if(this.dashesData.materialList&&this.dashesData.materialList.length>0){
|
||||
let arr1=[]
|
||||
let arr2=[]
|
||||
|
|
@ -221,24 +176,16 @@ export default {
|
|||
}
|
||||
this.$forceUpdate()
|
||||
// this.$modal.msgError("收藏成功")
|
||||
}
|
||||
console.log(res)
|
||||
},
|
||||
async getMenuEvaluaCount() {
|
||||
let param = {
|
||||
"dishesId": this.menuData.baseDishesId,
|
||||
}
|
||||
const res = await getMenuEvaluaCountAPI(param)
|
||||
console.log(res)
|
||||
this.totalCount = res.totalCount
|
||||
},
|
||||
// }
|
||||
// console.log(res)
|
||||
},
|
||||
//获取菜品评价
|
||||
async getMenuEvaluaorderList(){
|
||||
console.log(this.menuData)
|
||||
let param = {
|
||||
"current": 1,
|
||||
"size": 10,
|
||||
"mealId": this.menuData.baseDishesId,
|
||||
"mealId": this.menuData.dishesId,
|
||||
// "mealId": "383143288183459840",
|
||||
"shopstallId": this.menuData.stallId,
|
||||
// "shopstallId": "379082300370980864",
|
||||
|
|
@ -247,7 +194,8 @@ export default {
|
|||
}
|
||||
const res = await getMenuEvaluaorderAPI(param)
|
||||
if(res.code==200){
|
||||
this.evaluaList = res.data.evaluaList||[]
|
||||
this.evaluaList = res.rows||[]
|
||||
this.totalCount = res.total
|
||||
}
|
||||
console.log(res)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue