From 605acbe2b9504f133c87029be434c277bb8ff7e4 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 8 May 2024 14:50:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BC=98=E5=8C=96,=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/order.js | 5 + components/addressPopup.vue | 34 ++++--- components/shopListPopup.vue | 15 ++- config/app.js | 2 +- pages/cart/cart.vue | 4 +- pages/my/my.vue | 10 +- pagesOrder/detail/detail.vue | 145 ++++++++++++++++++++++++---- pagesOrder/order/component/good.vue | 10 +- pagesOrder/order/order.vue | 60 +++++++++--- pagesOrder/settle/settle.vue | 49 ++++++---- store/user.js | 2 +- 11 files changed, 261 insertions(+), 75 deletions(-) diff --git a/api/order.js b/api/order.js index f227e97..024dbe0 100644 --- a/api/order.js +++ b/api/order.js @@ -28,4 +28,9 @@ export const orderCountApi = (data)=>{ //取消订单 export const cancelOrderApi = (data)=>{ return request.post('/order/RetailOrder/cancel_order', data); +} + +//订单确认收货 +export const confirmReceiptApi = (data)=>{ + return request.post('/order/RetailOrder/confirm_receipt', data); } \ No newline at end of file diff --git a/components/addressPopup.vue b/components/addressPopup.vue index 036dffb..da9134d 100644 --- a/components/addressPopup.vue +++ b/components/addressPopup.vue @@ -5,21 +5,24 @@ 常用地址 - 管理 - 新增 + 管理 + 新增 - + {{item.real_name}} {{item.phone}} - + {{item.detail}} - + @@ -40,8 +43,8 @@ }, list: { type: Array, - default: ()=>[] - } + default: () => [] + }, }) const emit = defineEmits(['close', 'change']); @@ -50,14 +53,23 @@ } const submitAddress = () => { - emit('change', props.list[addressType.value]); + let e = props.list.find(item=>item.address_id==addressType.value); + if(addressType.value<=0 || !e) return uni.$u.toast('请选择地址'); + emit('change', e); } - - const navTo = (url)=>{ + + const navTo = (url) => { uni.navigateTo({ url: url }) } + + const setCheck = (e)=>{ + addressType.value = e; + } + defineExpose({ + setCheck + })