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