123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <template>
- <div class="Home">
- <div class="one">
- <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
- <van-swipe-item v-for="item in topImg" :key="item.id">
- <img
- @click="skip(item.path)"
- class="topImg"
- :src="require(`@/assets/img/Layout/banner${item.id}.png`)"
- alt=""
- />
- </van-swipe-item>
- </van-swipe>
- </div>
- <div class="main">
- <div class="tow">
- <div class="towTop">
- <img src="../../assets/img/Layout/title.png" alt="" />
- <h3>Visit Info.</h3>
- </div>
- <div class="towTxt">
- <h3>Opening Hours 09:00-17:00</h3>
- <p>
- No admission after 16:00 <br />Closed on Mondays(Except for
- holidays)
- </p>
- </div>
- <div class="towTxt">
- <h3>Individual visitors:</h3>
- <p>+86 (10) 63393339</p>
- </div>
- <div class="towTxt">
- <h3>Group visitors:</h3>
- <p>+86 (10) 63370458</p>
- </div>
- <ul class="row">
- <li v-for="item in vData" :key="item.id" @click="skip(item.path)">
- <img :src="require(`@/assets/img/Layout/v${item.id}.png`)" alt="" />
- <p>{{ item.name }}</p>
- </li>
- </ul>
- </div>
- <div class="three">
- <div class="towTop">
- <img src="../../assets/img/Layout/title.png" alt="" />
- <h3>Partners & Connections</h3>
- </div>
- <ul class="row">
- <li v-for="(item, index) in link" :key="index">
- <a :href="item" target="_blank">
- <img
- :src="require(`@/assets/img/Layout/link${index + 1}.jpg`)"
- alt=""
- />
- </a>
- </li>
- </ul>
- <div class="more" @click="$router.push('/Layout/AboutLink')">
- See More
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "Home",
- components: {},
- data() {
- //这里存放数据
- return {
- topImg: [
- // { id: 1, path: "/Layout/Detail?id=1&k=3" },
- { id: 8, path: "/Layout/Detail?id=60&k=1" },
- { id: 7, path: "/Layout/Detail?id=11&k=2" },
- { id: 6, path: "/Layout/Detail?id=58&k=1" },
- { id: 2, path: "/Layout/Collections/Bronzes" },
- { id: 3, path: "/Layout/Detail?id=10&k=2" },
- { id: 4, path: "/Layout/Publications/Catalogues" },
- ],
- vData: [
- {
- id: 1,
- name: "Hours, Direction & Admission",
- path: "/Layout/Visit/1",
- },
- { id: 2, name: "Floor Plans", path: "/Layout/Visit/3" },
- { id: 3, name: "Audio Guide & Tour", path: "/Layout/Visit/4" },
- { id: 4, name: "Accessibility", path: "/Layout/Visit/5" },
- { id: 5, name: "Café & Shop", path: "/Layout/Visit/6" },
- { id: 6, name: "Visitor Guidelines", path: "/Layout/Visit/7" },
- ],
- link: [
- "http://www.edo-tokyo-museum.or.jp/en/",
- "https://en.shm.ru/",
- "https://www.rom.on.ca/en",
- "https://museum.seoul.go.kr/eng/index.do",
- "https://museumsvictoria.com.au/",
- "https://www.vmfa.museum/",
- ],
- };
- },
- //监听属性 类似于data概念
- computed: {},
- //监控data中的数据变化
- watch: {},
- //方法集合
- methods: {
- skip(path) {
- this.$router.push(path).catch(() => {});
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {},
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang="less" scoped>
- .Home {
- width: 100%;
- // padding-top: 50px;
- .one {
- width: 100%;
- .my-swipe {
- width: 100%;
- .topImg {
- width: 100%;
- }
- }
- }
- .main {
- padding: 0 15px;
- padding-bottom: 40px;
- background: url("../../assets/img/Layout/bg.png");
- background-size: 100% 100%;
- .towTop {
- display: flex;
- align-items: center;
- margin-bottom: 24px;
- & > img {
- width: 41px;
- height: 29px;
- margin-right: 20px;
- }
- & > h3 {
- color: #c1aa7b;
- font-size: 22px;
- }
- }
- .tow {
- padding: 40px 0;
- border-bottom: 1px solid #ccc;
- .towTxt {
- padding: 0 0px 0 61px;
- margin-bottom: 24px;
- & > h3 {
- font-weight: 400;
- color: #bc1c24;
- font-size: 18px;
- margin-bottom: 5px;
- }
- & > p {
- color: #6a6a6a;
- font-size: 14px;
- line-height: 16px;
- }
- }
- .row {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- & > li {
- padding-top: 5px;
- background: url("../../assets/img/Layout/frame.png");
- background-size: 100% 100%;
- width: 161px;
- height: 70px;
- text-align: center;
- margin-bottom: 10px;
- color: #c1aa7b;
- &:nth-of-type(1) {
- color: #bc1c24;
- }
- & > p {
- font-family: "Franklin Gothic Medium", "Arial Narrow", Arial,
- sans-serif;
- font-size: 12px;
- line-height: 12px;
- text-align: center;
- }
- }
- }
- }
- .three {
- border-bottom: 1px solid #ccc;
- padding: 40px 0;
- .row {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- & > li {
- width: 168px;
- height: 62px;
- margin-bottom: 10px;
- & > a {
- display: block;
- width: 100%;
- height: 100%;
- & > img {
- width: 100%;
- }
- }
- }
- }
- .more {
- margin: 20px auto 0;
- width: 117px;
- height: 37px;
- background: url("../../assets/img/Layout/see.png");
- background-size: 100% 100%;
- color: #c1aa7b;
- line-height: 40px;
- text-align: center;
- }
- }
- }
- }
- @media screen and (max-width: 370px) {
- .main {
- padding: 0 8px 40px !important;
- }
- .row {
- display: block !important;
- & > li {
- margin: 0 auto 10px !important;
- }
- }
- }
- </style>
|