Browse Source

修复面包屑多级问题/积分规则页面搭建

yangzj 2 năm trước cách đây
mục cha
commit
254bce0955

+ 8 - 4
src/components/BannerBreadcrumb/index.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-11 13:44:08
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 13:46:59
+ * @LastEditTime: 2022-08-26 11:42:04
  * @FilePath: \veterans_client_web\src\components\BannerBreadcrumb\index.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -75,11 +75,15 @@ export default {
       let path = this.$router.currentRoute.path.slice(1),
         routerOptions = this.$router.options.routes[0].children,
         breadcrumbList = [],
-        pathList;
+        pathList,
+        newPathList = [];
       if (path) {
         pathList = path.split("/").filter((item) => item && item.trim());
-        pathList[pathList.length - 1] = path;
-        pathList.forEach((item) => {
+        newPathList.push(pathList[0])
+        for(let i = 1; i < pathList.length; i++) {
+          newPathList.push(newPathList[i-1] + '/' + pathList[i])
+        }
+        newPathList.forEach((item) => {
           routerOptions.forEach((jitem) => {
             if (item === jitem.path) {
               breadcrumbList.push({

+ 17 - 0
src/router/index.js

@@ -106,6 +106,14 @@ const routes = [
           title: '技能包'
         }
       },
+      {
+        path: 'skilltraining/skillpackage/selectedcourses',
+        name: 'SelectedCoursesIndex',
+        component: () => import('@/views/SkillTraining/SkillPackage/SelectedCourses/SelectedCoursesIndex.vue'),
+        meta: {
+          title: '精选课程'
+        }
+      },
       {
         path: 'coursevideo',
         name: 'CourseVideoIndex',
@@ -256,6 +264,15 @@ const routes = [
           title: '进步积分'
         }
       },
+      {
+        path: 'personalcenter/progresspoints/integralrule',
+        name: 'IntegralRuleIndex',
+        component: () =>
+          import('@/views/PersonalCenter/ProgressPoints/IntegralRule/IntegralRuleIndex.vue'),
+        meta: {
+          title: '积分规则'
+        }
+      },
       {
         path: 'applyeducationauth',
         name: 'ApplyEducationAuthIndex',

+ 24 - 0
src/views/PersonalCenter/ProgressPoints/IntegralRule/IntegralRuleIndex.vue

@@ -0,0 +1,24 @@
+<!--
+ * @Description: 进步积分 => 积分规则
+ * @Author: 空白格
+ * @Date: 2022-08-26 10:55:06
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-26 11:02:38
+ * @FilePath: \veterans_client_web\src\views\PersonalCenter\ProgressPoints\IntegralRule\IntegralRuleIndex.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div>
+    <BannerBreadcrumb title="线下课程" :isRouter="true" />
+  </div>
+</template>
+
+<script>
+import BannerBreadcrumb from "@/components/BannerBreadcrumb";
+export default {
+  name: '',
+  components: {
+    BannerBreadcrumb
+  }
+}
+</script>

+ 12 - 0
src/views/SkillTraining/SkillPackage/SelectedCourses/SelectedCoursesIndex.vue

@@ -0,0 +1,12 @@
+<!--
+ * @Description: 技能培训 => 技能包 => 精选课程
+ * @Author: 空白格
+ * @Date: 2022-08-26 10:48:52
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-26 10:48:52
+ * @FilePath: \veterans_client_web\src\views\SkillTraining\SkillPackage\SelectedCourses\SelectedCoursesIndex.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div>精选课程</div>
+</template>