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
+ })