index.vue 12 KB

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