|
@@ -33,6 +33,7 @@ function wxLogin(successcallback, failcallback) {
|
|
|
|
|
|
// 获取原来的 openid 和 session_key
|
|
|
function getOpenidSessionKey(successcallback, failcallback, loginType) {
|
|
|
+ console.log('users......',wx.getStorageSync('user'))
|
|
|
if (wx.getStorageSync('user')) {
|
|
|
successcallback(
|
|
|
wx.getStorageSync('user'),
|
|
@@ -140,8 +141,10 @@ function getLoginSchedule(sessionKey, openId, successcallback, failcallback, aff
|
|
|
iv: res.iv,
|
|
|
dist: '1133',
|
|
|
headimgurl: userInfo.avatarUrl,
|
|
|
- loginType
|
|
|
}
|
|
|
+ if(loginType != "") {
|
|
|
+ userData.loginType = "1";
|
|
|
+ }
|
|
|
request.getInstance().url(url).data(userData).method('GET').send().success(res => {
|
|
|
wx.hideToast()
|
|
|
wx.showToast({
|
|
@@ -149,6 +152,7 @@ function getLoginSchedule(sessionKey, openId, successcallback, failcallback, aff
|
|
|
icon: 'success',
|
|
|
duration: 1500
|
|
|
})
|
|
|
+ console.log('users......',res)
|
|
|
wx.setStorageSync('uid', res.data.data.uid)
|
|
|
wx.setStorageSync('user', res)
|
|
|
successcallback(res)
|