Source/plt-web/plt-web-ui/src/api/user.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/plt-web/plt-web-ui/src/page/index/top/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/plt-web/plt-web-ui/src/page/login/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/plt-web/plt-web-ui/src/page/login/userlogin.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/plt-web/plt-web-ui/src/store/modules/user.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Source/plt-web/plt-web-ui/src/api/user.js
@@ -94,8 +94,8 @@ }); export const getUserInfo = () => request({ url: '/api/blade-auth/oauth/user-info', method: 'get' url: '/api/framework/loginController/getSessionInfo', method: 'post' }); export const sendLogs = (list) => request({ Source/plt-web/plt-web-ui/src/page/index/top/index.vue
@@ -242,10 +242,10 @@ cancelButtonText: this.$t("cancelText"), type: "warning" }).then(() => { //this.$store.dispatch("LogOut").then(() => { this.$store.dispatch("LogOut").then(() => { resetRouter(); this.$router.push({path: "/login"}); //}); }); }); } } Source/plt-web/plt-web-ui/src/page/login/index.vue
@@ -122,11 +122,11 @@ <style lang="scss" scoped> .login-container { background: #fff url('../../../public/img/login-background.png')no-repeat center; background-size: 100% 100%; /* 或者 background-size: 100% 100%; */ background-size: 100% 100%; } .login-bg-image{ position: fixed; left: 10%; left: 7%; top: 35%; } Source/plt-web/plt-web-ui/src/page/login/userlogin.vue
@@ -186,7 +186,7 @@ }); return false; } } }; this.$router.push({path: this.tagWel.value}); loading.close(); }).catch((err) => { Source/plt-web/plt-web-ui/src/store/modules/user.js
@@ -67,10 +67,16 @@ if (data.code === 200) { commit('SET_TOKEN', data.obj.tokenVO.accessToken); commit('SET_REFRESH_TOKEN', data.obj.tokenVO.accessToken); // commit('SET_TENANT_ID', data.tenant_id); // commit('SET_USER_INFO', data.obj.sessionInfo); 用户信息 commit('DEL_ALL_TAG'); commit('CLEAR_LOCK'); getUserInfo().then((res) => { const data = res.data.data; commit('SET_USER_INFO', data.obj); }).catch(err => { console.log(err) }) } else { Message({ message: data.msg, @@ -140,18 +146,6 @@ }) }) }, //获取用户信息 GetUserInfo({commit}) { return new Promise((resolve, reject) => { getUserInfo().then((res) => { const data = res.data.data; commit('SET_ROLES', data.roles); resolve(data); }).catch(err => { reject(err); }) }) }, //刷新token refreshToken({state, commit}, userInfo) { window.console.log('handle refresh token'); @@ -213,6 +207,21 @@ }) }) }, //获取用户信息 GetUserInfo({commit}) { return new Promise((resolve, reject) => { getUserInfo().then((res) => { const data = res.data.data; console.log('user',res) // commit('SET_USER_INFO', data.roles); resolve(data); }).catch(err => { reject(err); }) }) }, //获取系统菜单 GetMenu({commit, dispatch}, topMenuId) { return new Promise(resolve => { @@ -231,6 +240,8 @@ }) }) }, //获取系统按钮 GetButtons({commit}) { return new Promise((resolve) => {