From 1cf4dbf08e00d8bf3d643f0d78f87acb4f955e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87?= Date: Thu, 27 Mar 2025 23:22:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E7=BE=A4=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 6 ------ pages/my/promation/wx-group/index.js | 20 ++++++++++++-------- pages/order/index/index.wxml | 8 ++++---- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/app.json b/app.json index 5cf050d..143f44c 100644 --- a/app.json +++ b/app.json @@ -45,12 +45,6 @@ "iconPath": "assets/icon/tabs/tab1.png", "selectedIconPath": "assets/icon/tabs/tab1-active.png" }, - { - "pagePath": "pages/shop/index/index", - "text": "商家", - "iconPath": "assets/icon/tabs/tab2.png", - "selectedIconPath": "assets/icon/tabs/tab2-active.png" - }, { "pagePath": "pages/order/index/index", "text": "订单", diff --git a/pages/my/promation/wx-group/index.js b/pages/my/promation/wx-group/index.js index 5815c85..972ed03 100644 --- a/pages/my/promation/wx-group/index.js +++ b/pages/my/promation/wx-group/index.js @@ -32,7 +32,8 @@ Page({ app.getLocation().then((data)=>{ this.setData({ positioning:false, - positioningError:false + positioningError:false, + isOpenLocation:true }) this.getDetail({latitude:data.latitude,longitude:data.longitude}); }).catch(()=>{ @@ -42,6 +43,7 @@ Page({ positioningError:true }) this.getDetail(); + this.checkSetting(); }) }, getDetail(lnglat){ @@ -52,9 +54,7 @@ Page({ }) }).catch(()=>{ this.setData({ - positioning:false, - qrcodeLoading:false, - positioningError:true + qrcodeLoading:false }) }) }, @@ -69,18 +69,22 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { + this.getWxGroupQrcode(); + }, + checkSetting(){ wx.getSetting({ success:(res)=>{ const isOpenLocation = res.authSetting['scope.userLocation']; this.setData({ + positioningError:isOpenLocation, isOpenLocation }) if(isOpenLocation){ - this.getWxGroupQrcode(); + // this.getWxGroupQrcode(); }else{ - this.setData({ - positioning:false - }) + // this.setData({ + // positioning:false + // }) } } }) diff --git a/pages/order/index/index.wxml b/pages/order/index/index.wxml index e968837..080d4b4 100644 --- a/pages/order/index/index.wxml +++ b/pages/order/index/index.wxml @@ -1,17 +1,17 @@ - + - +