From 652e4da57a95175c485ad541695300f0f220b68b Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Tue, 24 Jun 2025 13:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/mine/index.js | 4 +- pages/advanceOrder/index.vue | 13 ++----- pages/advanceOrder/orderDetails.vue | 17 ++++++--- pages/mine/me/carteenCard.vue | 7 +++- pages/review/index.vue | 2 +- pages/work/evaluate.vue | 57 ++++++++++++++--------------- 6 files changed, 50 insertions(+), 50 deletions(-) diff --git a/api/mine/index.js b/api/mine/index.js index 2dbdcd2..2095876 100644 --- a/api/mine/index.js +++ b/api/mine/index.js @@ -130,7 +130,7 @@ export function cancelLossCardApi(data) { //获取食堂列表 export function getAllCanteenStallApi(data) { return request({ - url: '/smart-canteen/basic_canteen/list', + url: '/smart-canteen/basic_canteen/listAll', method: 'get', params:data }) @@ -138,7 +138,7 @@ export function getAllCanteenStallApi(data) { //通过食堂查询档口 export function getStallByCanteenApi(data) { return request({ - url: '/smart-canteen/basic_stall/list', + url: '/smart-canteen/basic_stall/listAll', method: 'get', params:data }) diff --git a/pages/advanceOrder/index.vue b/pages/advanceOrder/index.vue index fc9c9b7..1a04003 100644 --- a/pages/advanceOrder/index.vue +++ b/pages/advanceOrder/index.vue @@ -226,24 +226,19 @@ export default { this.stallId=options.stallId; this.stallName=options.stallName; this.recipeId=options.recipeId; + this.getReserveDate() }, onShow() { - setTimeout(()=>{ + this.tIndex=0 //获取预定日期 - this.getReserveDate() + this.getShoppingCartList() },200) }, + methods: { //获取预定日期 async getReserveDate(){ - // 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() //获取预定餐菜谱 diff --git a/pages/advanceOrder/orderDetails.vue b/pages/advanceOrder/orderDetails.vue index c5925fe..063e36e 100644 --- a/pages/advanceOrder/orderDetails.vue +++ b/pages/advanceOrder/orderDetails.vue @@ -105,6 +105,7 @@ export default { totalPrice:0, orderDate:"", shoppingCartList:[], + shoppingCartList2:[], // 详情页数据 detailData: { // 订单状态 @@ -149,6 +150,7 @@ export default { this.totalPrice = Number(options.totalPrice).toFixed(2) this.orderDate = options.orderDate; this.shoppingCartList=JSON.parse(options.carList) + this.shoppingCartList2=JSON.parse(options.carList) console.log(this.shoppingCartList) // this.getListElectronMobileUsable() }, @@ -185,11 +187,10 @@ export default { if(!this.sumbitStatus){ this.sumbitStatus = true let mealtimeTypeList = [];//餐次数组 - let orderList = [] - console.log(this.shoppingCartList) + let orderList = [] + // console.log(this.shoppingCartList) this.shoppingCartList.forEach(item=>{ let index = mealtimeTypeList.findIndex(v=>v==item.mealtimeType) - console.log(index) if(index<0){//不存在 mealtimeTypeList.push(item.mealtimeType) let obj = { @@ -206,10 +207,13 @@ export default { orderList.push(obj) }else{ let index2 = orderList.findIndex(v=>v.mealtimeType==item.mealtimeType) - orderList[index2].orderDetailList.push(item.orderDetailList[0]) + let index3 = orderList[index2].orderDetailList.findIndex(v=>v.cartId==item.orderDetailList[0].cartId) + if(index3<0){ + orderList[index2].orderDetailList.push(item.orderDetailList[0]) + } } }) - console.log(orderList) + // console.log(orderList) let param={ "realAmount": this.totalPrice*100, "payableAmount": this.totalPrice*100, @@ -238,7 +242,8 @@ export default { },1000) } }).catch(()=>{ - this.sumbitStatus = false + this.sumbitStatus = false; + // this.$set(this,'shoppingCartList',this.shoppingCartList2) }) } }, diff --git a/pages/mine/me/carteenCard.vue b/pages/mine/me/carteenCard.vue index be4e852..744abae 100644 --- a/pages/mine/me/carteenCard.vue +++ b/pages/mine/me/carteenCard.vue @@ -24,19 +24,22 @@ 卡状态 正常 已挂失 + 已发卡 + 已退卡 + 已过期 卡物理号 {{item.serialNum}} - + - - - + + + + @@ -240,15 +236,17 @@ export default {