bug调试
parent
38ce7c1f56
commit
4a659fdde4
23
src/App.vue
23
src/App.vue
|
@ -89,6 +89,7 @@ import {
|
||||||
batchAddOrUpdateFrontInternationalization,
|
batchAddOrUpdateFrontInternationalization,
|
||||||
getFrontInternationalizationList,
|
getFrontInternationalizationList,
|
||||||
} from "@/api/dictionary/dictionary";
|
} from "@/api/dictionary/dictionary";
|
||||||
|
import { getTrialExtralConfig } from "@/api/trials";
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import i18n from "./lang";
|
import i18n from "./lang";
|
||||||
export default {
|
export default {
|
||||||
|
@ -105,6 +106,28 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
"$route.query": {
|
||||||
|
async handler() {
|
||||||
|
if (
|
||||||
|
this.$route.query.trialId &&
|
||||||
|
this.$route.query.trialId !== this.$store.state.trials.config.trialId
|
||||||
|
) {
|
||||||
|
let res = await getTrialExtralConfig({
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
});
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$store.dispatch("trials/setConfig", {
|
||||||
|
trialId: this.$route.query.trialId,
|
||||||
|
...res.Result,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeValue(target, attr, e) {
|
changeValue(target, attr, e) {
|
||||||
this.$set(target, attr, e);
|
this.$set(target, attr, e);
|
||||||
|
|
|
@ -6,7 +6,6 @@ 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 { getTrialExtralConfig } from "@/api/trials"
|
|
||||||
// import getPageTitle from '@/utils/get-page-title'
|
// import getPageTitle from '@/utils/get-page-title'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
@ -23,12 +22,6 @@ router.beforeEach(async (to, from, next) => {
|
||||||
Vue.prototype.toPath = to.path
|
Vue.prototype.toPath = to.path
|
||||||
Vue.prototype.$path = []
|
Vue.prototype.$path = []
|
||||||
if (hasToken) {
|
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 === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') {
|
||||||
if (to.path === '/ReviewersResearch') {
|
if (to.path === '/ReviewersResearch') {
|
||||||
await this.$store.dispatch('user/logout')
|
await this.$store.dispatch('user/logout')
|
||||||
|
|
Loading…
Reference in New Issue