完善功能,bug修复

UI_2022-02-10
yujialong 3 years ago
parent 5d5e1115e1
commit 0fcf0c273e
  1. 16
      src/layouts/header/index.vue
  2. 20
      src/store/modules/user.js

@ -36,6 +36,7 @@ export default {
])
},
mounted() {
this.getSystemDetail();
this.getUserInfo();
},
methods: {
@ -93,14 +94,13 @@ export default {
height: 60px;
font-size: 16px;
color: #333;
}
.header .logo {
width: 150px;
margin-left: 20px;
&.hh {
width: 500px;
.logo {
height: 50px;
margin: 0 20px;
}
.title {
font-size: 18px;
font-weight: bold;
}
}

@ -10,6 +10,8 @@ import addRoutes from "@/libs/route/addRoutes";
export default {
namespaced: true,
state: {
title: "",
logoUrl: "",
avatar: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
userId: "",
studentId: "",
@ -28,6 +30,12 @@ export default {
state.roleId = info.roleId;
state.dataTime = info.dataTime;
},
SET_TITLE: (state, title) => {
state.title = title;
},
SET_LOGO_URL: (state, logoUrl) => {
state.logoUrl = logoUrl;
},
SET_AVATAR: (state, avatar) => {
state.avatar = avatar;
},
@ -68,12 +76,18 @@ export default {
resolve();
});
},
setAvatar({ state, commit }, avatar) {
commit("SET_AVATAR", avatar);
},
setInfo({ state, commit }, info) {
commit("SET_INFO", info);
},
setTitle({ state, commit }, title) {
commit("SET_TITLE", title);
},
setLogoUrl({ state, commit }, logoUrl) {
commit("SET_LOGO_URL", logoUrl);
},
setAvatar({ state, commit }, avatar) {
commit("SET_AVATAR", avatar);
},
setUserName({ state, commit }, userName) {
commit("SET_USERNAME", userName);
}

Loading…
Cancel
Save