guhongwei 2 年之前
父節點
當前提交
df2b25d01d
共有 1 個文件被更改,包括 10 次插入5 次删除
  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'
 								})
 							}