@tmsfe/tms-core 0.0.215 → 0.0.216

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmsfe/tms-core",
3
- "version": "0.0.215",
3
+ "version": "0.0.216",
4
4
  "description": "tms运行时框架",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,9 +54,14 @@ const loginFn = async () => {
54
54
  userData = await login();
55
55
  }
56
56
  if (userData.errCode === 0) {
57
- userInfo = userData.resData.userInfo;
58
- // 缓存登录信息
59
- wx.setStorageSync('sinanCacheUserInfo', userInfo);
57
+ userInfo = userData.resData.userInfo || {};
58
+ // 登录信息,附带 expire 和时间校准字段
59
+ userInfo = {
60
+ ...userInfo,
61
+ expire: userInfo.expire,
62
+ loginTime: userInfo.loginTime,
63
+ localTime: Date.now(),
64
+ };
60
65
  }
61
66
  } catch (e) {}
62
67
  resolve(userInfo);