iphone6s iphone7无效,安卓的可以。
ios: 10.3.2 wechat:6.5.12
wechatlib:1.4.4
小程序编译:1.1.0
refLoadAuthorize:function(succ,fail){
var that = this;
if(wx.openSetting){
console.log(‘wx.openSetting load’);//这里可以打印出来,后面就没有反应,也不报错
wx.openSetting({
success: (res)=> {
console.log(‘success’,res);
if (res.authSetting[“scope.userInfo”]) {
that.getUserInfo();
if (typeof succ == ‘function’) succ();
}
else
{
if (typeof fail == ‘function’) fail();
}
if (res.authSetting[“scope.userLocation”]){
that.getLocation();
}
},
fail :(res)=>{
console.log(‘fail’,res);
},
complete:(res)=>{
console.log(‘complete’,res);
}
});
} else {
console.log(‘不支持wx.openSetting’);
wx.showModal({
title: ‘提示’,
content: “您的微信版本过低,不支持再次授权,请删除小程序重新打开,授权请点击‘允许’”,
showCancel: false,
confirmText: ‘确定’
});
}
},