修改入群定位问题

This commit is contained in:
2025-03-27 23:22:34 +08:00
parent caba0ea421
commit 1cf4dbf08e
3 changed files with 16 additions and 18 deletions

View File

@ -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": "订单",

View File

@ -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
// })
}
}
})

View File

@ -1,17 +1,17 @@
<!-- <nav-bar class="nav-bar"/> -->
<view class="custom-scroll-view">
<view class="tab-bar">
<!-- <view class="tab-bar">
<view class="item-container {{tabIndex==0?'current':''}}" bind:tap="changeTab" data-index="0">
<view class="item">配送订单</view>
</view>
</view> -->
<!-- <view class="item-container {{tabIndex==1?'current':''}}" bind:tap="changeTab" data-index="1">
<view class="item">消费买单</view>
</view> -->
<view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
<!-- <view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
<view class="item">商品订单</view>
</view>
</view>
</view> -->
<!-- <swiper style="height:{{scrollViewHeight*2}}rpx"> -->
<!-- 跑腿列表 -->