注册于:5年前 ,最后活跃于:12小时前
Ta 的动态:
anyuhanfei
在
微信小程序登录时偶尔报解密后得到的buffer非法问题
中增加了附言:
为了省篇幅,上面的代码删除了一些跟问题无关的判断逻辑等代码
anyuhanfei
在
微信小程序登录时偶尔报解密后得到的buffer非法问题
中增加了附言:
小程序端代码:
<view class="content">
<button class="login" openType="getUserInfo" lang="zh_CN" bindgetuserinfo="authorLogin">
<image src="{{utils.staticUrl}}/login/weixin.png"></image>
<text>微信一键登录</text>
</button>
</view>
authorLogin: function(e) {
let _this = this;
wx.login({
success: function(res) {
// 发送用户信息
App._post_form('api/login', {
code: res.code,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv,
}, function(result) {
console.log(result)
}, false, function() {
wx.hideLoading();
});
}
});
}