优化页面

This commit is contained in:
TOP糯米 2023-03-30 17:24:43 +08:00
parent f436b097e0
commit c8151c3af5
1 changed files with 4 additions and 5 deletions

View File

@ -115,7 +115,7 @@ export default {
}, },
onLoad() {}, onLoad() {},
onShow() { onShow() {
if (this.currentOrderTabIndex) { if (this.currentOrderTabIndex != this.tabIndex) {
this.tabIndex = this.currentOrderTabIndex; this.tabIndex = this.currentOrderTabIndex;
} }
if (this.refreshOrder) { if (this.refreshOrder) {
@ -123,10 +123,7 @@ export default {
} }
}, },
onReady() {}, onReady() {},
onHide() { onHide() {},
this.$store.commit("system/currentOrderTabIndex", 0);
this.$store.commit("system/refreshOrder", false);
},
onReachBottom() { onReachBottom() {
this.loadData(); this.loadData();
}, },
@ -139,6 +136,7 @@ export default {
* 切换tab页 * 切换tab页
*/ */
switchTab(index) { switchTab(index) {
this.$store.commit("system/currentOrderTabIndex", index);
this.tabIndex = index; this.tabIndex = index;
let currentTab = this.tabList[index]; let currentTab = this.tabList[index];
currentTab.page = 1; currentTab.page = 1;
@ -197,6 +195,7 @@ export default {
* 跳转详情 * 跳转详情
*/ */
toDetail(id, state, listType, orderType) { toDetail(id, state, listType, orderType) {
this.$store.commit("system/refreshOrder", false);
let tab = "detail"; let tab = "detail";
// //
if (listType == "t2" && orderType == 2 && state == 0) { if (listType == "t2" && orderType == 2 && state == 0) {