master
xy 2 years ago
parent a14150f9d2
commit 6424645507

@ -25,11 +25,23 @@ router.beforeEach(async (to, from, next) => {
document.title = getPageTitle(to.meta.title)
if (to.query.code) {
console.log(to)
const { token } = await loginOssV2({
code: to.query.code
})
store.commit('user/SET_TOKEN',token)
const {
roles
} = await store.dispatch('user/getInfo')
// generate accessible routes map based on roles
const accessRoutes = await store.dispatch('permission/generateRoutes', roles)
// dynamically add accessible routes
router.addRoutes(accessRoutes)
next('/old')
return
}
// determine whether the user has logged in
const hasToken = getToken()

@ -835,7 +835,7 @@ export default {
year: "",
type: "",
department: "",
is_auth:0
is_auth: 0
},
departments: [], //

@ -286,7 +286,7 @@
type: this.select.type,
plan_department_id: this.select.department,
//top_pid: 1,
is_auth: 0,
is_auth: 1,
is_tree: 1
}).then(res => {
for (var m of res.list) {

Loading…
Cancel
Save