新开页签跳转问题
parent
2ce7454b47
commit
0e485a8984
|
@ -6,11 +6,12 @@ import 'nprogress/nprogress.css'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { OSSclient } from './utils/oss'
|
import { OSSclient } from './utils/oss'
|
||||||
|
import WHITELIST from "./utils/whiteList"
|
||||||
// import getPageTitle from '@/utils/get-page-title'
|
// import getPageTitle from '@/utils/get-page-title'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
|
const whiteList = WHITELIST
|
||||||
store.state.trials.whiteList = whiteList;
|
store.state.trials.whiteList = whiteList;
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
|
|
|
@ -2,7 +2,7 @@ import axios from 'axios'
|
||||||
import { Message, MessageBox, Alert } from 'element-ui'
|
import { Message, MessageBox, Alert } from 'element-ui'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import Vue from 'vue'
|
import WHITELIST from "./whiteList"
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
console.log(moment.tz.guess())
|
console.log(moment.tz.guess())
|
||||||
axios.defaults.withCredentials = false
|
axios.defaults.withCredentials = false
|
||||||
|
@ -27,7 +27,10 @@ service.interceptors.request.use(
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
||||||
if (!path || path === '/ReviewersResearchForm' || path === '/ReviewersResearch' || path === '/login' || path === '/researchForm' || path === '/researchDetail_m' || path === '/researchLogin_m' || path === '/researchLogin' || path === '/email-recompose' || path === '/recompose' || path === '/resetpassword' || path === '/error') {
|
// if (!path || path === '/ReviewersResearchForm' || path === '/ReviewersResearch' || path === '/login' || path === '/researchForm' || path === '/researchDetail_m' || path === '/researchLogin_m' || path === '/researchLogin' || path === '/email-recompose' || path === '/recompose' || path === '/resetpassword' || path === '/error') {
|
||||||
|
// return config
|
||||||
|
// }
|
||||||
|
if (!path || WHITELIST.some(item => item === path)) {
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
const WHITELIST = ['/', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
|
||||||
|
export default WHITELIST
|
Loading…
Reference in New Issue