From 6de3529fa498392b112208e7b3a381555c06a359 Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Mon, 30 Mar 2026 18:10:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 30 +++++++++++----------- pages/home/index.vue | 70 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 60 insertions(+), 40 deletions(-) diff --git a/App.vue b/App.vue index 7d66522..ccab35e 100644 --- a/App.vue +++ b/App.vue @@ -215,21 +215,21 @@ export default { uni.showShareMenu({ shareTypes: "normal", }); - this.getLocation().then(() => { - // console.log("that.currentInfo", that.currentInfo); - if (that.currentInfo.longitude) { - that.G.Get(that.api.getCityNameByLatLng, { lng: that.currentInfo.longitude, lat: that.currentInfo.latitude }, (res) => { - // console.log("res", res); - if (res) { - let currentCity = res.replace("市", ""); - uni.setStorageSync("selectedCity", currentCity); - uni.$emit("setCity"); - } - }); - } else { - uni.$emit("setCity"); - } - }); + // this.getLocation().then(() => { + // // console.log("that.currentInfo", that.currentInfo); + // if (that.currentInfo.longitude) { + // that.G.Get(that.api.getCityNameByLatLng, { lng: that.currentInfo.longitude, lat: that.currentInfo.latitude }, (res) => { + // // console.log("res", res); + // if (res) { + // let currentCity = res.replace("市", ""); + // uni.setStorageSync("selectedCity", currentCity); + // uni.$emit("setCity"); + // } + // }); + // } else { + // uni.$emit("setCity"); + // } + // }); // // 隐藏默认底部 // uni.hideTabBar(); }, diff --git a/pages/home/index.vue b/pages/home/index.vue index c77f32a..af4ba48 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -256,32 +256,52 @@ export default { this.isLogin = uni.getStorageSync("apply-userinfo") ? true : false; this.query.size = this.isLogin ? 50 : 20; // 如果没有携带城市信息,则在获取完城市定位后重新触发获取城市职位 - if (!sceneInfo.query.cityInfo) { - uni.$on("setCity", () => { - that.G.startAbort(1); - that.loadSelectedCityFromCache(); - that.isCheckShare(() => { - that.getList().then(() => { - that.showNotic = "paused"; - console.log("that.showNotic1", that.showNotic); - that.getJobNum(); - setTimeout(() => { - if (uni.getStorageSync("miniApp-info").notice) { - let notice = uni.getStorageSync("miniApp-info").notice; - var reg = /[\r\n]/g; - notice = notice.replace(reg, ""); - that.noticList = []; - // that.noticList = notice; - that.noticList.push(notice); - that.showNotic = "play"; - } - console.log("that.noticList", that.noticList); - }, 100); - }); - that.isShowTab = true; - }); + // if (!sceneInfo.query.cityInfo) { + // uni.$on("setCity", () => { + // that.G.startAbort(1); + // that.loadSelectedCityFromCache(); + // that.isCheckShare(() => { + // that.getList().then(() => { + // that.showNotic = "paused"; + // console.log("that.showNotic1", that.showNotic); + // that.getJobNum(); + // setTimeout(() => { + // if (uni.getStorageSync("miniApp-info").notice) { + // let notice = uni.getStorageSync("miniApp-info").notice; + // var reg = /[\r\n]/g; + // notice = notice.replace(reg, ""); + // that.noticList = []; + // // that.noticList = notice; + // that.noticList.push(notice); + // that.showNotic = "play"; + // } + // console.log("that.noticList", that.noticList); + // }, 100); + // }); + // that.isShowTab = true; + // }); + // }); + // } + that.isCheckShare(() => { + that.getList().then(() => { + that.showNotic = "paused"; + console.log("that.showNotic1", that.showNotic); + that.getJobNum(); + setTimeout(() => { + if (uni.getStorageSync("miniApp-info").notice) { + let notice = uni.getStorageSync("miniApp-info").notice; + var reg = /[\r\n]/g; + notice = notice.replace(reg, ""); + that.noticList = []; + // that.noticList = notice; + that.noticList.push(notice); + that.showNotic = "play"; + } + console.log("that.noticList", that.noticList); + }, 100); }); - } + that.isShowTab = true; + }); }, onShow() { let that = this;