修改取消订单报错的问题
This commit is contained in:
@ -542,15 +542,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
goBack() {
|
goBack() {
|
||||||
if (last.name === "MyOrder") return this.$yrouter.back();
|
if (this.name === "MyOrder") {
|
||||||
else
|
this.$yrouter.back();
|
||||||
return this.$yrouter.replace({
|
return;
|
||||||
path: "/order/list/"
|
} else {
|
||||||
|
console.log(this)
|
||||||
|
this.$yrouter.replace({
|
||||||
|
path: "/pages/order/MyOrder/index"
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cancelOrder() {
|
cancelOrder() {
|
||||||
cancelOrderHandle(this.orderInfo.orderId)
|
cancelOrderHandle(this.orderInfo.orderId)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
setTimeout(() => this.goBack(), 300);
|
setTimeout(() => this.goBack(), 300);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
@ -161,7 +161,10 @@ export default {
|
|||||||
},
|
},
|
||||||
animationDuration: 2000
|
animationDuration: 2000
|
||||||
},
|
},
|
||||||
value: [[year, month, day - 1], [year, month, day]],
|
value: [
|
||||||
|
[year, month, day - 1],
|
||||||
|
[year, month, day]
|
||||||
|
],
|
||||||
isrange: true,
|
isrange: true,
|
||||||
weekSwitch: false,
|
weekSwitch: false,
|
||||||
ismulti: false,
|
ismulti: false,
|
||||||
@ -242,7 +245,7 @@ export default {
|
|||||||
title: error.msg,
|
title: error.msg,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});;
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -285,7 +288,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickSomeThing(data) {
|
clickSomeThing(data) {
|
||||||
this.value = [[2019, 4, 1], [2019, 4, 8]];
|
this.value = [
|
||||||
|
[2019, 4, 1],
|
||||||
|
[2019, 4, 8]
|
||||||
|
];
|
||||||
},
|
},
|
||||||
setMonthRange() {
|
setMonthRange() {
|
||||||
this.monthRange = this.monthRange.length ? [] : ["2019-4", "2020-1"];
|
this.monthRange = this.monthRange.length ? [] : ["2019-4", "2020-1"];
|
||||||
@ -316,14 +322,20 @@ export default {
|
|||||||
multiMode() {
|
multiMode() {
|
||||||
this.ismulti = true;
|
this.ismulti = true;
|
||||||
this.isrange = false;
|
this.isrange = false;
|
||||||
this.value = [[year, month, 16], [year, month, 18]];
|
this.value = [
|
||||||
|
[year, month, 16],
|
||||||
|
[year, month, 18]
|
||||||
|
];
|
||||||
this.handelRenderValues();
|
this.handelRenderValues();
|
||||||
// this.$refs.calendar.renderer(year, month);
|
// this.$refs.calendar.renderer(year, month);
|
||||||
},
|
},
|
||||||
rangeMode() {
|
rangeMode() {
|
||||||
this.ismulti = false;
|
this.ismulti = false;
|
||||||
this.isrange = true;
|
this.isrange = true;
|
||||||
this.value = [[year, month, 16], [year, month, 22]];
|
this.value = [
|
||||||
|
[year, month, 16],
|
||||||
|
[year, month, 22]
|
||||||
|
];
|
||||||
this.handelRenderValues();
|
this.handelRenderValues();
|
||||||
// this.$refs.calendar.renderer(year, month);
|
// this.$refs.calendar.renderer(year, month);
|
||||||
},
|
},
|
||||||
@ -334,14 +346,10 @@ export default {
|
|||||||
this.handelRenderValues();
|
this.handelRenderValues();
|
||||||
// this.$refs.calendar.renderer(year, month);
|
// this.$refs.calendar.renderer(year, month);
|
||||||
},
|
},
|
||||||
selectMonth(month, year) {
|
selectMonth(month, year) {},
|
||||||
},
|
prev(y, m, w) {},
|
||||||
prev(y, m, w) {
|
next(year, month, week) {},
|
||||||
},
|
selectYear(year) {},
|
||||||
next(year, month, week) {
|
|
||||||
},
|
|
||||||
selectYear(year) {
|
|
||||||
},
|
|
||||||
setToday() {
|
setToday() {
|
||||||
// this.$refs.calendar.setToday();
|
// this.$refs.calendar.setToday();
|
||||||
},
|
},
|
||||||
@ -395,13 +403,15 @@ export default {
|
|||||||
res => {
|
res => {
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
that.loaded = res.data.length < that.filter.limit;
|
that.loaded = res.data.length < that.filter.limit;
|
||||||
that.list.push.apply(that.list, res.data);
|
// that.list.push.apply(that.list, res.data);
|
||||||
|
that.list = res.data;
|
||||||
that.filter.page = that.filter.page + 1;
|
that.filter.page = that.filter.page + 1;
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
title:
|
||||||
icon: 'none',
|
err.msg || err.response.data.msg || err.response.data.message,
|
||||||
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user