wx.ready(function () {
wx.checkJsApi({
jsApiList: ["requestFacialVerify"],
success: function(res) {
console.log("授权结果:", res);
}
});
wx.getLocation({
success: function (res) {
const response= JSON.parse((JSON.stringify(res)));
that.latitude = response.latitude;
that.longitude = response.longitude;
}
})
wx.login({
success: function (res) {
alert('login执行成功')
this.code = res.code
console.log('code' + res.code)
that.getWxCode2Session(res.code, appid)
}
})
that.doWxFacialVerifyFace(this.verifyId)
})
wx.error(function (res) {
that.$toast("config验证失败:" + JSON.stringify(res))
})
},
目前jssdk没有wx.login这个接口哦。
如果你有已完成微信认证的服务号,可以通过网页授权能力获取用户openid:https://developers.weixin.qq.com/doc/service/guide/h5/auth.html