diff --git a/pages/home/index.vue b/pages/home/index.vue index 44fc9a9..4884c6b 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -597,8 +597,9 @@ export default { console.log("this.selectedCity", cachedCity); if (cachedCity && this.selectedCity != cachedCity) { this.selectedCity = cachedCity; - reso(); } + // 无论是否有缓存,都要resolve,确保后续逻辑能继续执行 + reso(); }); }, getLocation() { @@ -694,6 +695,19 @@ export default { // 设置默认tab if (agencyInfo && agencyInfo.fdbHomeTab !== undefined) { that.tabInfo.active = agencyInfo.fdbHomeTab == 1 ? 0 : 1; + // 重置查询条件,参考handleUpdateTab的处理 + that.isshowskit = false; + that.usetype = "share"; + that.useshare = true; + that.query.list = []; + that.loading = true; + that.query.page = 1; + that.speed = -1; + if (that.tabInfo.list[that.tabInfo.active].classify == 2) { + that.query.ujc = 1; + } else { + that.query.ujc = 0; + } } }, checkScroll() { @@ -915,7 +929,8 @@ export default { if (resData.recordCount == 0) { that.loading = false; } else { - that.loading = true; + // 有数据时应该设置 loading = false,表示加载完成 + that.loading = false; } console.log("$type $type $type $type ", $type); // that.speed = resData.recordCount;