feat: There is no way the, 配置公开搜索中心 外部访问 ? and &
This commit is contained in:
+9
-5
@@ -64,6 +64,7 @@ import VConsole from 'vuex'
|
||||
import isMobile from "./store/isMobile";
|
||||
// 路由拦截
|
||||
router.beforeEach(function (to, from, next) {
|
||||
debugger
|
||||
let toName = to.name
|
||||
if (toName === 'CheckPage') {
|
||||
next()
|
||||
@@ -74,14 +75,17 @@ router.beforeEach(function (to, from, next) {
|
||||
let token = store.state.token
|
||||
let path = to.path;
|
||||
let userName = ""
|
||||
if((fromName === undefined || fromName === null) && path.indexOf("/standardSearch/All&userName=") !== -1){
|
||||
userName = path.split("&")[1].split("=")[1]
|
||||
if((fromName === undefined || fromName === null) && (path.indexOf("/standardSearch/All&userName=") !== -1 || (path.indexOf("/standardSearch/All") !== -1 && to.query.userName !== undefined))){
|
||||
if((path.indexOf("/standardSearch/All") !== -1 && to.query.userName !== undefined)){
|
||||
userName = to.query.userName
|
||||
}else {
|
||||
userName = path.split("&")[1].split("=")[1]
|
||||
}
|
||||
window.sessionStorage.clear()
|
||||
}else {
|
||||
if(fromName === 'Home2'){
|
||||
localStorage.removeItem("external")
|
||||
}
|
||||
userName = to.query.userName
|
||||
}
|
||||
let requireAuth = to.meta.requireAuth;
|
||||
let taskId = to.query.taskIds;
|
||||
@@ -189,7 +193,7 @@ router.beforeEach(function (to, from, next) {
|
||||
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
|
||||
extractedVerify(token)
|
||||
}else {
|
||||
if((fromName === undefined || fromName === null) && (path.indexOf("/standardSearch/All&userName") !== -1 || path.indexOf("/standardSearch/All?userName") !== -1)){
|
||||
if((fromName === undefined || fromName === null) && (path.indexOf("/standardSearch/All&userName") !== -1 || (path.indexOf("/standardSearch/All") !== -1 && userName !== undefined))){
|
||||
extractedLocalStorage("standardSearch/All",userName)
|
||||
localStorage.setItem('external', "external")
|
||||
next('/LoginVerifyNoEncryption')
|
||||
@@ -388,7 +392,7 @@ router.beforeEach(function (to, from, next) {
|
||||
next()
|
||||
}
|
||||
}else {
|
||||
if((fromName === undefined || fromName === null) && (path.indexOf("/standardSearch/All&userName") !== -1 || path.indexOf("/standardSearch/All?userName") !== -1)) {
|
||||
if((fromName === undefined || fromName === null) && (path.indexOf("/standardSearch/All&userName") !== -1 || (path.indexOf("/standardSearch/All") !== -1 && userName !== undefined))) {
|
||||
extractedLocalStorage("standardSearch/All",userName)
|
||||
localStorage.setItem('external', "external")
|
||||
next('/LoginVerifyNoEncryption')
|
||||
|
||||
@@ -1830,8 +1830,7 @@
|
||||
this.$router.push({
|
||||
name: "StandardSearch",
|
||||
params: {
|
||||
selectKey: "stand",
|
||||
searchValue: "allvalue"
|
||||
selectKey: "All"
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user