Commit c719eaa3 authored by 李鹏 's avatar 李鹏

登录模块修改

parent fca1bd44
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</div> </div>
</div> </div>
<div class="person-menu"> <div class="person-menu" v-if="userInfo && userInfo.system_id">
<!-- 用户中心 --> <!-- 用户中心 -->
<div class="user-center nav-item"> <div class="user-center nav-item">
<span class="user-icon"> <span class="user-icon">
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<bg-icon icon="#bg-ic-arrow-down" style="font-size: 8px; margin-left: 3px" /> <bg-icon icon="#bg-ic-arrow-down" style="font-size: 8px; margin-left: 3px" />
</span> </span>
<span v-else class="user-name" @click.stop="menuAction('login')"> 请登录 </span> <span v-else class="user-name"> 请登录 </span>
<div class="menu-virtual"></div> <div class="menu-virtual"></div>
<div v-if="userInfo && userInfo.system_id" class="menu-list"> <div v-if="userInfo && userInfo.system_id" class="menu-list">
<div <div
...@@ -235,7 +235,7 @@ export default { ...@@ -235,7 +235,7 @@ export default {
if (n == "logout") { if (n == "logout") {
this.$axios.post("/v1/api/user/logout").then((res) => { this.$axios.post("/v1/api/user/logout").then((res) => {
if (res.data.code == "200") { if (res.data.code == "200") {
window.location.href = "/so/manage/ui//#/login"; window.location.href = "/so/manage/ui/#/login";
this.$store.commit("setUserInfo", null); this.$store.commit("setUserInfo", null);
clearCookie("bgToken"); clearCookie("bgToken");
this.$message.success("退出成功"); this.$message.success("退出成功");
......
...@@ -28,6 +28,7 @@ const toLogin = () => { ...@@ -28,6 +28,7 @@ const toLogin = () => {
let path = router.currentRoute.value.path; let path = router.currentRoute.value.path;
//白名单中的401不做跳转 //白名单中的401不做跳转
if (!store.state.whiteList.includes(path)) { if (!store.state.whiteList.includes(path)) {
debugger;
window.location.href = `/so/manage/ui/#/login`; window.location.href = `/so/manage/ui/#/login`;
} }
// router.replace({ // router.replace({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment