|
@@ -41,6 +41,7 @@ Component({
|
|
|
return new Promise(r => {
|
|
|
wx.login({
|
|
|
success: function(res) {
|
|
|
+ console.log(res)
|
|
|
if (res.code) {
|
|
|
r(res.code)
|
|
|
}
|
|
@@ -53,12 +54,16 @@ Component({
|
|
|
},
|
|
|
bindGetUserInfo: async function(e) {
|
|
|
let code = await this.getCode()
|
|
|
+ console.log('******')
|
|
|
+ console.log(e.detail)
|
|
|
//登录远程服务器
|
|
|
util.request(api.AuthLoginByWeixin, {
|
|
|
code: code,
|
|
|
userInfo: e.detail
|
|
|
}, 'POST', 'application/json').then(res => {
|
|
|
if (res.errno === 0) {
|
|
|
+ console.log('&&&&&&&')
|
|
|
+ console.log(res.data)
|
|
|
//存储用户信息
|
|
|
res.data.userInfo.userId = res.data.userId
|
|
|
res.data.userInfo.sessionKey = res.data.sessionKey
|