From cd20bd3f5d4f9d86303911d0d3fb21daa33fdb8e Mon Sep 17 00:00:00 2001 From: "978184212@qq.com" <978184212@qq.com> Date: Wed, 3 Dec 2025 16:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/maps/index.vue | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/pages/maps/index.vue b/pages/maps/index.vue index 9f41e95..e03d8b9 100644 --- a/pages/maps/index.vue +++ b/pages/maps/index.vue @@ -19,7 +19,7 @@ - 长期定位监测点位 + 长期定位监测点 @@ -55,9 +55,31 @@ this.mapCtx = uni.createMapContext('map', this); }, onShow() { - if (!uni.getStorageSync('third_session')) { + if(uni.getStorageSync('third_session')){ + uni.login({ + success: function (res) { + console.log(res.code) + this.code = res.code + let params = {} + params.jsCode = this.code + console.log(params,152) + api.wxlogin(params).then(res=>{ + console.log(res,165) + if(res.data.code == 0){ + let userInfo = res.data.data; + // uni.setStorageSync('third_session', userInfo.thirdSession); + if(!userInfo.id){ + uni.reLaunch({ + url:'/packDetail/pages/login/login' + }) + } + } + }) + } + }); + }else if(!uni.getStorageSync('third_session')){ uni.reLaunch({ - url: '/packDetail/pages/login/login' + url:'/packDetail/pages/login/login' }) } }, @@ -431,7 +453,7 @@ font-weight: 500; color: #FFFFFF; text-shadow: 0rpx 1rpx 0rpx rgba(4, 49, 52, 0.55); - width: 359rpx; + width: 240rpx; background: rgba(0, 0, 0, 0.52); border: 1px solid #4B677C; border-radius: 6rpx;