diff --git a/element-vue/src/pages/test.vue b/element-vue/src/pages/test.vue index 5871ffb..30f5d51 100644 --- a/element-vue/src/pages/test.vue +++ b/element-vue/src/pages/test.vue @@ -9,20 +9,19 @@ <script> import {post} from "~/utils"; + export default { methods: { - async startHacking() { - this.$notify({ - title: 'It works!', - type: 'success', - message: 'We\'ve laid the ground work for you. It\'s time for you to build something epic!', - duration: 5000 - }) + this.$notify({ + title: 'It works!', + type: 'success', + message: 'We\'ve laid the ground work for you. It\'s time for you to build something epic!', + duration: 5000 + }) await post('lb/lab/test', { data: 'data' }) - } } } diff --git a/element-vue/src/router.js b/element-vue/src/router.js index 82d981f..eedb3d3 100644 --- a/element-vue/src/router.js +++ b/element-vue/src/router.js @@ -3,6 +3,9 @@ import VueRouter from "vue-router"; // 引入组件 import test from "~/pages/test"; +import teacher from "~/pages/teacher/index"; +import personal from "~/pages/teacher/personal"; +import personalMessage from "~/components/personalMessage"; // 要告诉 vue 使用 vueRouter Vue.use(VueRouter); @@ -15,6 +18,20 @@ const routes = [ { path: "/home", component: test + }, + { + path: "/teacher", + component: teacher, + children: [ + { + path: '', + component: test + }, + { + path: 'personal', + component: personal + } + ] } ]