Kaynağa Gözat

fuzhu video play - router config

hare8999@163.com 2 yıl önce
ebeveyn
işleme
14b55e4968

+ 21 - 3
src/router/index.js

@@ -510,10 +510,28 @@ export const constantRoutes = [{
       component: (resolve) => require(['@/views/career/plan/detail'], resolve),
       name: 'careerDetail',
       meta: {
-        title: '播放视频',
+        title: '生涯视频播放',
         parentPath: '/new-gaokao/careerVideo' // 用于直接跳转时定位菜单
       }
     },
+      {
+        path: '/fuzhu/play/gksp',
+        component: (resolve) => require(['@/views/career/plan/detail'], resolve),
+        name: 'careerDetail',
+        meta: {
+          title: '高考视频播放',
+          parentPath: '/fuzhu/index_gksp' // 用于直接跳转时定位菜单
+        }
+      },
+      {
+        path: '/fuzhu/play/gktf',
+        component: (resolve) => require(['@/views/career/plan/detail'], resolve),
+        name: 'careerDetail',
+        meta: {
+          title: '提分视频播放',
+          parentPath: '/fuzhu/index_gktf' // 用于直接跳转时定位菜单
+        }
+      },
       {
         path: '/career/gkmc/detail',
         component: (resolve) => require(['@/views/career/zhiyuan/gkmcDetail'], resolve),
@@ -607,7 +625,7 @@ export const constantRoutes = [{
         name: 'SubjectChoice',
         meta: {
           title: '由科目选专业',
-          parentPath: "/new-gaokao/careerSubjectIndex"
+          parentPath: '/new-gaokao/careerSubjectIndex'
         }
       },
       {
@@ -616,7 +634,7 @@ export const constantRoutes = [{
         name: 'UniversityDetail',
         meta: {
           title: '生涯评测-院校详情',
-          parentPath: "/new-gaokao/three/UniversitiesColleges"
+          parentPath: '/new-gaokao/three/UniversitiesColleges'
         }
       },
       {

+ 8 - 7
src/views/career/newGaokao/video.vue

@@ -4,7 +4,8 @@
       <el-row v-if="total > 0" :gutter="10">
         <el-col class="evaluation-card-wrapper" v-for="c in dataList" :key="c.id" :span="6">
           <el-card>
-            <course-card class="pointer" @click.native="detail(c)" :img="c.coverUrl" :title="c.title" :count="c.clicked"></course-card>
+            <course-card class="pointer" @click.native="detail(c)" :img="c.coverUrl" :title="c.title"
+                         :count="c.clicked"></course-card>
           </el-card>
         </el-col>
       </el-row>
@@ -31,17 +32,17 @@ export default {
         pageNum: 1
       },
       category: {
-        gksp: '高考视频',
-        gktf: '高考提分',
+        gksp: { name: '高考视频', playPath: '/fuzhu/play/gksp' },
+        gktf: { name: '高考提分', playPath: '/fuzhu/play/gktf' }
       },
       total: 0,
       dataList: []
     }
   },
   mounted() {
-    const subPaths = this.$route.path.split("/");
+    const subPaths = this.$route.path.split('/')
     const lastSubPath = subPaths[subPaths.length - 1]
-    const typeKey = lastSubPath.split("_")[lastSubPath.split("_").length - 1]
+    const typeKey = lastSubPath.split('_')[lastSubPath.split('_').length - 1]
     this.type = this.category[typeKey]
     this.getList()
   },
@@ -57,7 +58,7 @@ export default {
         img: item.coverUrl
       }
       this.$router.push({
-        path: '/career/plan/detail',
+        path: this.type.playPath,
         query: nextParams
       })
     },
@@ -70,7 +71,7 @@ export default {
     },
     getList() {
       gkVideo({
-        type: this.type,
+        type: this.type.name,
         tag: '',
         ...this.queryParams
       }).then(res => {

+ 1 - 1
src/views/index/components/index-card-gksp.vue

@@ -40,7 +40,7 @@ export default {
     getList() {
       gkVideo(this.queryParams).then(res => {
         this.list = res['rows']?.map((item, idx) => {
-          const path = '/career/plan/detail'
+          const path = '/fuzhu/play/gksp'
           const nextParams = {
             id: item.id,
             aliid: item.aliId,

+ 1 - 1
src/views/index/components/index-card-gktf.vue

@@ -40,7 +40,7 @@ export default {
     getList() {
       gkVideo(this.queryParams).then(res => {
         this.list = res['rows']?.map((item, idx) => {
-          const path = '/career/plan/detail'
+          const path = '/fuzhu/play/gktf'
           const nextParams = {
             id: item.id,
             aliid: item.aliId,