index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <template>
  2. <div class="Home">
  3. <!-- 轮播组件 -->
  4. <el-carousel
  5. data-aria-viewport-area
  6. tabindex="0"
  7. aria-label
  8. aria-description="You've reached the slider section. This section has four image URLs. To browse the content, please use the tab key."
  9. >
  10. <el-carousel-item key="12">
  11. <router-link
  12. to="/Layout/ExhibitionsInfo?id=70&k=1"
  13. replace
  14. tabindex="0"
  15. aria-label="Image link"
  16. aria-description="Radiance: Ancient Gold Ornaments from the Mengdiexuan Collection of the Hong Kong Palace Museum"
  17. >
  18. <img
  19. :src="require(`@/assets/images/swiper12.jpg`)"
  20. alt="Radiance: Ancient Gold Ornaments from the Mengdiexuan Collection of the Hong Kong Palace Museum"
  21. />
  22. </router-link>
  23. </el-carousel-item>
  24. <el-carousel-item key="11">
  25. <router-link
  26. to="/Layout/ExhibitionsInfo?id=69&k=1"
  27. replace
  28. tabindex="0"
  29. aria-label="Image link"
  30. aria-description="Founding Yan: Liulihe Site in Fangshan"
  31. >
  32. <img
  33. :src="require(`@/assets/images/swiper11.jpg`)"
  34. alt="Founding Yan: Liulihe Site in Fangshan"
  35. />
  36. </router-link>
  37. </el-carousel-item>
  38. <el-carousel-item key="10">
  39. <router-link
  40. to="/Layout/ExhibitionsInfo?id=63&k=2"
  41. replace
  42. tabindex="0"
  43. aria-label="Image link"
  44. aria-description="Four Seasons Album: Peking Folk Customs"
  45. >
  46. <img
  47. :src="require(`@/assets/images/swiper10.jpg`)"
  48. alt="Four Seasons Album: Peking Folk Customs"
  49. />
  50. </router-link>
  51. </el-carousel-item>
  52. <el-carousel-item key="7">
  53. <router-link
  54. to="/Layout/ExhibitionsInfo?id=11&k=2"
  55. replace
  56. tabindex="0"
  57. aria-label="Image link"
  58. aria-description="Eternal Witness of Civilization: History of Beijing"
  59. >
  60. <img
  61. :src="require(`@/assets/images/swiper7.jpg`)"
  62. alt="Eternal Witness of Civilization: History of Beijing"
  63. />
  64. </router-link>
  65. </el-carousel-item>
  66. <el-carousel-item key="6">
  67. <router-link
  68. to="/Layout/ExhibitionsInfo?id=58&k=1"
  69. replace
  70. tabindex="0"
  71. aria-label="Image link"
  72. aria-description="Splendid Central Axis of Beijing."
  73. >
  74. <img
  75. :src="require(`@/assets/images/swiper6.jpg`)"
  76. alt="Splendid Central Axis of Beijing."
  77. />
  78. </router-link>
  79. </el-carousel-item>
  80. </el-carousel>
  81. <!-- 底部 -->
  82. <div
  83. class="bottomNav"
  84. data-aria-viewport-area
  85. tabindex="0"
  86. aria-label
  87. 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."
  88. >
  89. <div
  90. class="t1"
  91. @click="$router.push('/Layout/Visit/2')"
  92. tabindex="0"
  93. aria-label="Link"
  94. aria-description="Reservation"
  95. >
  96. <div class="title">
  97. <span class="aria-theme-independent"> Reservation </span>
  98. </div>
  99. <div class="info">
  100. <router-link
  101. class="p"
  102. to="/Layout/Visit/2"
  103. replace
  104. tabindex="0"
  105. aria-label="Image link"
  106. aria-description="Reservation"
  107. >
  108. <img src="../../assets/images/bott1.jpg" alt="Reservation" />
  109. </router-link>
  110. <div class="d">
  111. <p class="n1 aria-theme-independent" tabindex="0">
  112. Online Reservation
  113. </p>
  114. <p class="n2 aria-theme-independent" tabindex="0">
  115. Telephone Reservation
  116. </p>
  117. <p class="n3" tabindex="0">
  118. Individual <span>+86 (10) 63393339</span>
  119. </p>
  120. <p class="n3" tabindex="0">Group <span>+86 (10) 63370458</span></p>
  121. </div>
  122. </div>
  123. </div>
  124. <div
  125. class="t2"
  126. @click="$router.push('/Layout/Visit/1')"
  127. tabindex="0"
  128. aria-label="Link"
  129. aria-description="Visit Info"
  130. >
  131. <div class="title">
  132. <span class="aria-theme-independent">Visit Info</span>
  133. </div>
  134. <div class="info">
  135. <router-link
  136. class="p"
  137. to="/Layout/Visit/1"
  138. replace
  139. tabindex="0"
  140. aria-label="Image link"
  141. aria-description="Hours, Direction & Admission"
  142. >
  143. <img
  144. src="../../assets/images/bott2.jpg"
  145. alt="Hours, Direction & Admission"
  146. />
  147. </router-link>
  148. <div class="d">
  149. <p class="n4 aria-theme-independent" tabindex="0">
  150. Opening Hours 09:00-17:00
  151. </p>
  152. <p class="n5" tabindex="0">No admission after 16:00</p>
  153. <p class="n5" tabindex="0">Closed on Monday</p>
  154. <p class="n6 aria-theme-independent" tabindex="0">Phone</p>
  155. <p tabindex="0">+86 (10) 63370491</p>
  156. </div>
  157. </div>
  158. </div>
  159. <div
  160. class="t3"
  161. @click="botskip()"
  162. tabindex="0"
  163. aria-label="Link"
  164. aria-description="Partners & Connections"
  165. >
  166. <div class="title">
  167. <span class="aria-theme-independent">Partners & Connections</span>
  168. </div>
  169. <div class="info">
  170. <router-link
  171. class="p"
  172. to="/Layout/About"
  173. replace
  174. tabindex="0"
  175. aria-label="Image link"
  176. aria-description="Partners & Connections"
  177. >
  178. <img
  179. src="../../assets/images/bott3.jpg"
  180. alt="Partners & Connections"
  181. />
  182. </router-link>
  183. <div class="d">
  184. <p class="n7 aria-theme-independent" tabindex="0">
  185. Partners & Connections
  186. </p>
  187. </div>
  188. </div>
  189. </div>
  190. <div
  191. class="t4"
  192. @click="$router.push('/Layout/Events')"
  193. tabindex="0"
  194. aria-label="Link"
  195. aria-description="Events"
  196. >
  197. <div class="title">
  198. <span class="aria-theme-independent">Events</span>
  199. </div>
  200. <div class="info">
  201. <router-link
  202. class="p"
  203. to="/Layout/Events"
  204. replace
  205. tabindex="0"
  206. aria-label="Image link"
  207. aria-description="Events"
  208. >
  209. <img src="../../assets/images/bott4.jpg" alt="Events" />
  210. </router-link>
  211. <div class="d">
  212. <p class="n8 aria-theme-independent" tabindex="0">Events</p>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. </template>
  219. <script>
  220. export default {
  221. name: "Home",
  222. components: {},
  223. data() {
  224. //这里存放数据
  225. return {};
  226. },
  227. //监听属性 类似于data概念
  228. computed: {},
  229. //监控data中的数据变化
  230. watch: {},
  231. //方法集合
  232. methods: {
  233. // 底部的跳转
  234. botskip() {
  235. this.$router.push("/Layout/About").catch(() => {});
  236. setTimeout(() => {
  237. window.scrollTo({ top: 1307, behavior: "smooth" });
  238. }, 100);
  239. },
  240. },
  241. //生命周期 - 创建完成(可以访问当前this实例)
  242. created() {},
  243. //生命周期 - 挂载完成(可以访问DOM元素)
  244. mounted() {
  245. this.$eventBus.$emit(
  246. "request-read",
  247. `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.`
  248. );
  249. },
  250. beforeCreate() {}, //生命周期 - 创建之前
  251. beforeMount() {}, //生命周期 - 挂载之前
  252. beforeUpdate() {}, //生命周期 - 更新之前
  253. updated() {}, //生命周期 - 更新之后
  254. beforeDestroy() {}, //生命周期 - 销毁之前
  255. destroyed() {}, //生命周期 - 销毁完成
  256. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  257. };
  258. </script>
  259. <style lang="less" scoped>
  260. .Home {
  261. position: relative;
  262. width: 100%;
  263. height: calc(100vh - 45px);
  264. background-color: black;
  265. img {
  266. width: 100%;
  267. height: 100%;
  268. object-fit: contain;
  269. cursor: pointer;
  270. }
  271. .bottomNav {
  272. padding: 0 100px;
  273. background-color: rgba(0, 0, 0, 0.8);
  274. width: 100%;
  275. height: 55px;
  276. position: absolute;
  277. left: 0;
  278. bottom: 0;
  279. z-index: 4;
  280. display: flex;
  281. & > div {
  282. display: block;
  283. cursor: pointer;
  284. width: 25%;
  285. height: 58px;
  286. position: relative;
  287. transform: translateY(-3px);
  288. .title {
  289. font-size: 14px;
  290. color: #fff;
  291. line-height: 55px;
  292. text-align: center;
  293. width: 100%;
  294. span {
  295. padding-left: 30px;
  296. }
  297. }
  298. .info {
  299. transition: all 0.3s;
  300. height: 0;
  301. overflow: hidden;
  302. width: 100%;
  303. position: absolute;
  304. left: 0;
  305. bottom: 0;
  306. z-index: 99;
  307. .d {
  308. font-size: 14px;
  309. color: #ccc;
  310. background: #000;
  311. padding: 20px;
  312. }
  313. .p {
  314. display: block;
  315. img {
  316. vertical-align: bottom;
  317. }
  318. }
  319. }
  320. }
  321. .t1:hover .info {
  322. height: 320px;
  323. }
  324. .t2:hover .info {
  325. height: 320px;
  326. }
  327. .t3:hover .info {
  328. height: 270px;
  329. }
  330. .t4:hover .info {
  331. height: 270px;
  332. }
  333. .t1:focus-within .info {
  334. height: 320px;
  335. }
  336. .t2:focus-within .info {
  337. height: 320px;
  338. }
  339. .t3:focus-within .info {
  340. height: 270px;
  341. }
  342. .t4:focus-within .info {
  343. height: 270px;
  344. }
  345. .t1 {
  346. .title {
  347. span {
  348. background: url("../../assets/images/bottom_ico1.png") no-repeat left
  349. center;
  350. }
  351. }
  352. .p {
  353. border-bottom: 3px solid #1116e5;
  354. }
  355. border-top: 3px solid #1116e5;
  356. }
  357. .t2 {
  358. .title {
  359. span {
  360. background: url("../../assets/images/bottom_ico2.png") no-repeat left
  361. center;
  362. }
  363. }
  364. .p {
  365. border-bottom: 3px solid #a211e5;
  366. }
  367. border-top: 3px solid #a211e5;
  368. }
  369. .t3 {
  370. .title {
  371. span {
  372. background: url("../../assets/images/bottom_ico3.png") no-repeat left
  373. center;
  374. }
  375. }
  376. .p {
  377. border-bottom: 3px solid #229382;
  378. }
  379. .d {
  380. padding-top: 40px !important;
  381. padding-bottom: 40px !important;
  382. }
  383. border-top: 3px solid #229382;
  384. }
  385. .t4 {
  386. .title {
  387. span {
  388. background: url("../../assets/images/bottom_ico4.png") no-repeat left
  389. center;
  390. }
  391. }
  392. .p {
  393. border-bottom: 3px solid #7a9322;
  394. }
  395. .d {
  396. padding-top: 40px !important;
  397. padding-bottom: 40px !important;
  398. }
  399. border-top: 3px solid #7a9322;
  400. }
  401. p {
  402. margin-bottom: 5px;
  403. }
  404. .n1 {
  405. line-height: 30px;
  406. background: url(../../assets/images/bottom_sub_ico1.png) no-repeat left
  407. center;
  408. text-indent: 25px;
  409. & > a {
  410. color: #ff0000;
  411. text-decoration: underline;
  412. margin-left: 20px;
  413. }
  414. }
  415. .n2 {
  416. line-height: 30px;
  417. background: url(../../assets/images/bottom_sub_ico2.png) no-repeat left
  418. center;
  419. text-indent: 25px;
  420. margin-bottom: 10px;
  421. }
  422. .n3 {
  423. width: 200px;
  424. margin-bottom: 5px;
  425. & > span {
  426. float: right;
  427. }
  428. }
  429. .n4 {
  430. line-height: 30px;
  431. background: url(../../assets/images/bottom_sub_ico3.png) no-repeat left
  432. center;
  433. text-indent: 25px;
  434. }
  435. .n5 {
  436. font-size: 12px;
  437. color: #828282;
  438. margin-bottom: 0;
  439. }
  440. .n6 {
  441. line-height: 30px;
  442. background: url(../../assets/images/bottom_sub_ico2.png) no-repeat left
  443. center;
  444. text-indent: 25px;
  445. }
  446. .n7 {
  447. font-size: 18px;
  448. background: url(../../assets/images/bottom_ico3.png) no-repeat left center;
  449. padding-left: 30px;
  450. }
  451. .n8 {
  452. font-size: 18px;
  453. background: url(../../assets/images/bottom_ico4.png) no-repeat left center;
  454. padding-left: 30px;
  455. }
  456. }
  457. }
  458. </style>