uni.login({
success: (res) => {
console.warn("点击授权按钮", e);
this.$api.clientPublic_login({
code: res.code
}, (res) => {
console.warn("服务端临时token", res)
let token = res.data;
this.token = token;
uni.getUserInfo({
success: (res) => {
var encryptedData = res.encryptedData;
var iv = res.iv;
this.$api.clientPublic_info({
token: token,
encryptedData: encryptedData,
iv: iv
}, (res) => {
if (res.status == 1) {
uni.setStorageSync("token", res.data.token);
uni.reLaunch({
url: '/pages/index/index'
});
}
})
}
})
})
}
})
uni.getUserInfo卡主就不向下走了
wx.getUserInfo废除了, uni.getUserInfo不可能还能用。