diff --git a/pages/index/index.vue b/pages/index/index.vue index c95ae492..e7cb764f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1071,7 +1071,7 @@ export default { this.switchCategory(id); this.showDropdown = false; }, - + // 获取当前位置 obtainLocation() { // 显示加载提示 @@ -1079,10 +1079,10 @@ export default { title: '定位中...', mask: true }); - + // 清除旧的位置缓存 uni.removeStorageSync('location'); - + // 重新获取位置信息 try { this.getUserLocation(); @@ -1132,7 +1132,7 @@ export default { } }, onShow() { - this.showNav = uni.getStorageSync("is_worker") + this.showNav = uni.getStorageSync("userId") ? uni.getStorageSync("is_worker") : false this.flag = false this.bottomPageNum = 1 console.log('当前页面展示的城市信息', this.currentCity)