diff --git a/xiuosiot-frontend/src/permission.js b/xiuosiot-frontend/src/permission.js index 6d5d3ce..e728d28 100644 --- a/xiuosiot-frontend/src/permission.js +++ b/xiuosiot-frontend/src/permission.js @@ -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 diff --git a/xiuosiot-frontend/src/router/index.js b/xiuosiot-frontend/src/router/index.js index af63e7a..3edc4ac 100644 --- a/xiuosiot-frontend/src/router/index.js +++ b/xiuosiot-frontend/src/router/index.js @@ -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() diff --git a/xiuosiot-frontend/src/views/rule/dataTransfer/index.vue b/xiuosiot-frontend/src/views/rule/dataTransfer/index.vue index f33fd16..e53bf2e 100644 --- a/xiuosiot-frontend/src/views/rule/dataTransfer/index.vue +++ b/xiuosiot-frontend/src/views/rule/dataTransfer/index.vue @@ -159,7 +159,7 @@ export default { data() { return { date: '', - list: [{}], + list: [], form: { topic: '', content: '',