diff --git a/api/advanceOrder/index.js b/api/advanceOrder/index.js index f99a4f7..4617db2 100644 --- a/api/advanceOrder/index.js +++ b/api/advanceOrder/index.js @@ -19,7 +19,7 @@ export function getCanteenListApi(data) { */ export function getAdvanceOrderStallApi(data) { return request({ - url: '/smart-canteen/menu_app_recipe/reserve/canteen/shopstall/list', + url: '/smart-canteen/cook/h5/list/reserve/canteen', method: 'get', params: data }) @@ -42,7 +42,7 @@ export function getlistReserveDateAPI(data) { */ export function getAdvanceDetailListAPI(data) { return request({ - url: '/smart-canteen/menu_app_recipe/reserve/recipe/detail', + url: '/smart-canteen/cook/h5/reserve/recipe/detail', method: 'post', data }) diff --git a/api/week-menu/index.js b/api/week-menu/index.js index 07921ec..259b1da 100644 --- a/api/week-menu/index.js +++ b/api/week-menu/index.js @@ -5,9 +5,9 @@ import request from '@/utils/request' */ export function getWeekCookbookAPI(data) { return request({ - url: '/smart-canteen/h5/menurecipe/list/week/canteen', - method: 'post', - data + url: '/smart-canteen/cook/h5/list/week/canteen', + method: 'get', + params:data }) } @@ -16,7 +16,7 @@ export function getWeekCookbookAPI(data) { */ export function getWeekDetailListAPI(data) { return request({ - url: '/smart-canteen/h5/menurecipe/week/recipe/detail', + url: '/smart-canteen/cook/h5/week/recipe/detail', method: 'get', params:data }) diff --git a/pages/advanceOrder/dishDetail.vue b/pages/advanceOrder/dishDetail.vue index 6035945..67ba066 100644 --- a/pages/advanceOrder/dishDetail.vue +++ b/pages/advanceOrder/dishDetail.vue @@ -11,7 +11,7 @@ ¥{{(menuData.dishesDetailList[0].prefPrice/100).toFixed(2)}} - + {{ dashesData.quantity || 0 }} - + @@ -232,8 +232,8 @@ {{ food.goodsName }}({{ food.mealtimeName }}) 月销 {{ food.monthlySales||0 }} - {{ '库存' + food.surplusNum }} - {{ '限购' + food.restrictNum }} + {{ '库存' + food.remanentNum }} + {{ '限购' + food.limitNum }} @@ -252,7 +252,7 @@ {{ food.quantity || 0 }} @@ -349,8 +349,8 @@ export default { 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) - this.$set(this.dashesData, 'surplusNum', this.dashesData.dishesDetailList[0].surplusNum) - this.$set(this.dashesData, 'restrictNum', this.dashesData.dishesDetailList[0].restrictNum) + this.$set(this.dashesData, 'remanentNum', this.dashesData.dishesDetailList[0].remanentNum) + this.$set(this.dashesData, 'limitNum', this.dashesData.dishesDetailList[0].limitNum) this.$set(this.dashesData, 'dishesPrice', this.dashesData.dishesDetailList[0].dishesPrice) this.$set(this.dashesData, 'prefPrice', this.dashesData.dishesDetailList[0].prefPrice) this.$set(this.dashesData, 'dishesId', this.dashesData.dishesDetailList[0].dishesId) @@ -409,8 +409,8 @@ export default { this.$set(food, 'quantity', 0) this.$set(food, 'monthlySales', food.dishesDetailList[0].monthlySales) this.$set(food, 'goodProbability', food.dishesDetailList[0].goodProbability) - this.$set(food, 'surplusNum', food.dishesDetailList[0].surplusNum) - this.$set(food, 'restrictNum', food.dishesDetailList[0].restrictNum) + this.$set(food, 'remanentNum', food.dishesDetailList[0].remanentNum) + this.$set(food, 'limitNum', food.dishesDetailList[0].limitNum) this.$set(food, 'dishesPrice', food.dishesDetailList[0].dishesPrice) this.$set(food, 'prefPrice', food.dishesDetailList[0].prefPrice) this.$set(food, 'dishesId', food.dishesDetailList[0].dishesId) @@ -457,8 +457,8 @@ export default { this.shoppingCartList = res.data; this.shoppingCartList.forEach(item => { item.isDfficacy = 0 - item.surplusNum = 0 - item.restrictNum = 0 + item.remanentNum = 0 + item.limitNum = 0 item.prefPrice = 0 item.monthlySales = 0 }) @@ -485,10 +485,10 @@ export default { "orderDate": cartItem.orderDate, "orderType": cartItem.orderType, "prefPrice": food.dishesDetailList[0].prefPrice, - "restrictNum": food.dishesDetailList[0].restrictNum, + "limitNum": food.dishesDetailList[0].limitNum, "shoppingCartId": cartItem.shoppingCartId, "sizeType": cartItem.sizeType, - "surplusNum": cartItem.surplusNum + "remanentNum": cartItem.remanentNum } this.$set(cartItem, 'orderDetailList', [obj]) this.$set(cartItem, 'mealtimeName', food.mealtimeName) @@ -497,8 +497,8 @@ export default { this.$set(cartItem, 'detailId', food.detailId) this.$set(cartItem, 'detailType', food.detailType) this.$set(cartItem, 'dishesId', food.dishesDetailList[0].dishesId) - this.$set(cartItem, 'surplusNum', food.dishesDetailList[0].surplusNum) - this.$set(cartItem, 'restrictNum', food.dishesDetailList[0].restrictNum) + this.$set(cartItem, 'remanentNum', food.dishesDetailList[0].remanentNum) + this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum) this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice) if(cartItem.orderDate == this.newDate2){//存在且时间一致 this.$set(food, 'quantity', cartItem.quantity) @@ -539,7 +539,7 @@ export default { } } } else { - if (food.quantity < food.restrictNum) { + if (food.quantity < food.limitNum) { if(!this.isHandle){ this.addShopCart(food) } diff --git a/pages/advanceOrder/index.vue b/pages/advanceOrder/index.vue index 969a3d6..278f99a 100644 --- a/pages/advanceOrder/index.vue +++ b/pages/advanceOrder/index.vue @@ -30,7 +30,7 @@ {{typeitem.typeName}} - + @@ -40,22 +40,22 @@ - {{ item.dishesName }} + {{ item.dishesName }} 月销 {{ item.monthlySales||0 }} 好评率{{ item.goodProbability||0 }}% - - {{ '库存' + item.surplusNum }} - {{ '限购' + item.restrictNum }} + + {{ '库存' + item.remanentNum }} + {{ '限购' + item.limitNum }} - + {{ (item.dishesDetailList[0].prefPrice/100).toFixed(2) }} ¥{{ (item.dishesDetailList[0].dishesPrice/100).toFixed(2) }} - + {{ item.quantity || 0 }} - + @@ -132,8 +132,8 @@ {{ food.goodsName }} ({{ food.mealtimeName }}) 月销 {{ food.monthlySales||0 }} - {{ '库存' + food.surplusNum }} - {{ '限购' + food.restrictNum }} + {{ '库存' + food.remanentNum }} + {{ '限购' + food.limitNum }} @@ -152,7 +152,7 @@ {{ food.quantity || 0 }} @@ -237,19 +237,22 @@ export default { methods: { //获取预定日期 async getReserveDate(){ - let param = { - "reserveLimitDayNum": "1", - "ifAllowReserveToday": "1" - } - const res = await getlistReserveDateAPI(param) - this.getNowFormatDate(res.data[0]) - this.getNowFormatDate2(res.data[0]) + // let param = { + // "reserveLimitDayNum": "1", + // "ifAllowReserveToday": "1" + // } + // const res = await getlistReserveDateAPI(param) + // this.getNowFormatDate(res.data[0]) + // this.getNowFormatDate2(res.data[0]) + this.getNowFormatDate() + this.getNowFormatDate2() //获取预定餐菜谱 this.getMenuListData() }, // 获取当前时间 getNowFormatDate(data) { - let date = new Date(data) + // let date = new Date(data) + let date = new Date() let year = date.getFullYear() let month = (date.getMonth() + 1).toString().padStart(2, '0') let day = date.getDate().toString().padStart(2, '0') @@ -259,7 +262,8 @@ export default { }, // 当前时间 2025-01-03 getNowFormatDate2(data) { - let date = new Date(data) + // let date = new Date(data) + let date = new Date() let year = date.getFullYear() let month = (date.getMonth() + 1).toString().padStart(2, '0') let day = date.getDate().toString().padStart(2, '0') @@ -286,8 +290,8 @@ export default { this.$set(food, 'quantity', 0) this.$set(food, 'monthlySales', food.dishesDetailList[0].monthlySales) this.$set(food, 'goodProbability', food.dishesDetailList[0].goodProbability) - this.$set(food, 'surplusNum', food.dishesDetailList[0].surplusNum) - this.$set(food, 'restrictNum', food.dishesDetailList[0].restrictNum) + this.$set(food, 'remanentNum', food.dishesDetailList[0].remanentNum) + this.$set(food, 'limitNum', food.dishesDetailList[0].limitNum) this.$set(food, 'dishesPrice', food.dishesDetailList[0].dishesPrice) this.$set(food, 'prefPrice', food.dishesDetailList[0].prefPrice) this.$set(food, 'dishesId', food.dishesDetailList[0].dishesId) @@ -389,8 +393,8 @@ export default { // console.log(this.shoppingCartList) this.shoppingCartList.forEach(item => { item.isDfficacy = 0 - item.surplusNum = 0 - item.restrictNum = 0 + item.remanentNum = 0 + item.limitNum = 0 item.prefPrice = 0 item.monthlySales = 0 }) @@ -420,10 +424,10 @@ export default { "orderDate": cartItem.orderDate, "orderType": cartItem.orderType, "prefPrice": food.dishesDetailList[0].prefPrice, - "restrictNum": food.dishesDetailList[0].restrictNum, + "limitNum": food.dishesDetailList[0].limitNum, "shoppingCartId": cartItem.shoppingCartId, "sizeType": cartItem.sizeType, - "surplusNum": cartItem.surplusNum + "remanentNum": cartItem.remanentNum } this.$set(cartItem, 'orderDetailList', [obj]) this.$set(cartItem, 'mealtimeName', food.mealtimeName) @@ -432,8 +436,8 @@ export default { this.$set(cartItem, 'detailId', food.detailId) this.$set(cartItem, 'detailType', food.detailType) this.$set(cartItem, 'dishesId', food.dishesDetailList[0].dishesId) - this.$set(cartItem, 'surplusNum', food.dishesDetailList[0].surplusNum) - this.$set(cartItem, 'restrictNum', food.dishesDetailList[0].restrictNum) + this.$set(cartItem, 'remanentNum', food.dishesDetailList[0].remanentNum) + this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum) this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice) if(cartItem.orderDate == this.newDate2){//存在且时间一致 this.$set(food, 'quantity', cartItem.quantity) @@ -468,7 +472,7 @@ export default { } } } else { - if (food.quantity < food.restrictNum) { + if (food.quantity < food.limitNum) { if(!this.isHandle){ this.addShopCart(food) } diff --git a/pages/feedback/history.vue b/pages/feedback/history.vue index a036935..44dfe01 100644 --- a/pages/feedback/history.vue +++ b/pages/feedback/history.vue @@ -14,11 +14,10 @@ {{item.createBy}} {{ item.content }} - - - - - + + + + {{ item.createTime }} diff --git a/pages/feedback/index.vue b/pages/feedback/index.vue index 943e1d4..7fadba5 100644 --- a/pages/feedback/index.vue +++ b/pages/feedback/index.vue @@ -53,7 +53,7 @@ :fileList="fileList" @afterRead="afterRead" @delete="deletePic" - :maxCount="1" + :maxCount="5" multiple > @@ -167,12 +167,15 @@ export default { } let arr = [] this.fileList.forEach(item=>{ - arr.push(item.url) + let obj = { + imgUrl:item.url + } + arr.push(obj) }) let param = { "canteenId": this.canteenId, "canteenName": this.canteenName, - "complaintPicture": arr[0], + "suggestionPictures": arr, "content": this.content, "contactTel": this.contactInfo, "userId": uni.getStorageSync('userId') diff --git a/pages/weeklyMenu/menuDetail.vue b/pages/weeklyMenu/menuDetail.vue index 466c6d5..8b7ec25 100644 --- a/pages/weeklyMenu/menuDetail.vue +++ b/pages/weeklyMenu/menuDetail.vue @@ -189,6 +189,7 @@ export default { this.menuData = JSON.parse(options.params) this.menuData.stallId=options.stallId this.getMenudishesDetail() + console.log(this.menuData) // this.getMenuEvaluaorderList() // this.getMenuEvaluaCount() @@ -246,9 +247,7 @@ export default { } const res = await getMenuEvaluaorderAPI(param) if(res.code==200){ - this.evaluaList = res.data.evaluaList||[] - // this.dashesData = res.data; - // this.$forceUpdate() + this.evaluaList = res.data.evaluaList||[] } console.log(res) }, diff --git a/pages/weeklyMenu/menuList.vue b/pages/weeklyMenu/menuList.vue index 2832d57..fe28f6c 100644 --- a/pages/weeklyMenu/menuList.vue +++ b/pages/weeklyMenu/menuList.vue @@ -108,7 +108,7 @@ export default { async getMenuListData() { let param = { "recipeId":this.recipeId, - "applyDate":this.daysList[this.hIndex].data, + "date":this.daysList[this.hIndex].data, } const res = await getWeekDetailListAPI(param) console.log(res, '周菜谱')