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