新建任务发送信息大平台

master
lion 1 year ago
parent 39cdec856c
commit c0b47e0aab

@ -76,10 +76,28 @@ router.beforeEach(async (to, from, next) => {
if (whiteList.indexOf(to.path) !== -1) { if (whiteList.indexOf(to.path) !== -1) {
// in the free login whitelist, go directly // in the free login whitelist, go directly
next() next()
} else { } else {
console.log("to",to)
// other pages that do not have permission to access are redirected to the login page. // other pages that do not have permission to access are redirected to the login page.
next(`/login?redirect=${to.path}`) if (to.query.token && to.query.tp) {
NProgress.done() try {
await store.dispatch('user/loginskip', {
token: to.query.token,
tp: to.query.tp
})
console.log("to.path",to.path)
next(to.path || '/')
} catch (e) {
console.log("/login",e)
next('/login')
}
} else {
// other pages that do not have permission to access are redirected to the login page.
next(`/login?redirect=${to.path}`)
NProgress.done()
}
// next(`/login?redirect=${to.path}`)
// NProgress.done()
} }
} }
}) })

@ -372,6 +372,26 @@
} }
}, },
computed: { computed: {
},
mounted(){
// var query = this.$route;
// var rediret = this.$route.path?this.$route.path:'/'
// console.log("query",query)
// if (query.token && query.userid) {
// this.loading = true
// this.$store.dispatch('user/loginskip', {
// token: query.token,
// tp: query.tp,
// }).then(() => {
// this.$router.push({
// path: rediret
// })
// this.loading = false
// }).catch((error) => {
// console.log(error)
// this.loading = false
// })
// }
}, },
created() { created() {
this.getLeads() this.getLeads()

Loading…
Cancel
Save