shaogen1995 3 years ago
parent
commit
4ef0552b2f
3 changed files with 24 additions and 20 deletions
  1. 13 14
      web/src/views/Events/index.vue
  2. 9 5
      web/src/views/Events/info.vue
  3. 2 1
      web/src/views/dataAll.js

+ 13 - 14
web/src/views/Events/index.vue

@@ -10,13 +10,12 @@
     <div class="conten">
       <h1 class="cTitle">EVENTS</h1>
       <ul>
-        <li v-for="(item,index) in data" :key="index" @click="skip(item.id)">
-          <img :src="`/data/About/Events/${index+1}.jpg`" alt="" />
+        <li v-for="(item, index) in data" :key="index" @click="skip(item.id)">
+          <img :src="`/data/About/Events/${index + 1}.jpg`" alt="" />
           <div class="item">
             <h2 v-html="item.h3"></h2>
-            <div class="s" v-html="item.txt">
-            </div>
-            <i class="d">Date:{{item.i}}</i>
+            <div class="s" v-html="item.txt"></div>
+            <i class="d">Date:{{ item.i }}</i>
           </div>
         </li>
       </ul>
@@ -25,14 +24,14 @@
 </template>
 
 <script>
-import {About} from '../dataAll'
+import { About } from "../dataAll";
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
   data() {
     //这里存放数据
     return {
-      data:[]
+      data: [],
     };
   },
   //监听属性 类似于data概念
@@ -41,13 +40,13 @@ export default {
   watch: {},
   //方法集合
   methods: {
-    skip(id){
-      this.$router.push(`/Layout/EventsInfo/${id}`)
-    }
+    skip(id) {
+      this.$router.push(`/Layout/EventsInfo/${id}`);
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    this.data = About.Events
+    this.data = About.Events;
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
@@ -100,7 +99,7 @@ export default {
       margin: 0 auto;
       & > li {
         cursor: pointer;
-        box-shadow: 0 5px 5px rgba(0,0,0,.5);
+        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.5);
         height: 450px;
         margin-bottom: 40px;
         position: relative;
@@ -125,8 +124,8 @@ export default {
             line-height: 30px;
             border-bottom: 4px solid rgba(255, 255, 255, 0.7);
             padding-bottom: 15px;
-            /deep/ span{
-              color: #c20e11;
+            /deep/ span {
+              color: rgb(255, 0, 0);
             }
           }
           .s {

+ 9 - 5
web/src/views/Events/info.vue

@@ -30,7 +30,11 @@
     <div class="other">
       <h2>View Other Events</h2>
       <ul>
-        <li v-for="(item, index) in other" :key="index" @click="cutOther(item.id)">
+        <li
+          v-for="(item, index) in other"
+          :key="index"
+          @click="cutOther(item.id)"
+        >
           <img :src="`/data/About/Events/${item.id}.jpg`" alt="" />
           <div class="txt" v-html="item.h3"></div>
         </li>
@@ -60,9 +64,9 @@ export default {
   //方法集合
   methods: {
     // 点击其他更多
-    cutOther(id){
-      this.$router.push(`/Layout/EventsInfo/${id}`)
-      this.getData()
+    cutOther(id) {
+      this.$router.push(`/Layout/EventsInfo/${id}`);
+      this.getData();
     },
     // 点击回到顶部
     toTop() {
@@ -142,7 +146,7 @@ export default {
             line-height: 36px;
             padding: 40px 30px 15px 30px;
             /deep/ span {
-              color: #c20e11;
+              color: rgb(255, 0, 0);
             }
           }
           .txt {

File diff suppressed because it is too large
+ 2 - 1
web/src/views/dataAll.js