shaogen1995 3 years ago
parent
commit
746ec07fa3

BIN
web/public/data/About/Events/1.jpg


BIN
web/public/data/About/Events/2.jpg


BIN
web/public/data/About/Events/3.jpg


BIN
web/public/data/About/Events/4.jpg


BIN
web/public/data/About/Events/5.jpg


BIN
web/public/data/About/Events/in/1.png


BIN
web/public/data/About/Events/in/2.png


BIN
web/public/data/About/Events/in/3.png


BIN
web/public/data/About/Events/in/4.png


BIN
web/public/data/About/Events/in/5.png


BIN
web/public/data/About/Events/in/6.png


BIN
web/public/data/About/Events/toTop.jpg


BIN
web/public/data/About/eve.gif


+ 13 - 0
web/src/router/index.js

@@ -191,6 +191,19 @@ const routes = [
         component: () => import('../views/About/link.vue'),
         meta: { myName: 'About' },
       },
+      // 非顶部导航的事件页面
+      {
+        path: '/Layout/Events',
+        name: 'Events',
+        component: () => import('../views/Events/index.vue'),
+        meta: { myName: 'Events' },
+      },
+      {
+        path: '/Layout/EventsInfo/:id',
+        name: 'EventsInfo',
+        component: () => import('../views/Events/info.vue'),
+        meta: { myName: 'Events' },
+      },
     ]
   }
 ]

+ 157 - 0
web/src/views/Events/index.vue

@@ -0,0 +1,157 @@
+<!--  -->
+<template>
+  <div class="Events">
+    <div class="ban"></div>
+    <div class="pos">
+      <span class="pos1">Your Position:&nbsp;</span>
+      <Router-link to="/Layout/Home">Home></Router-link>
+      <Router-link to="/Layout/Events">Events></Router-link>
+    </div>
+    <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="" />
+          <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>
+        </li>
+      </ul>
+    </div>
+  </div>
+</template>
+
+<script>
+import {About} from '../dataAll'
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  data() {
+    //这里存放数据
+    return {
+      data:[]
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    skip(id){
+      this.$router.push(`/Layout/EventsInfo/${id}`)
+    }
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.data = About.Events
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.Events {
+  .ban {
+    width: 100%;
+    margin: auto;
+    background: url("/data/About/banner.jpg") no-repeat center top #000000;
+    height: 300px;
+  }
+  .pos {
+    height: 28px;
+    line-height: 28px;
+    font-size: 12px;
+    margin: 0 auto 10px auto;
+    width: 1180px;
+    .pos1 {
+      color: #c20e11;
+    }
+  }
+  .conten {
+    background-color: #fff;
+    width: 1180px;
+    margin: 0 auto 60px auto;
+    padding: 20px 0 40px 0;
+    .cTitle {
+      font-weight: 700;
+      font-family: Georgia;
+      font-size: 40px;
+      color: #151313;
+      line-height: 58px;
+      background: url("/data/About/eve.gif") repeat-x left bottom;
+      text-align: center;
+      width: 900px;
+      margin: 0 auto 30px auto;
+      padding-bottom: 7px;
+    }
+    & > ul {
+      width: 900px;
+      margin: 0 auto;
+      & > li {
+        cursor: pointer;
+        box-shadow: 0 5px 5px rgba(0,0,0,.5);
+        height: 450px;
+        margin-bottom: 40px;
+        position: relative;
+        & > img {
+          width: 100%;
+          height: 100%;
+          object-fit: cover;
+          border: none;
+          vertical-align: top;
+        }
+        .item {
+          text-align: center;
+          width: 532px;
+          position: absolute;
+          left: 184px;
+          top: 125px;
+          & > h2 {
+            font-weight: 700;
+            font-family: Helvetica;
+            font-size: 24px;
+            color: #fff;
+            line-height: 30px;
+            border-bottom: 4px solid rgba(255, 255, 255, 0.7);
+            padding-bottom: 15px;
+            /deep/ span{
+              color: #c20e11;
+            }
+          }
+          .s {
+            font-family: Georgia;
+            font-size: 16px;
+            color: rgba(255, 255, 255, 0.7);
+            line-height: 20px;
+            padding: 15px 0;
+            /deep/ p {
+              width: 350px;
+              text-align: left;
+              color: rgba(255, 255, 255, 0.7);
+              margin: 0 auto;
+            }
+          }
+          .d {
+            font-family: Georgia;
+            font-size: 16px;
+            color: #fff;
+            line-height: 20px;
+            font-style: italic;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 243 - 0
web/src/views/Events/info.vue

@@ -0,0 +1,243 @@
+<!--  -->
+<template>
+  <div class="EventsInfo">
+    <!-- 回到顶部 -->
+    <div class="topBtn" @click="toTop">
+      <img src="/data/About/Events/toTop.jpg" alt="" />
+    </div>
+    <div class="conten">
+      <img class="topBan" :src="`/data/About/Events/${info.id}.jpg`" alt="" />
+      <div class="main">
+        <div class="pos">
+          <span>Your Position:&nbsp;</span>
+          <Router-link to="/Layout/Home">Home></Router-link>
+          <Router-link to="/Layout/Events">Events></Router-link>
+        </div>
+        <div class="title">
+          <div class="left">
+            <h3 v-html="info.h3"></h3>
+            <div class="txt" v-html="info.txt"></div>
+          </div>
+          <div class="right">
+            <div>Date:</div>
+            <p>{{ info.i }}</p>
+          </div>
+        </div>
+        <div class="txtMain" v-html="info.main"></div>
+      </div>
+    </div>
+    <!-- 底部的更多 -->
+    <div class="other">
+      <h2>View Other Events</h2>
+      <ul>
+        <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>
+      </ul>
+    </div>
+  </div>
+</template>
+
+<script>
+// <p class='xx'>111111111</p> <p>111111111</p> <img src='/data/About/Events/in/00.png'/>
+import { About } from "../dataAll";
+
+export default {
+  name: "EventsInfo",
+  components: {},
+  data() {
+    //这里存放数据
+    return {
+      info: {},
+      other: [],
+    };
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    // 点击其他更多
+    cutOther(id){
+      this.$router.push(`/Layout/EventsInfo/${id}`)
+      this.getData()
+    },
+    // 点击回到顶部
+    toTop() {
+      window.scrollTo({ top: 0, behavior: "smooth" });
+    },
+    // 封装获取id和改变数据的方法
+    getData() {
+      let id = this.$route.params.id;
+      id = Number(id);
+      About.Events.forEach((v) => {
+        if (v.id === id) this.info = v;
+      });
+      // 底部更多模块
+      this.other = About.Events.filter((v) => {
+        return v.id !== id;
+      });
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.getData();
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='less' scoped>
+.EventsInfo {
+  .topBtn {
+    margin-left: 450px;
+    position: fixed;
+    left: 50%;
+    bottom: 100px;
+    z-index: 9999;
+    cursor: pointer;
+  }
+  .conten {
+    clear: both;
+    width: 100%;
+    padding-top: 240px;
+    .topBan {
+      position: absolute;
+      left: 50%;
+      top: 40px;
+      transform: translateX(-50%);
+      width: 1180px;
+      height: 450px;
+      object-fit: cover;
+      z-index: -1;
+    }
+    .main {
+      width: 900px;
+      margin: 0 auto;
+      .pos {
+        font-size: 12px;
+        background: #fff;
+        padding: 5px 0 5px 30px;
+      }
+      .title {
+        width: 100%;
+        display: flex;
+        .left {
+          background-color: #f4f4f4;
+          width: 606px;
+          & > h3 {
+            font-weight: 700;
+            font-family: helvetica;
+            font-size: 36px;
+            color: #000;
+            line-height: 36px;
+            padding: 40px 30px 15px 30px;
+            /deep/ span {
+              color: #c20e11;
+            }
+          }
+          .txt {
+            font-family: Georgia;
+            font-size: 16px;
+            line-height: 20px;
+            padding: 0 30px 20px 30px;
+            /deep/ p {
+              width: 350px;
+              text-align: left;
+              color: #000;
+              margin: 0 auto;
+            }
+          }
+        }
+        .right {
+          background-color: #353535;
+          width: 294px;
+          font-family: Georgia;
+          font-size: 30px;
+          color: #fff;
+          line-height: 30px;
+          padding: 40px 20px;
+          & > div {
+            font-size: 36px;
+            line-height: 40px;
+            margin-bottom: 30px;
+          }
+        }
+      }
+      .txtMain {
+        background-color: #fff;
+        font-family: arial, helvetica, sans-serif;
+        font-size: 16px;
+        color: #000;
+        line-height: 2em;
+        text-align: justify;
+        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.5);
+        clear: both;
+        padding: 40px 30px;
+        /deep/ p {
+          margin-bottom: 30px;
+        }
+        /deep/ .xx {
+          font-weight: 700;
+          text-align: center;
+        }
+        /deep/img {
+          display: block;
+          margin: 0px auto 30px;
+        }
+      }
+    }
+  }
+  .other {
+    width: 900px;
+    overflow: hidden;
+    margin: 60px auto;
+    & > h2 {
+      font-weight: 700;
+      font-family: Helvetica;
+      font-size: 30px;
+      line-height: 54px;
+      text-align: center;
+      border-bottom: 5px solid #bb1b21;
+      margin-bottom: 20px;
+    }
+    & > ul {
+      width: 930px;
+      display: flex;
+      flex-wrap: wrap;
+      & > li {
+        cursor: pointer;
+        background-color: #fff;
+        width: 435px;
+        margin-right: 30px;
+        margin-bottom: 30px;
+        & > img {
+          width: 100%;
+          height: 210px;
+          object-fit: cover;
+        }
+        .txt {
+          font-weight: 700;
+          font-family: Helvetica;
+          font-size: 24px;
+          color: #000;
+          line-height: 30px;
+          padding: 30px 20px 20px 20px;
+          /deep/ span {
+            color: rgb(255, 0, 0);
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 27 - 6
web/src/views/Home/index.vue

@@ -3,12 +3,16 @@
     <!-- 轮播组件 -->
     <el-carousel>
       <el-carousel-item v-for="item in 4" :key="item">
-        <img :src="require(`@/assets/images/swiper${item}.jpg`)" alt="" />
+        <img
+          :src="require(`@/assets/images/swiper${item}.jpg`)"
+          alt=""
+          @click="skip(item)"
+        />
       </el-carousel-item>
     </el-carousel>
     <!-- 底部 -->
     <div class="bottomNav">
-      <div class="t1">
+      <div class="t1" @click="$router.push('/Layout/Visit/2')">
         <div class="title">
           <span>Reservation</span>
         </div>
@@ -31,7 +35,7 @@
           </div>
         </div>
       </div>
-      <div class="t2">
+      <div class="t2" @click="$router.push('/Layout/Visit/1')">
         <div class="title">
           <span>Visit Info</span>
         </div>
@@ -48,7 +52,7 @@
           </div>
         </div>
       </div>
-      <div class="t3">
+      <div class="t3" @click="botskip()">
         <div class="title">
           <span>Partners & Connections</span>
         </div>
@@ -61,7 +65,7 @@
           </div>
         </div>
       </div>
-      <div class="t4">
+      <div class="t4" @click="$router.push('/Layout/Events')">
         <div class="title">
           <span>Events</span>
         </div>
@@ -91,7 +95,23 @@ export default {
   //监控data中的数据变化
   watch: {},
   //方法集合
-  methods: {},
+  methods: {
+    skip(val) {
+      let temp = "";
+      if (val === 1) temp = "/Layout/ExhibitionsInfo?id=1&k=1";
+      else if (val === 2) temp = "/Layout/Collections/Bronzes";
+      else if (val === 3) temp = "/Layout/ExhibitionsInfo?id=10&k=2";
+      else if (val === 4) temp = "/Layout/Publications/2";
+      this.$router.push(temp);
+    },
+    // 底部的跳转
+    botskip() {
+      this.$router.push("/Layout/About").catch(() => {});
+      setTimeout(() => {
+        window.scrollTo({ top: 1307, behavior: "smooth" });
+      }, 100);
+    },
+  },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
@@ -116,6 +136,7 @@ export default {
     width: 100%;
     height: 100%;
     object-fit: cover;
+    cursor: pointer;
   }
   .bottomNav {
     padding: 0 100px;

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