123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- <template>
- <div class="Home">
- <!-- 轮播组件 -->
- <el-carousel
- data-aria-viewport-area
- tabindex="0"
- aria-label
- aria-description="You've reached the slider section. This section has four image URLs. To browse the content, please use the tab key."
- >
- <!-- 新增的轮播图模块 -->
- <el-carousel-item key="11">
- <router-link
- to="/Layout/ExhibitionsInfo?id=64&k=2"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="The Greeks Agamemnon to Alexander the Great"
- >
- <img
- :src="require(`@/assets/images/swiper11.jpg`)"
- alt="The Greeks Agamemnon to Alexander the Great"
- />
- </router-link>
- </el-carousel-item>
- <el-carousel-item key="10">
- <router-link
- to="/Layout/ExhibitionsInfo?id=63&k=2"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="Four Seasons Album: Peking Folk Customs"
- >
- <img
- :src="require(`@/assets/images/swiper10.jpg`)"
- alt="Four Seasons Album: Peking Folk Customs"
- />
- </router-link>
- </el-carousel-item>
- <el-carousel-item key="7">
- <router-link
- to="/Layout/ExhibitionsInfo?id=11&k=2"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="Eternal Witness of Civilization: History of Beijing"
- >
- <img
- :src="require(`@/assets/images/swiper7.jpg`)"
- alt="Eternal Witness of Civilization: History of Beijing"
- />
- </router-link>
- </el-carousel-item>
- <el-carousel-item key="6">
- <router-link
- to="/Layout/ExhibitionsInfo?id=58&k=1"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="Splendid Central Axis of Beijing."
- >
- <img
- :src="require(`@/assets/images/swiper6.jpg`)"
- alt="Splendid Central Axis of Beijing."
- />
- </router-link>
- </el-carousel-item>
- </el-carousel>
- <!-- 底部 -->
- <div
- class="bottomNav"
- data-aria-viewport-area
- tabindex="0"
- aria-label
- aria-description="You've reached the pop-up window section; this section contains four URLs; please use the tab key to go through the content."
- >
- <div
- class="t1"
- @click="$router.push('/Layout/Visit/2')"
- tabindex="0"
- aria-label="Link"
- aria-description="Reservation"
- >
- <div class="title">
- <span class="aria-theme-independent"> Reservation </span>
- </div>
- <div class="info">
- <router-link
- class="p"
- to="/Layout/Visit/2"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="Reservation"
- >
- <img src="../../assets/images/bott1.jpg" alt="Reservation" />
- </router-link>
- <div class="d">
- <p class="n1 aria-theme-independent" tabindex="0">
- Online Reservation
- </p>
- <p class="n2 aria-theme-independent" tabindex="0">
- Telephone Reservation
- </p>
- <p class="n3" tabindex="0">
- Individual <span>+86 (10) 63393339</span>
- </p>
- <p class="n3" tabindex="0">Group <span>+86 (10) 63370458</span></p>
- </div>
- </div>
- </div>
- <div
- class="t2"
- @click="$router.push('/Layout/Visit/1')"
- tabindex="0"
- aria-label="Link"
- aria-description="Visit Info"
- >
- <div class="title">
- <span class="aria-theme-independent">Visit Info</span>
- </div>
- <div class="info">
- <router-link
- class="p"
- to="/Layout/Visit/1"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="Hours, Direction & Admission"
- >
- <img
- src="../../assets/images/bott2.jpg"
- alt="Hours, Direction & Admission"
- />
- </router-link>
- <div class="d">
- <p class="n4 aria-theme-independent" tabindex="0">
- Opening Hours 09:00-17:00
- </p>
- <p class="n5" tabindex="0">No admission after 16:00</p>
- <p class="n5" tabindex="0">Closed on Monday</p>
- <p class="n6 aria-theme-independent" tabindex="0">Phone</p>
- <p tabindex="0">+86 (10) 63370491</p>
- </div>
- </div>
- </div>
- <div
- class="t3"
- @click="botskip()"
- tabindex="0"
- aria-label="Link"
- aria-description="Partners & Connections"
- >
- <div class="title">
- <span class="aria-theme-independent">Partners & Connections</span>
- </div>
- <div class="info">
- <router-link
- class="p"
- to="/Layout/About"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="Partners & Connections"
- >
- <img
- src="../../assets/images/bott3.jpg"
- alt="Partners & Connections"
- />
- </router-link>
- <div class="d">
- <p class="n7 aria-theme-independent" tabindex="0">
- Partners & Connections
- </p>
- </div>
- </div>
- </div>
- <div
- class="t4"
- @click="$router.push('/Layout/Events')"
- tabindex="0"
- aria-label="Link"
- aria-description="Events"
- >
- <div class="title">
- <span class="aria-theme-independent">Events</span>
- </div>
- <div class="info">
- <router-link
- class="p"
- to="/Layout/Events"
- replace
- tabindex="0"
- aria-label="Image link"
- aria-description="Events"
- >
- <img src="../../assets/images/bott4.jpg" alt="Events" />
- </router-link>
- <div class="d">
- <p class="n8 aria-theme-independent" tabindex="0">Events</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "Home",
- components: {},
- data() {
- //这里存放数据
- return {};
- },
- //监听属性 类似于data概念
- computed: {},
- //监控data中的数据变化
- watch: {},
- //方法集合
- methods: {
- // 底部的跳转
- botskip() {
- this.$router.push("/Layout/About").catch(() => {});
- setTimeout(() => {
- window.scrollTo({ top: 1307, behavior: "smooth" });
- }, 100);
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- this.$eventBus.$emit(
- "request-read",
- `You've reached the Home Page, which features one navigation section, four window sections, and one interactive section. To choose a section, please hit the shortcut key.`
- );
- },
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang="less" scoped>
- .Home {
- position: relative;
- width: 100%;
- height: calc(100vh - 45px);
- background-color: black;
- img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- cursor: pointer;
- }
- .bottomNav {
- padding: 0 100px;
- background-color: rgba(0, 0, 0, 0.8);
- width: 100%;
- height: 55px;
- position: absolute;
- left: 0;
- bottom: 0;
- z-index: 4;
- display: flex;
- & > div {
- display: block;
- cursor: pointer;
- width: 25%;
- height: 58px;
- position: relative;
- transform: translateY(-3px);
- .title {
- font-size: 14px;
- color: #fff;
- line-height: 55px;
- text-align: center;
- width: 100%;
- span {
- padding-left: 30px;
- }
- }
- .info {
- transition: all 0.3s;
- height: 0;
- overflow: hidden;
- width: 100%;
- position: absolute;
- left: 0;
- bottom: 0;
- z-index: 99;
- .d {
- font-size: 14px;
- color: #ccc;
- background: #000;
- padding: 20px;
- }
- .p {
- display: block;
- img {
- vertical-align: bottom;
- }
- }
- }
- }
- .t1:hover .info {
- height: 320px;
- }
- .t2:hover .info {
- height: 320px;
- }
- .t3:hover .info {
- height: 270px;
- }
- .t4:hover .info {
- height: 270px;
- }
- .t1:focus-within .info {
- height: 320px;
- }
- .t2:focus-within .info {
- height: 320px;
- }
- .t3:focus-within .info {
- height: 270px;
- }
- .t4:focus-within .info {
- height: 270px;
- }
- .t1 {
- .title {
- span {
- background: url("../../assets/images/bottom_ico1.png") no-repeat left
- center;
- }
- }
- .p {
- border-bottom: 3px solid #1116e5;
- }
- border-top: 3px solid #1116e5;
- }
- .t2 {
- .title {
- span {
- background: url("../../assets/images/bottom_ico2.png") no-repeat left
- center;
- }
- }
- .p {
- border-bottom: 3px solid #a211e5;
- }
- border-top: 3px solid #a211e5;
- }
- .t3 {
- .title {
- span {
- background: url("../../assets/images/bottom_ico3.png") no-repeat left
- center;
- }
- }
- .p {
- border-bottom: 3px solid #229382;
- }
- .d {
- padding-top: 40px !important;
- padding-bottom: 40px !important;
- }
- border-top: 3px solid #229382;
- }
- .t4 {
- .title {
- span {
- background: url("../../assets/images/bottom_ico4.png") no-repeat left
- center;
- }
- }
- .p {
- border-bottom: 3px solid #7a9322;
- }
- .d {
- padding-top: 40px !important;
- padding-bottom: 40px !important;
- }
- border-top: 3px solid #7a9322;
- }
- p {
- margin-bottom: 5px;
- }
- .n1 {
- line-height: 30px;
- background: url(../../assets/images/bottom_sub_ico1.png) no-repeat left
- center;
- text-indent: 25px;
- & > a {
- color: #ff0000;
- text-decoration: underline;
- margin-left: 20px;
- }
- }
- .n2 {
- line-height: 30px;
- background: url(../../assets/images/bottom_sub_ico2.png) no-repeat left
- center;
- text-indent: 25px;
- margin-bottom: 10px;
- }
- .n3 {
- width: 200px;
- margin-bottom: 5px;
- & > span {
- float: right;
- }
- }
- .n4 {
- line-height: 30px;
- background: url(../../assets/images/bottom_sub_ico3.png) no-repeat left
- center;
- text-indent: 25px;
- }
- .n5 {
- font-size: 12px;
- color: #828282;
- margin-bottom: 0;
- }
- .n6 {
- line-height: 30px;
- background: url(../../assets/images/bottom_sub_ico2.png) no-repeat left
- center;
- text-indent: 25px;
- }
- .n7 {
- font-size: 18px;
- background: url(../../assets/images/bottom_ico3.png) no-repeat left center;
- padding-left: 30px;
- }
- .n8 {
- font-size: 18px;
- background: url(../../assets/images/bottom_ico4.png) no-repeat left center;
- padding-left: 30px;
- }
- }
- }
- </style>
|