|
|
@@ -42,6 +42,10 @@ Page({ |
|
|
|
}, |
|
|
|
// 保存用户信息 |
|
|
|
appletLogin(iv, encryptedData) { |
|
|
|
wx.showLoading({ |
|
|
|
title: '登录中...', |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
let { nickName, gender, country, city, province, avatarUrl } = this.data.userInfo; |
|
|
|
$request.get('/com/appletLogin.action', { |
|
|
|
// openid: app.globalData.openid, |
|
|
@@ -56,7 +60,7 @@ Page({ |
|
|
|
province, |
|
|
|
city |
|
|
|
}).then(res => { |
|
|
|
// console.log(res,'保存用户信息返回的Res') |
|
|
|
console.log(res,'保存用户信息返回的Res') |
|
|
|
this.getUserSession() |
|
|
|
}).catch(error => { |
|
|
|
console.log(error, 'error appletLogin') |
|
|
@@ -103,21 +107,10 @@ Page({ |
|
|
|
// 保存个人信息后拿到新数据 |
|
|
|
getUserSession() { |
|
|
|
let that = this |
|
|
|
wx.showLoading({ |
|
|
|
title: '加载中', |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
$request.post('/script/getSession.action', {}).then(res => { |
|
|
|
console.log(res, 'getUserSession---res') |
|
|
|
wx.hideLoading() |
|
|
|
app.globalData.customerId = res.data.customer.customerId |
|
|
|
// wx.navigateTo({ |
|
|
|
// url: "/pages/mine/mine", //跳转页面的路径,可带参数 ?隔开,不同参数用 & 分隔;相对路径,不需要.wxml后缀 |
|
|
|
// success: function () {}, //成功后的回调; |
|
|
|
// fail: function () {}, //失败后的回调; |
|
|
|
// complete: function () {} //结束后的回调(成功,失败都会执行) |
|
|
|
// }) |
|
|
|
|
|
|
|
app.globalData.customerId = res.data.customer.customerId; |
|
|
|
wx.navigateBack() |
|
|
|
}).catch(error => { |
|
|
|
console.log(error, "获取error") |
|
|
|
}) |