Commit e4b7f7a1 authored by tangfh's avatar tangfh

+

parent 502cd83a
...@@ -74,8 +74,9 @@ ...@@ -74,8 +74,9 @@
this.init(option); this.init(option);
}, },
onShow() { onShow() {
if (!this.firstRequest) { if (!this.firstRequest && this.page == 1) {
//this.request() this.refreshFlag = true;
this.getList();
} }
}, },
methods: { methods: {
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
onShow() { onShow() {
var tab = this.tabBars[this.tabIndex]; var tab = this.tabBars[this.tabIndex];
if (!tab.content.firstRequest && tab.content.page == 1) { if (!tab.content.firstRequest && tab.content.page == 1) {
tab.content.refreshing = true; tab.content.refreshFlag = true;
this.getList(); this.getList();
} }
}, },
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
tab.content.firstRequest = false; tab.content.firstRequest = false;
let data = res.data.data; let data = res.data.data;
let list = data.list; let list = data.list;
if (tab.content.refreshing || tab.content.list.length == 0) { if (tab.content.refreshing || tab.content.refreshFlag || tab.content.list.length == 0) {
tab.content.total_pages = util.calTotalPage(data.total_list); tab.content.total_pages = util.calTotalPage(data.total_list);
this.clearTabData(this.tabIndex); this.clearTabData(this.tabIndex);
tab.content.list = list; tab.content.list = list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment