Tang 1 жил өмнө
parent
commit
8a6d3eb142

+ 7 - 43
src/components/header1/index.vue

@@ -13,43 +13,7 @@
       <nav class="nav">
         <ul class="list">
           <li v-for="(item, index) in showNav(nav)" :key="index">
-            <a v-if="item.name == '首页'" @click="go('/index')">首页</a>
-            <a
-              v-if="item.name == '关于我们'"
-              @click="go('/about')"
-              :style="$route.path === '/about' ? 'color:red;' : ''"
-              >关于我们</a
-            >
-            <a
-              v-if="item.name == '课程'"
-              @click="go('/course-list')"
-              :style="$route.path === '/course-list' ? 'color:red;' : ''"
-              >课程</a
-            >
-            <a
-              v-if="item.name == '直播'"
-              @click="go('/live-list')"
-              :style="$route.path === '/live-list' ? 'color:red;' : ''"
-              >直播</a
-            >
-            <a
-              v-if="item.name == '题库'"
-              @click="go('/bank-list')"
-              :style="$route.path === '/bank-list' ? 'color:red;' : ''"
-              >题库</a
-            >
-            <a
-              v-if="item.name == '资料'"
-              @click="go('/handout-list')"
-              :style="$route.path === '/handout-list' ? 'color:red;' : ''"
-              >资料</a
-            >
-            <a
-              v-if="item.name == '积分'"
-              @click="go('/points-list')"
-              :style="$route.path === '/points-list' ? 'color:red;' : ''"
-              >积分</a
-            >
+            <a @click="go(item.path)" :style="$route.path === item.path ? 'color:red;' : ''">{{ item.name }}</a>
           </li>
         </ul>
       </nav>
@@ -479,12 +443,12 @@ export default {
       }
     },
     go(path, query) {
-      if (path === this.$route.path) {
-        this.$router.push({
-          path: "refresh" //refresh路由地址和当前要刷新路由地址同级即可
-        });
-        return;
-      }
+      // if (path === this.$route.path) {
+      //   this.$router.push({
+      //     path: "refresh" //refresh路由地址和当前要刷新路由地址同级即可
+      //   });
+      //   return;
+      // }
       this.$router.push({
         path,
         query

+ 2 - 28
src/components/header2/index.vue

@@ -13,8 +13,8 @@
             <li
               v-for="(item, index) in showNav(nav)"
               :key="index"
-              @click="go(item.url)"
-              :class="item.url == $route.path ? 'active' : ''"
+              @click="go(item.path)"
+              :class="item.path == $route.path ? 'active' : ''"
               :style="beauf_li(collapse, nav_beauf)"
             >
               {{ item.name }}
@@ -140,32 +140,6 @@ export default {
         if (list) {
           newList = list
             .filter(item => {
-              switch (item.name) {
-                case "首页":
-                  item.url = "/home";
-                  break;
-                case "关于我们":
-                  item.url = "/about";
-                  break;
-                case "课程":
-                  item.url = "/course-list";
-                  break;
-                case "题库":
-                  item.url = "/bank-list";
-                  break;
-                case "直播":
-                  item.url = "/live-list";
-                  break;
-                case "资料":
-                  item.url = "/handout-list";
-                  break;
-                case "积分商城":
-                  item.url = "/points-list";
-                  break;
-
-                default:
-                  break;
-              }
               return item.status === 1;
             })
             .sort((a, b) => a.sort - b.sort);

+ 12 - 48
src/pages/home1/index.vue

@@ -96,51 +96,9 @@
       <div class="container">
         <div class="tabs">
           <template v-for="(item, index) in showNav(nav)">
-            <a v-if="item.name === '首页'" :key="index" class="tab active"
-              >首页</a
-            >
-            <a
-              v-if="item.name === '关于我们'"
-              :key="index"
-              class="tab"
-              @click="go('/about')"
-              >关于我们</a
-            >
-            <a
-              v-if="item.name === '课程'"
-              :key="index"
-              class="tab"
-              @click="go('/course-list')"
-              >课程</a
-            >
-            <a
-              v-if="item.name === '题库'"
-              :key="index"
-              class="tab"
-              @click="go('/bank-list')"
-              >题库</a
-            >
-            <a
-              v-if="item.name === '直播'"
-              :key="index"
-              class="tab"
-              @click="go('/live-list')"
-              >直播</a
-            >
-            <a
-              v-if="item.name === '资料'"
-              :key="index"
-              class="tab"
-              @click="go('/handout-list')"
-              >资料</a
-            >
-            <a
-              v-if="item.name === '积分'"
-              :key="index"
-              class="tab"
-              @click="go('/points-list')"
-              >积分</a
-            >
+            <a class="tab" @click="go(item.path)" :key="index">{{
+              item.name
+            }}</a>
           </template>
         </div>
       </div>
@@ -430,7 +388,10 @@
       </div>
     </section>
 
-    <section class="course" v-if="$store.state.other.course == 1 &&courseName.length > 0">
+    <section
+      class="course"
+      v-if="$store.state.other.course == 1 && courseName.length > 0"
+    >
       <div class="container">
         <div class="course__header">
           <div class="lefts">
@@ -515,7 +476,10 @@
       </div>
     </section>
 
-    <section class="bank" v-if="$store.state.other.bank == 1 &&bankName.length > 0">
+    <section
+      class="bank"
+      v-if="$store.state.other.bank == 1 && bankName.length > 0"
+    >
       <div class="container">
         <div class="bank__header">
           <div class="lefts">
@@ -687,7 +651,7 @@ export default {
     RebuildModal
   },
   computed: {
-    ...mapGetters(["userInfo", "token", "header","nav", "msgCount", "mobile"]),
+    ...mapGetters(["userInfo", "token", "header", "nav", "msgCount", "mobile"]),
 
     showNav: function() {
       return function(list) {

+ 3 - 3
src/pages/person-center/my-course/index.vue

@@ -126,7 +126,7 @@
                     >
                       初审已通过
                     </div>
-                    <template class="note" v-else-if="item.periodStatus == 1">
+                    <template v-else-if="item.periodStatus == 1">
                       <div class="note note--green" v-if="item.periodPlush > 0">
                         初审完成
                       </div>
@@ -603,13 +603,13 @@
                 $store.state.userInfo.eduPhone
               }},学时查询网址:http://gdzczx.gdcic.net
             </div>
-            <div
+            <!-- <div
               class="course-item__footer"
               style="color: red;"
               v-if="item.periodStatus === 1 && !sevenFunc(item)"
             >
               温馨提示:您的班级学习初审已通过,待广东省建设信息中心归集学时,归集完成即为完成本次继续教育学习。归集学时需约10-15个工作日,具体以广东省建设执业资格注册服务平台的“继续教育学时查询”公布学时记录为准,学时查询网址:http://gdzczx.gdcic.net
-            </div>
+            </div> -->
           </div>
         </el-main>
 

+ 1 - 1
src/router/index.js

@@ -73,7 +73,7 @@ const router = new Router({
     },
     {
       path: '/about',
-      name: '关于我们',
+      name: '我们',
       component: resolve => require(['@/pages/about/index'], resolve),
       meta: {
         title: '-建造师造价师在线教育培训报名报考平台',