提交 00bd469b 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码

上级 8c244e81
......@@ -13,7 +13,7 @@ import view_appmenu from '@widgets/app/central-appmenu/central-appmenu.vue';
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
});
},
})
......
......@@ -33,6 +33,14 @@ export class AppNavHistoryBase {
*/
public readonly historyList: any[] = [];
/**
* 视图标识
*
* @type {Map<string, string>}
* @memberof AppNavHistoryBase
*/
public readonly viewTagMap: Map<string, string> = new Map();
/**
* 导航缓存,忽略判断的导航参数正则
*/
......@@ -144,7 +152,8 @@ export class AppNavHistoryBase {
return false;
}
const page = this.historyList[i];
page.viewtag = tag;
this.viewTagMap.set(page.fullPath, tag);
console.log(this.viewTagMap);
return true;
}
......
......@@ -139,27 +139,27 @@ export class Interceptors {
if(localStorage.getItem('token')){
localStorage.removeItem('token');
}
let leftTime = new Date();
const leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
if (data.loginurl && !Object.is(data.loginurl, '') && data.originurl && !Object.is(data.originurl, '')) {
let _url = encodeURIComponent(encodeURIComponent(window.location.href));
let loginurl: string = data.loginurl;
const originurl: string = data.originurl;
let loginUrl: string = data.loginurl;
const originUrl: string = data.originurl;
if (originurl.indexOf('?') === -1) {
if (originUrl.indexOf('?') === -1) {
_url = `${encodeURIComponent('?RU=')}${_url}`;
} else {
_url = `${encodeURIComponent('&RU=')}${_url}`;
}
loginurl = `${loginurl}${_url}`;
loginUrl = `${loginUrl}${_url}`;
window.location.href = loginurl;
window.location.href = loginUrl;
} else {
if (Object.is(this.router.currentRoute.name, 'login')) {
return;
}
this.router.push({ name: 'login', query: { redirect: this.router.currentRoute.fullPath } });
this.router.push({ name: 'login', query: { redirect: encodeURIComponent(location.href) } });
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册