登录页oss配置请求问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b8279e1f4c
commit
8a55cfcad7
|
@ -23,6 +23,7 @@ Vue.prototype.$setOpenWindow = (openWindow) => {
|
||||||
// 时间格式化
|
// 时间格式化
|
||||||
Vue.prototype.$moment = moment;
|
Vue.prototype.$moment = moment;
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
|
console.log(to, 'to')
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
Vue.prototype.$setOpenWindow();
|
Vue.prototype.$setOpenWindow();
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
|
@ -35,12 +36,15 @@ router.beforeEach(async (to, from, next) => {
|
||||||
if (hasToken) {
|
if (hasToken) {
|
||||||
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')
|
|
||||||
OSSclient()
|
OSSclient()
|
||||||
|
await this.$store.dispatch('user/logout')
|
||||||
}
|
}
|
||||||
if (to.path === '/ReviewersResearchForm') {
|
if (to.path === '/ReviewersResearchForm') {
|
||||||
OSSclient()
|
OSSclient()
|
||||||
}
|
}
|
||||||
|
if (to.path === '/login') {
|
||||||
|
OSSclient()
|
||||||
|
}
|
||||||
next()
|
next()
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue