console.log(123)
let that = this;
wx.getUserProfile({
desc: "用于完善用户个人资料,开放功能权限!",
success: function (res) {
let { encryptedData, iv, userInfo } = res;
wx.cloud.callFunction({
name: "healthweb",
data: { type: 'quickLogin', encryptedData, iv, userInfo },
success: res => {
let { data } = res.result;
app.globalData["_user"] = data[0];
app.globalData["_userState"] = data.length == 1;
if (data.length == 1) {
let { actions } = that.data,
{ _user } = app.globalData,
{ nickName, avatarUrl } = _user;
actions[0] = { name: "微信快捷登录", disabled: true }
that.setData({ avatar: { nickName, avatarUrl }, actions });
Notify({ type: "success", message: nickName + " 登录成功!" })
}
},
fail: () => wx.$error("快捷登录失败!")
})
}
})
console.log(456)