Browse Source

路由跳转补充

zhousheng 6 years ago
parent
commit
f891ad44bb

+ 2 - 2
TEAMModelOS.SmartTeach/ClientApp/common/headers.vue

@@ -20,9 +20,9 @@
     data() {
       return {
         navlist: [
-          { "id": 1, "name": '首页', "url": '' },
+          { "id": 1, "name": '首页', "url": '/HomePage' },
           { "id": 2, "name": '资源', "url": '/resource' },
-          { "id": 3, "name": '名师', "url": '' },
+          { "id": 3, "name": '名师', "url": '/Teacher' },
           { "id": 4, "name": '活动', "url": '/activity' },
         ],
       }

+ 6 - 4
TEAMModelOS.SmartTeach/ClientApp/components/resource/teacherMap.vue

@@ -31,12 +31,11 @@
       </div>
       <div class="content-buttom">
 
-        <div class="teacher-item" style="cursor: pointer" v-for="item in teacherList">
+        <div class="teacher-item" style="cursor: pointer" v-for="item in teacherList" @click="teacherZone">
           <div class="t-title">
+            <!--<router-link to="/TeacherZone"></router-link>-->
             <span>{{item.provice}}</span>
-            <span>
-              {{item.title}}
-            </span>
+            <span>{{item.title}}</span>
           </div>
           <div class="img-content">
             <img src="http://www.wuhaneduyun.cn/uploads/snsPhotos/snscover/2019/0330/262/5c9f1ffb2b06c.png_00494494_200x200.jpg" class="th_pto">
@@ -220,6 +219,9 @@
       this.drawChart();
     },
     methods: {
+      teacherZone() {
+        this.$router.push('/TeacherZone')
+      },
       drawLine() {
         var mapChart = echarts.init(document.getElementById('myChart'));
         // mapChart的配置

+ 3 - 2
TEAMModelOS.SmartTeach/ClientApp/router/routes.js

@@ -29,8 +29,9 @@ import TeachActivies from '../components/resource/TeachActivies.vue'
 import TeachClass from '../components/resource/TeachClass.vue'
 import TeachTopclass from '../components/resource/TeachTopclass.vue'
 import text from '../components/resource/text.vue'
-export const routes = [  
-  { name: 'index', path: '/resource', component: Index },
+export const routes = [
+
+  { name: 'index', path: '/resource', redirect: "/HomePage", component: Index },
   { name: 'indexarea', path: '/arearesource', component: Indexarea },
   { name: 'Indexschool', path: '/schoolresource', component: Indexschool },
   { name: 'synch', path: '/synch', component: Synch },