|
@@ -26,15 +26,11 @@ App({
|
|
|
wx.getSetting({
|
|
|
success: res => {
|
|
|
if (res.authSetting['scope.userInfo']) {
|
|
|
- let local_session_id = wx.getStorageSync('session_id');
|
|
|
- if (local_session_id == '') {
|
|
|
wx.getUserInfo({
|
|
|
success: res => {
|
|
|
- // 可以将 res 发送给后台解码出 unionId
|
|
|
self.globalData.userInfo = res.userInfo;
|
|
|
self.globalData.userInfo.nickname = res.userInfo.nickName;
|
|
|
let userInfo = Object.assign({}, self.globalData.userId, self.globalData.userInfo);
|
|
|
- // console.log(userInfo);
|
|
|
wx.request({
|
|
|
url: self.host,
|
|
|
method: 'GET',
|
|
@@ -65,14 +61,6 @@ App({
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
- else {
|
|
|
- wx.getUserInfo({
|
|
|
- success: res => {
|
|
|
- self.globalData.userInfo = res.userInfo;
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
else {
|
|
|
wx.authorize({
|