| | |
| | | name: userInfo.name, |
| | | phone: userInfo.phone || '未授权' |
| | | }) |
| | | console.log('🔍 完整用户数据结构:', JSON.stringify(userInfo, null, 2)) |
| | | this.globalData.userInfo = userInfo |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // 检查是否有错误信息(适配不同的错误响应格式) |
| | | if (res.data.error || res.data.message || res.data.success === false) { |
| | | if (res.data.error || res.data.success === false) { |
| | | const errorMsg = res.data.error || res.data.message || '登录失败' |
| | | console.error('❌ 登录失败:', errorMsg) |
| | | wx.showToast({ |
| | |
| | | console.log('登录记录ID:', loginResult.loginRecordId) |
| | | console.log('Token长度:', loginResult.token ? loginResult.token.length : 0) |
| | | console.log('SessionKey长度:', loginResult.sessionKey ? loginResult.sessionKey.length : 0) |
| | | console.log('🔍 完整登录用户数据结构:', JSON.stringify(loginResult.userInfo, null, 2)) |
| | | |
| | | // 保存登录信息 |
| | | try { |