no message

cyl/job_im
jscyl13849007907 6 days ago
parent a85f538e8e
commit 9fb0a74584

@ -332,12 +332,14 @@ export default {
}
that.initSelectedCityByAgencyInfo().then(() => {
that.loadSelectedCityFromCache().then(() => {
that.restoreActiveTab();
that.getList();
});
});
} else {
that.initSelectedCityByAgencyInfo().then(() => {
that.loadSelectedCityFromCache().then(() => {
that.restoreActiveTab();
this.getList();
});
});
@ -1122,7 +1124,7 @@ export default {
});
},
goDetail($item) {
// console.log("", $item);
uni.setStorageSync("HOME_ACTIVE_TAB", this.tabInfo.active);
uni.navigateTo({
url: "/root/detail/job?id=" + $item.id,
});
@ -1275,6 +1277,24 @@ export default {
// console.log(this.whichPage);
this.getList();
},
restoreActiveTab() {
let savedTab = uni.getStorageSync("HOME_ACTIVE_TAB");
if (savedTab !== "" && savedTab !== null && savedTab !== undefined) {
uni.removeStorageSync("HOME_ACTIVE_TAB");
if (savedTab !== this.tabInfo.active && savedTab < this.tabInfo.list.length) {
this.tabInfo.active = savedTab;
this.query.list = [];
this.loading = true;
this.query.page = 1;
this.speed = -1;
if (this.tabInfo.list[this.tabInfo.active].classify == 2) {
this.query.ujc = 1;
} else {
this.query.ujc = 0;
}
}
}
},
handleUpdateTab(e) {
// console.log("tab", e);
let that = this;

Loading…
Cancel
Save