Compare commits
No commits in common. "e4c1df7e814c425cd7e992ae934360da3e4818f3" and "cd51beca52cb9ce678e783308c283b0eabf6f33d" have entirely different histories.
e4c1df7e81
...
cd51beca52
@ -252,7 +252,6 @@ export default {
|
||||
storage("lacal").setItem("loginUserVerify", { username, password }); // 登录凭证存入localStorage
|
||||
}
|
||||
storage("lacal").setItem("webOrgId", ret.User.ORG_ID);
|
||||
storage("lacal").setItem("webUserInfo", ret.User);
|
||||
storage("lacal").setItem("DataRule", ret.DataRule || []);
|
||||
storage("lacal").setItem("OrgRule", ret.OrgRule || []);
|
||||
storage("lacal").setItem("departmentId", ret.User.DEPARTMENT_ID);
|
||||
@ -343,22 +342,10 @@ export default {
|
||||
return ret;
|
||||
},
|
||||
// 验证登录状态
|
||||
*checkLoginStatus({ onSuccess, onFail }, { select, put }) {
|
||||
*checkLoginStatus({ onSuccess, onFail }, { select }) {
|
||||
const { OrgId } = yield select((state) => state.login);
|
||||
if (!OrgId) {
|
||||
const webOrgId = storage("lacal").getItem("webOrgId").val || storage("lacal").getItem("Orgid").val;
|
||||
const userInfo = storage("lacal").getItem("webUserInfo").val;
|
||||
if (webOrgId) {
|
||||
const payload = { OrgId: webOrgId };
|
||||
if (userInfo) {
|
||||
payload.user = userInfo;
|
||||
payload.userId = userInfo.ID;
|
||||
}
|
||||
yield put({ type: "save", payload });
|
||||
onSuccess instanceof Function && onSuccess();
|
||||
} else {
|
||||
onFail instanceof Function && onFail();
|
||||
}
|
||||
onFail instanceof Function && onFail();
|
||||
} else {
|
||||
onSuccess instanceof Function && onSuccess();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user