|
@@ -71,7 +71,7 @@
|
|
|
<reset-pwd
|
|
|
:user-info="userInfo"
|
|
|
ref="ResetPwd"
|
|
|
- @cancel="clearSetContent"
|
|
|
+ @modified="resetPwdSuccess"
|
|
|
></reset-pwd>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -186,6 +186,25 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ resetPwdSuccess(data) {
|
|
|
+ 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);
|
|
|
+ this.$ls.set("user", data, this.GLOBAL.authTimeout);
|
|
|
+
|
|
|
+ this.$ls.set("token", data.accessToken, this.GLOBAL.authTimeout);
|
|
|
+
|
|
|
+ if (data.roleList && data.roleList.includes("ADMIN")) {
|
|
|
+ this.$router.push({
|
|
|
+ name: "SelectSchool"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ name: "Home"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// code valid
|
|
|
checkField(field) {
|
|
|
return new Promise((resolve, reject) => {
|