guhongwei 2 år sedan
förälder
incheckning
df2b25d01d
1 ändrade filer med 10 tillägg och 5 borttagningar
  1. 10 5
      pagesMy/order/index.vue

+ 10 - 5
pagesMy/order/index.vue

@@ -315,7 +315,7 @@
 							});
 							if (arr.errcode == '0') {
 								uni.showToast({
-									title: '取消订单成',
+									title: '申请取消订单成',
 									icon: 'none'
 								})
 								that.clearPage();
@@ -398,15 +398,20 @@
 					content: '确定取消订单吗?',
 					success: async function(res) {
 						if (res.confirm) {
-							let arr = that.$api(`/afterSale`, 'POST', {
+							let arr = await that.$api(`/afterSale`, 'POST', {
 								order_detail: e._id,
 								type: '4'
 							})
-							if (res.errcode == '0') {
-								console.log(res);
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '申请取消订单完成',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
 							} else {
 								uni.showToast({
-									title: res.errmsg,
+									title: arr.errmsg,
 									icon: 'none'
 								})
 							}