|
@@ -184,8 +184,16 @@ export default {
|
|
|
|
|
|
if (data.orgInfo)
|
|
|
this.$ls.set("orgId", data.orgInfo.id, this.GLOBAL.authTimeout);
|
|
|
- if (data.schoolInfo)
|
|
|
- this.$ls.set("schoolId", data.schoolInfo.id, this.GLOBAL.authTimeout);
|
|
|
+
|
|
|
+ if (data.schoolInfo && data.schoolInfo.length) {
|
|
|
+ const curSchool = data.schoolInfo.find(
|
|
|
+ item => item.code === this.loginModel.schoolCode
|
|
|
+ );
|
|
|
+ if (curSchool) {
|
|
|
+ this.$ls.set("schoolId", curSchool.id, this.GLOBAL.authTimeout);
|
|
|
+ this.$ls.set("schoolName", curSchool.name, this.GLOBAL.authTimeout);
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$ls.set("user", data, this.GLOBAL.authTimeout);
|
|
|
|
|
|
// 强制修改密码
|