|
|
@@ -211,6 +211,7 @@ util.request = function (option) {
|
|
|
if (response.data.errno) {
|
|
|
if (response.data.errno == '41009') {
|
|
|
wx.setStorageSync('userInfo', '');
|
|
|
+ uni.setStorageSync('userInfo', '');
|
|
|
util.getUserInfo(function () {
|
|
|
util.request(option)
|
|
|
});
|
|
|
@@ -291,10 +292,12 @@ util.getUserInfo = function (cb) {
|
|
|
if (!session.data.errno) {
|
|
|
userInfo.sessionid = session.data.data.sessionid
|
|
|
wx.setStorageSync('userInfo', userInfo);
|
|
|
+ uni.setStorageSync('userInfo', userInfo);
|
|
|
wx.getUserInfo({
|
|
|
success: function (wxInfo) {
|
|
|
userInfo.wxInfo = wxInfo.userInfo
|
|
|
wx.setStorageSync('userInfo', userInfo);
|
|
|
+ uni.setStorageSync('userInfo', userInfo);
|
|
|
util.request({
|
|
|
url: 'auth/session/userinfo',
|
|
|
data: {
|
|
|
@@ -312,6 +315,7 @@ util.getUserInfo = function (cb) {
|
|
|
if (!res.data.errno) {
|
|
|
userInfo.memberInfo = res.data.data;
|
|
|
wx.setStorageSync('userInfo', userInfo);
|
|
|
+ uni.setStorageSync('userInfo', userInfo);
|
|
|
}
|
|
|
typeof cb == "function" && cb(userInfo);
|
|
|
}
|