fix bugs
This commit is contained in:
parent
d521f84acf
commit
d4e617a640
|
@ -2,7 +2,7 @@
|
|||
* @Author: 龚祖望 573413756@qq.com
|
||||
* @Date: 2022-05-16 09:16:41
|
||||
* @LastEditors: 龚祖望 573413756@qq.com
|
||||
* @LastEditTime: 2022-11-17 11:13:35
|
||||
* @LastEditTime: 2022-11-17 13:51:19
|
||||
* @FilePath: \dashengda\src\permission.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
@ -41,7 +41,6 @@ router.beforeEach(async(to, from, next) => {
|
|||
try {
|
||||
const res = await store.dispatch('user/getInfo')
|
||||
store.dispatch('user/generateRoutes', res).then(() => {
|
||||
router.addRoutes(store.getters.asyncRouters)
|
||||
next()
|
||||
}).catch(async err => {
|
||||
// remove token and go to login page to re-login
|
||||
|
|
|
@ -297,10 +297,8 @@ const createRouter = () => new Router({
|
|||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes
|
||||
})
|
||||
|
||||
const router = createRouter()
|
||||
// router.addRoutes(asyncRouter)
|
||||
|
||||
router.addRoutes(asyncRouter)
|
||||
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
||||
export function resetRouter() {
|
||||
const newRouter = createRouter()
|
||||
|
|
|
@ -159,7 +159,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
date: '',
|
||||
list: [{}],
|
||||
list: [],
|
||||
form: {
|
||||
topic: '',
|
||||
content: '',
|
||||
|
|
Loading…
Reference in New Issue