|
|
|
@ -63,11 +63,10 @@ Page({
|
|
|
|
|
http("/user/login", "post", {
|
|
|
|
|
code: res.code
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.msg === "未注册!") {
|
|
|
|
|
this.getUserProfile()
|
|
|
|
|
} else {
|
|
|
|
|
// getApp().globalData.token = res.token
|
|
|
|
|
getApp().globalData.token = res.data.token
|
|
|
|
|
this.setData({
|
|
|
|
|
user_avatar:res.data.user.avatar,
|
|
|
|
|
user_name:res.data.user.name,
|
|
|
|
@ -84,7 +83,6 @@ Page({
|
|
|
|
|
wx.getStorage({
|
|
|
|
|
key: 'token',
|
|
|
|
|
success (res) {
|
|
|
|
|
console.log(res.data)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -104,7 +102,6 @@ Page({
|
|
|
|
|
wx.getUserProfile({
|
|
|
|
|
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
|
|
success: (userRes) => {
|
|
|
|
|
console.log(userRes)
|
|
|
|
|
that.setData({
|
|
|
|
|
iv: userRes.iv,
|
|
|
|
|
encryptedData: userRes.encryptedData,
|
|
|
|
@ -123,7 +120,6 @@ Page({
|
|
|
|
|
phone: false
|
|
|
|
|
})
|
|
|
|
|
let that = this
|
|
|
|
|
console.log(that.data.iv)
|
|
|
|
|
let param = {
|
|
|
|
|
userinfo: {
|
|
|
|
|
iv: this.data.iv,
|
|
|
|
|