Prechádzať zdrojové kódy

修改 进入new详情

wangguoyu 4 rokov pred
rodič
commit
3255d4fa73

+ 9 - 2
pages/courseware/index.vue

@@ -139,7 +139,9 @@
           <li style="font-size: 16px" v-for="(item, index) in topCarousels">
             <div>
               <img :src="topCarousels[0].pic" alt="新闻资讯" />
-              <h4>{{item.title}}<i></i></h4>
+              <h4 @click="checkInfo(item)">
+                <span>{{ item.yyyy }}</span>{{ item.title }}
+              </h4>
               <span>发布时间:{{item.yyyy }}-{{ item.mmdd }}</span>
               <p>{{ item.intro }}</p>
             </div>
@@ -389,7 +391,12 @@
     },
     computed:   {},
     methods:    {
-
+      checkInfo(data) {
+        const opt = {
+          id: data.code,
+        };
+        this.$router.push({ name: 'news-id', params: opt });
+      },
       clickBanner(data){
         if(data){
           window.open(data)

+ 10 - 1
pages/examsystem/index.vue

@@ -125,7 +125,9 @@
             <li style="font-size: 16px" v-for="(item, index) in topCarousels">
               <div>
                   <img :src="topCarousels[0].pic" alt="新闻资讯" />
-                  <h4>{{item.title}}<i></i></h4>
+                <h4 @click="checkInfo(item)">
+                  <span>{{ item.yyyy }}</span>{{ item.title }}
+                </h4>
                   <span>发布时间:{{item.yyyy }}-{{ item.mmdd }}</span>
                   <p>{{ item.intro }}</p>
               </div>
@@ -194,6 +196,13 @@
         }
 
       },
+
+      checkInfo(data) {
+        const opt = {
+          id: data.code,
+        };
+        this.$router.push({ name: 'news-id', params: opt });
+      },
     },
     created() {
 

+ 3 - 1
pages/index.vue

@@ -149,7 +149,9 @@
             <div class="industry-information-right">
               <ul>
                 <li v-for="(item, index) in topCarousels" v-if="index >= 1">
-                  <h4 @click="checkInfo(item)"><span>{{ item.yyyy }}</span>{{ item.title }}</h4>
+                  <h4 @click="checkInfo(item)">
+                    <span>{{ item.yyyy }}</span>{{ item.title }}
+                  </h4>
                   <p><span>{{ item.mmdd}}</span>{{ item.intro }}</p>
                 </li>
               </ul>

+ 9 - 1
pages/trainsystem/index.vue

@@ -147,7 +147,9 @@
           <li style="font-size: 16px" v-for="(item, index) in topCarousels">
             <div>
               <img :src="topCarousels[0].pic" alt="新闻资讯" />
-              <h4>{{item.title}}<i></i></h4>
+              <h4 @click="checkInfo(item)">
+                <span>{{ item.yyyy }}</span>{{ item.title }}
+              </h4>
               <span>发布时间:{{item.yyyy }}-{{ item.mmdd }}</span>
               <p>{{ item.intro }}</p>
             </div>
@@ -206,6 +208,12 @@
     },
     computed: {},
     methods:  {
+      checkInfo(data) {
+        const opt = {
+          id: data.code,
+        };
+        this.$router.push({ name: 'news-id', params: opt });
+      },
       clickBanner(data){
         if(data){
           window.open(data)