zs 2 سال پیش
والد
کامیت
36584d34f5
1فایلهای تغییر یافته به همراه25 افزوده شده و 17 حذف شده
  1. 25 17
      pagesMy/order/after.vue

+ 25 - 17
pagesMy/order/after.vue

@@ -262,24 +262,32 @@
 			// 确认收货
 			async toConfirm(item) {
 				const that = this;
-				item.transport.customer_receive = true;
-				const arr = await that.$api(`/afterSale/${item.id}`, 'POST', {
-					transport: item.transport
+				uni.showModal({
+					title: '提示',
+					content: '是否确认收货?',
+					success: async function(res) {
+						if (res.confirm) {
+							item.transport.customer_receive = true;
+							const arr = await that.$api(`/afterSale/${item.id}`, 'POST', {
+								transport: item.transport
+							});
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: `确认收货成功`,
+									icon: 'success',
+								});
+								uni.navigateBack({
+									detail: 1
+								})
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none',
+								})
+							}
+						}
+					}
 				});
-				if (arr.errcode == '0') {
-					uni.showToast({
-						title: `确认收货成功`,
-						icon: 'success',
-					});
-					uni.navigateBack({
-						detail: 1
-					})
-				} else {
-					uni.showToast({
-						title: arr.errmsg,
-						icon: 'none',
-					})
-				}
 			},
 			// 查看物流
 			toLogi(e) {