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";
|
import isMobile from "./store/isMobile";
|
||||||
// 路由拦截
|
// 路由拦截
|
||||||
router.beforeEach(function (to, from, next) {
|
router.beforeEach(function (to, from, next) {
|
||||||
|
debugger
|
||||||
let toName = to.name
|
let toName = to.name
|
||||||
if (toName === 'CheckPage') {
|
if (toName === 'CheckPage') {
|
||||||
next()
|
next()
|
||||||
@@ -74,14 +75,17 @@ router.beforeEach(function (to, from, next) {
|
|||||||
let token = store.state.token
|
let token = store.state.token
|
||||||
let path = to.path;
|
let path = to.path;
|
||||||
let userName = ""
|
let userName = ""
|
||||||
if((fromName === undefined || fromName === null) && path.indexOf("/standardSearch/All&userName=") !== -1){
|
if((fromName === undefined || fromName === null) && (path.indexOf("/standardSearch/All&userName=") !== -1 || (path.indexOf("/standardSearch/All") !== -1 && to.query.userName !== undefined))){
|
||||||
userName = path.split("&")[1].split("=")[1]
|
if((path.indexOf("/standardSearch/All") !== -1 && to.query.userName !== undefined)){
|
||||||
|
userName = to.query.userName
|
||||||
|
}else {
|
||||||
|
userName = path.split("&")[1].split("=")[1]
|
||||||
|
}
|
||||||
window.sessionStorage.clear()
|
window.sessionStorage.clear()
|
||||||
}else {
|
}else {
|
||||||
if(fromName === 'Home2'){
|
if(fromName === 'Home2'){
|
||||||
localStorage.removeItem("external")
|
localStorage.removeItem("external")
|
||||||
}
|
}
|
||||||
userName = to.query.userName
|
|
||||||
}
|
}
|
||||||
let requireAuth = to.meta.requireAuth;
|
let requireAuth = to.meta.requireAuth;
|
||||||
let taskId = to.query.taskIds;
|
let taskId = to.query.taskIds;
|
||||||
@@ -189,7 +193,7 @@ router.beforeEach(function (to, from, next) {
|
|||||||
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
|
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
|
||||||
extractedVerify(token)
|
extractedVerify(token)
|
||||||
}else {
|
}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)
|
extractedLocalStorage("standardSearch/All",userName)
|
||||||
localStorage.setItem('external', "external")
|
localStorage.setItem('external', "external")
|
||||||
next('/LoginVerifyNoEncryption')
|
next('/LoginVerifyNoEncryption')
|
||||||
@@ -388,7 +392,7 @@ router.beforeEach(function (to, from, next) {
|
|||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
}else {
|
}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)
|
extractedLocalStorage("standardSearch/All",userName)
|
||||||
localStorage.setItem('external', "external")
|
localStorage.setItem('external', "external")
|
||||||
next('/LoginVerifyNoEncryption')
|
next('/LoginVerifyNoEncryption')
|
||||||
|
|||||||
@@ -1830,8 +1830,7 @@
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "StandardSearch",
|
name: "StandardSearch",
|
||||||
params: {
|
params: {
|
||||||
selectKey: "stand",
|
selectKey: "All"
|
||||||
searchValue: "allvalue"
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user