|
@@ -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'
|
|
|
})
|
|
|
}
|