|
@@ -48,7 +48,7 @@
|
|
<script>
|
|
<script>
|
|
import md5 from 'js-md5';
|
|
import md5 from 'js-md5';
|
|
import Cookies from "js-cookie";
|
|
import Cookies from "js-cookie";
|
|
- import { login,authInfo,getCodeImg,getConfigByType,configInfo} from "@/api/login";
|
|
|
|
|
|
+ import { login,authInfo,getCodeImg,getConfigByType,configInfo,getInfo } from "@/api/login";
|
|
import {Decrypt} from "@/utils/secret";
|
|
import {Decrypt} from "@/utils/secret";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -168,6 +168,11 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getInfo() {
|
|
|
|
+ getInfo().then(res => {
|
|
|
|
+ localStorage.setItem('deptName',res.data.userInfo.deptName)
|
|
|
|
+ });
|
|
|
|
+ },
|
|
handleLogin() {
|
|
handleLogin() {
|
|
let self = this;
|
|
let self = this;
|
|
//账号登录
|
|
//账号登录
|
|
@@ -217,6 +222,7 @@
|
|
localStorage.setItem('userType',res.data.userType==0||res.data.userType==1?'1':'2')
|
|
localStorage.setItem('userType',res.data.userType==0||res.data.userType==1?'1':'2')
|
|
this.getExploitConfig();
|
|
this.getExploitConfig();
|
|
this.fullScreen();
|
|
this.fullScreen();
|
|
|
|
+ this.getInfo();
|
|
this.$router.push({path:'/home'});
|
|
this.$router.push({path:'/home'});
|
|
}else{
|
|
}else{
|
|
this.text = '该账号没有相关权限,请联系管理员.';
|
|
this.text = '该账号没有相关权限,请联系管理员.';
|