@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 +1 -1
- package/src/runtime/login.ts +8 -3
package/package.json
CHANGED
package/src/runtime/login.ts
CHANGED
|
@@ -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
|
-
|
|
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);
|