返回系统

zhangtao
laozt 1 year ago
parent 443bf5b667
commit 02b548a2c8

@ -42,6 +42,9 @@
</div> </div>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<router-link to="/home">
<el-dropdown-item>返回系统</el-dropdown-item>
</router-link>
<router-link to="/user/profile"> <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item> <el-dropdown-item>个人中心</el-dropdown-item>
</router-link> </router-link>
@ -102,6 +105,8 @@ export default {
data() { data() {
return { return {
avatarFlag: false, avatarFlag: false,
userInfo: JSON.parse(sessionStorage.getItem("USER_INFO")),
userName: "admin",
}; };
}, },
methods: { methods: {
@ -109,12 +114,17 @@ export default {
const isGovernmentAffairsNetwork = localStorage.getItem( const isGovernmentAffairsNetwork = localStorage.getItem(
"isGovernmentAffairsNetwork" "isGovernmentAffairsNetwork"
); );
const G_USER_INFO = JSON.parse(localStorage.getItem("G_USER_INFO")); if (this.userInfo.userName == "admin") {
if (isGovernmentAffairsNetwork == "1") { this.userName = this.userInfo.userName;
this.userName = G_USER_INFO.data.username;
} else { } else {
this.userName = this.dept.deptName + " " + this.username; this.userName = this.userInfo.lawLevel + " " + this.userInfo.nickName;
} }
// const G_USER_INFO = JSON.parse(localStorage.getItem("G_USER_INFO"));
// if (isGovernmentAffairsNetwork == "1") {
// this.userName = G_USER_INFO.data.username;
// } else {
// this.userName = this.dept.deptName + " " + this.username;
// }
}, },
getDrop(e) { getDrop(e) {
this.avatarFlag = e; this.avatarFlag = e;

Loading…
Cancel
Save