getPhoneNumber(e) {
let msg = e.detail.errMsg;
let that = this;
let sessionID=wx.getStorageSync('login_session_key'),
encryptedDataStr=e.detail.encryptedData,
iv= e.detail.iv;
if (msg == 'getPhoneNumber:ok') {
wx.checkSession({
success:function(){
that.deciyption(sessionID,encryptedDataStr,iv);
},
fail:function(){
wx.login({
success: res => {
console.log(res,'sessionkey过期')
app.network.request1({
url: 'login',
method: "POST",
data: { code:res.code},
success: function (res) {
console.log(res)
if (res.data.error == 0) {
console.log(res.data)
that.deciyption(res.data.session_key,encryptedDataStr,iv);
} else {
wx.showToast({
icon: 'none',
title: res.data.message,
})
}
}
})
}
})
}
})
}
},
调试基础库 2.12.1
e.detail.encryptedData,e.detail.iv, 的值都是undefind
偶尔会是undefind 目前发现在苹果手机上
2022年了,问题解决了吗
我们服务端日志里也偶现这种情况
如果用户拒绝呢?