|
@@ -181,7 +181,8 @@
|
|
|
},
|
|
|
onLoad: function(e) {
|
|
|
const that = this;
|
|
|
- that.$set(that, `status`, e.status || '0');
|
|
|
+ that.$set(that, `status`, e.status || '');
|
|
|
+ that.$set(that.tabs, `active`, e.status || '');
|
|
|
that.searchConfig();
|
|
|
that.searchOther();
|
|
|
that.watchlogin();
|
|
@@ -250,6 +251,7 @@
|
|
|
for (let val of list) {
|
|
|
val.zhStatus = that.searchStatus(val.status)
|
|
|
}
|
|
|
+ console.log(list);
|
|
|
that.$set(that, `list`, list);
|
|
|
that.$set(that, `total`, res.total)
|
|
|
} else {
|
|
@@ -315,7 +317,7 @@
|
|
|
});
|
|
|
if (arr.errcode == '0') {
|
|
|
uni.showToast({
|
|
|
- title: '取消订单成功',
|
|
|
+ title: '申请取消订单完成',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
that.clearPage();
|
|
@@ -398,15 +400,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'
|
|
|
})
|
|
|
}
|