术语配置请求页面去除白名单
This commit is contained in:
+5
-6
@@ -17,15 +17,14 @@ store.state.trials.whiteList = whiteList;
|
|||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
// document.title = getPageTitle(to.meta.title)
|
// document.title = getPageTitle(to.meta.title) store.state.trials.whiteList.indexOf(to.path) === -1
|
||||||
if (!to.query.trialId) {
|
if (!to.query.trialId) {
|
||||||
store.dispatch('trials/setConfig', {})
|
store.dispatch('trials/setConfig', {})
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
to.query.trialId &&
|
to.query.trialId &&
|
||||||
to.query.trialId !==
|
to.query.trialId !==
|
||||||
store.state.trials.config.trialId &&
|
store.state.trials.config.trialId
|
||||||
store.state.trials.whiteList.indexOf(to.path) === -1
|
|
||||||
) {
|
) {
|
||||||
console.log(to.query.path)
|
console.log(to.query.path)
|
||||||
let res = await getTrialExtralConfig({
|
let res = await getTrialExtralConfig({
|
||||||
@@ -37,14 +36,14 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
...res.Result,
|
...res.Result,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} if (!to.query.trialId) {
|
}
|
||||||
|
if (!to.query.trialId) {
|
||||||
store.dispatch('trials/setConfig', {})
|
store.dispatch('trials/setConfig', {})
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
to.query.trialId &&
|
to.query.trialId &&
|
||||||
to.query.trialId !==
|
to.query.trialId !==
|
||||||
store.state.trials.config.trialId &&
|
store.state.trials.config.trialId
|
||||||
store.state.trials.whiteList.indexOf(to.path) === -1
|
|
||||||
) {
|
) {
|
||||||
let res = await getTrialExtralConfig({
|
let res = await getTrialExtralConfig({
|
||||||
TrialId: to.query.trialId,
|
TrialId: to.query.trialId,
|
||||||
|
|||||||
Reference in New Issue
Block a user