Commit 42366be2 authored by 郝聪敏's avatar 郝聪敏

fix: 修改登陆页面跳转方式

parent b69eb087
...@@ -15,7 +15,7 @@ Vue.use(VueContextMenu); ...@@ -15,7 +15,7 @@ Vue.use(VueContextMenu);
}) })
export default class Layout extends Vue { export default class Layout extends Vue {
activeName: string = 'list'; activeName: string = 'list';
user: string = localStorage.get('user'); username: string = localStorage.get('user')?.name || '陌生人';
get isDashboard() { get isDashboard() {
return this.activeName === 'detail'; return this.activeName === 'detail';
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<i-col :span="21" class="layout-menu-right"> <i-col :span="21" class="layout-menu-right">
<div class="layout-header"> <div class="layout-header">
<div class="avator"> <div class="avator">
<span>{{ user.name }}</span> <span>{{ username }}</span>
<span @click="logOut" style="cursor: pointer;">退出</span> <span @click="logOut" style="cursor: pointer;">退出</span>
</div> </div>
</div> </div>
......
const protocol = window.location.protocol; const protocol = window.location.protocol;
export default { export default {
apiHost: `http://172.20.3.77:80/`, apiHost: `https://quantum-fe.liangkebang.net/`,
qiniuHost: `https://appsync.lkbang.net/`, qiniuHost: `https://appsync.lkbang.net/`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`, shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`,
opapiHost: `${protocol}//opapi.q-gp.com` opapiHost: `${protocol}//opapi.q-gp.com`
......
...@@ -51,7 +51,7 @@ export default function createRouter() { ...@@ -51,7 +51,7 @@ export default function createRouter() {
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
if (to.path !== '/login') { if (to.path !== '/login') {
if (!localStorage.get('token')) { if (!localStorage.get('token')) {
return next('/login'); return window.location.href = '/editor/login';
} }
} }
......
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