Merge branch 'uat' of https://gitea.frp.extimaging.com/XCKJ/irc_web into uat
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-07-16 10:41:09 +08:00
commit 198e580288
1 changed files with 6 additions and 6 deletions

View File

@ -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')