优化订单列表
This commit is contained in:
parent
ecc275426d
commit
381c5cf35f
|
@ -405,6 +405,7 @@ export default {
|
|||
.then((response) => {
|
||||
this.$utils.toast(response.msg).then(() => {
|
||||
this.$store.commit("system/currentOrderTabIndex", 1);
|
||||
this.$store.commit("system/refreshOrder", true);
|
||||
this.$utils.toPage("/pages/order/order", {}, "switch");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -175,6 +175,7 @@ export default {
|
|||
.then((id) => {
|
||||
this.$store.dispatch("cart/updateAll");
|
||||
this.$store.commit("system/currentOrderTabIndex", 0);
|
||||
this.$store.commit("system/refreshOrder", true);
|
||||
this.$models.order
|
||||
.pay({
|
||||
request: {
|
||||
|
|
|
@ -98,6 +98,7 @@ export default {
|
|||
computed: {
|
||||
...mapState({
|
||||
currentOrderTabIndex: (state) => state.system.currentOrderTabIndex,
|
||||
refreshOrder: (state) => state.system.refreshOrder,
|
||||
}),
|
||||
},
|
||||
onLoad() {},
|
||||
|
@ -105,11 +106,14 @@ export default {
|
|||
if (this.currentOrderTabIndex) {
|
||||
this.tabIndex = this.currentOrderTabIndex;
|
||||
}
|
||||
this.switchTab(this.tabIndex);
|
||||
if (this.refreshOrder) {
|
||||
this.switchTab(this.tabIndex);
|
||||
}
|
||||
},
|
||||
onReady() {},
|
||||
onHide() {
|
||||
this.$store.commit("system/currentOrderTabIndex", 0);
|
||||
this.$store.commit("system/refreshOrder", false);
|
||||
},
|
||||
onReachBottom() {
|
||||
this.loadData();
|
||||
|
|
|
@ -212,6 +212,7 @@ export default {
|
|||
})
|
||||
.then((data) => {
|
||||
this.$store.commit("system/currentOrderTabIndex", 2);
|
||||
this.$store.commit("system/refreshOrder", true);
|
||||
this.$models.order
|
||||
.pay({
|
||||
request: {
|
||||
|
|
|
@ -10,6 +10,7 @@ export default {
|
|||
register: "",
|
||||
serviceMobile: "",
|
||||
},
|
||||
refreshOrder: true,
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
|
@ -21,6 +22,9 @@ export default {
|
|||
},
|
||||
platformData(state, data) {
|
||||
state.platformData = data;
|
||||
},
|
||||
refreshOrder(state, data) {
|
||||
state.refreshOrder = data;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
|
Loading…
Reference in New Issue