diff --git a/app.json b/app.json
index c85952c..c2546f8 100644
--- a/app.json
+++ b/app.json
@@ -30,7 +30,8 @@
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
- "navigationBarBackgroundColor": "#ffffff"
+ "navigationBarBackgroundColor": "#ffffff",
+ "backgroundColor": "#F5F5F5"
},
"tabBar": {
"color": "#222222",
diff --git a/pages/login/login.js b/pages/login/login.js
index 3164f60..ead4371 100644
--- a/pages/login/login.js
+++ b/pages/login/login.js
@@ -6,12 +6,20 @@ Page({
isAgree: false,
loging:false,
animation:null,
- userCode:''
+ userCode:'',
+ appConfig:{}
},
onLoad(options){
this.setData({
userCode:options.shared_user_code||''
});
+
+ app.getAppConfig().then((data)=>{
+ console.log(data);
+ this.setData({
+ appConfig:data
+ })
+ })
},
radioChange(event){
this.setData({
@@ -62,6 +70,16 @@ Page({
})
})
},
+ navToPrivacy(){
+ wx.navigateTo({
+ url: `/pages/browser/index?url=${this.data.appConfig.url_user_privacy}`,
+ })
+ },
+ navToAgreement(){
+ wx.navigateTo({
+ url: `/pages/browser/index?url=${this.data.appConfig.url_user_agreement}`,
+ })
+ },
shake(){
if(!this.animation){
this.animation = wx.createAnimation({
diff --git a/pages/login/login.wxml b/pages/login/login.wxml
index ce34d5b..1d4d057 100644
--- a/pages/login/login.wxml
+++ b/pages/login/login.wxml
@@ -15,8 +15,8 @@
diff --git a/pages/my/promation/wx-group/index.js b/pages/my/promation/wx-group/index.js
index 84377dc..5815c85 100644
--- a/pages/my/promation/wx-group/index.js
+++ b/pages/my/promation/wx-group/index.js
@@ -9,9 +9,11 @@ Page({
data: {
detail:{},
communityId:'',
- positioning:false,
+ positioning:true,
positioningError:false,
- qrcodeLoading:false
+ qrcodeLoading:false,
+
+ isOpenLocation:false
},
/**
@@ -19,11 +21,12 @@ Page({
*/
onLoad(options) {
this.data.communityId = options.communityId;
- this.getWxGroupQrcode();
+ },
+ openSetting(){
+ wx.openSetting()
},
getWxGroupQrcode(){
this.setData({
- positioning:true,
qrcodeLoading:true
})
app.getLocation().then((data)=>{
@@ -47,6 +50,12 @@ Page({
detail:res,
qrcodeLoading:false
})
+ }).catch(()=>{
+ this.setData({
+ positioning:false,
+ qrcodeLoading:false,
+ positioningError:true
+ })
})
},
/**
@@ -60,7 +69,21 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
-
+ wx.getSetting({
+ success:(res)=>{
+ const isOpenLocation = res.authSetting['scope.userLocation'];
+ this.setData({
+ isOpenLocation
+ })
+ if(isOpenLocation){
+ this.getWxGroupQrcode();
+ }else{
+ this.setData({
+ positioning:false
+ })
+ }
+ }
+ })
},
/**
diff --git a/pages/my/promation/wx-group/index.wxml b/pages/my/promation/wx-group/index.wxml
index 2342655..c736599 100644
--- a/pages/my/promation/wx-group/index.wxml
+++ b/pages/my/promation/wx-group/index.wxml
@@ -18,18 +18,21 @@
-
-
+
+
定位失败
+
+ 打开定位权限
+
超出服务距离
无法显示二维码
-
- 点击图中二维码识别
+ 长按图中二维码识别
\ No newline at end of file
diff --git a/pages/my/setting/index/index.js b/pages/my/setting/index/index.js
index 6deae99..3240e8e 100644
--- a/pages/my/setting/index/index.js
+++ b/pages/my/setting/index/index.js
@@ -96,10 +96,6 @@ Page({
},
navToPrivacy(){
- // wx.navigateTo({
- // url: `/pages/browser/index?url=${encodeURIComponent('https://beefast.co/#/how-to-use')}`,
- // })
- // return;
wx.navigateTo({
url: `/pages/browser/index?url=${this.data.appConfig.url_user_privacy}`,
})
diff --git a/project.private.config.json b/project.private.config.json
index cccaf2b..bcc545f 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -31,5 +31,6 @@
}
]
}
- }
+ },
+ "libVersion": "3.7.10"
}
\ No newline at end of file