diff --git a/src/permission.js b/src/permission.js index 19135136..41d0dd65 100644 --- a/src/permission.js +++ b/src/permission.js @@ -14,12 +14,6 @@ NProgress.configure({ showSpinner: false }) const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] router.beforeEach(async (to, from, next) => { - if (to.query.trialId && to.query.trialId !== store.state.trials.config.trialId) { - let res = await getTrialExtralConfig({ TrialId: to.query.trialId }); - if (res.IsSuccess) { - store.dispatch('trials/setConfig', { trialId: to.query.trialId, ...res.Result }); - } - } NProgress.start() // 设置页面标题 // document.title = getPageTitle(to.meta.title) @@ -29,6 +23,12 @@ router.beforeEach(async (to, from, next) => { Vue.prototype.toPath = to.path Vue.prototype.$path = [] if (hasToken) { + if (to.query.trialId && to.query.trialId !== store.state.trials.config.trialId) { + let res = await getTrialExtralConfig({ TrialId: to.query.trialId }); + if (res.IsSuccess) { + store.dispatch('trials/setConfig', { trialId: to.query.trialId, ...res.Result }); + } + } if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') { if (to.path === '/ReviewersResearch') { await this.$store.dispatch('user/logout')