index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <div class="welcome" v-if="isShow">
  3. <video
  4. class="myVideo"
  5. src="../../assets/img/strat.mp4"
  6. autoplay
  7. muted
  8. ></video>
  9. <div class="SeLanguage" :class="{active:languagShow}">
  10. <div class="box">
  11. <div class="top">
  12. <p>请选择语言</p>
  13. <p>Please select the language</p>
  14. </div>
  15. <div class="card">
  16. <div class="one" @click="skip('1171')">
  17. <div class="card_ic aaa"></div>
  18. <p>中文</p>
  19. </div>
  20. <div class="tow" @click="skip('1171_1')">
  21. <div class="card_ic bbb"></div>
  22. <p>English</p>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. isShow: false,
  34. languagShow: false,
  35. };
  36. },
  37. methods: {
  38. skip(val) {
  39. window.location.href =
  40. window.location.origin + window.location.pathname + "#/?m=" + val;
  41. location.reload(true);
  42. },
  43. },
  44. mounted() {
  45. if (window.location.hash === "#/") this.isShow = true;
  46. // 监听视频播放完毕
  47. this.$nextTick(() => {
  48. setTimeout(() => {
  49. let dom = document.querySelector(".myVideo");
  50. dom.addEventListener("ended", () => {
  51. this.languagShow=true
  52. }, false);
  53. }, 100);
  54. });
  55. },
  56. };
  57. </script>
  58. <style lang="less">
  59. .welcome {
  60. position: fixed;
  61. top: 0;
  62. left: 0;
  63. width: 100%;
  64. height: 100%;
  65. z-index: 9999;
  66. video {
  67. min-width: 100vw;
  68. min-height: 100vh;
  69. }
  70. .SeLanguage {
  71. opacity: 0;
  72. transition: all 1.5s;
  73. position: absolute;
  74. top: 0;
  75. left: 0;
  76. width: 100%;
  77. height: 100%;
  78. .box {
  79. padding-top: 110px;
  80. position: absolute;
  81. left: 50%;
  82. top: 50%;
  83. transform: translate(-50%, -50%);
  84. background: url("../../assets/img/bg.png");
  85. background-size: 100% 100%;
  86. width: 994px;
  87. height: 685px;
  88. .top {
  89. p {
  90. font-weight: 700;
  91. text-align: center;
  92. font-size: 40px;
  93. color: #165491;
  94. &:nth-of-type(2) {
  95. margin-top: 5px;
  96. font-weight: 400;
  97. font-size: 20px;
  98. }
  99. }
  100. }
  101. .card {
  102. perspective: 1000px;
  103. transform-style: preserve-3d;
  104. display: flex;
  105. justify-content: space-between;
  106. width: 615px;
  107. height: 366px;
  108. margin: 40px auto 0;
  109. & > div {
  110. transition: all 0.5s;
  111. cursor: pointer;
  112. border-radius: 8px;
  113. width: 264px;
  114. height: 100%;
  115. background-color: #fff;
  116. padding: 0 10px;
  117. .card_ic {
  118. height: 270px;
  119. border-bottom: 1px solid #165491;
  120. & > img {
  121. width: 107px;
  122. height: 97px;
  123. }
  124. }
  125. & > p {
  126. text-align: center;
  127. height: 96px;
  128. line-height: 96px;
  129. color: #165491;
  130. font-size: 24px;
  131. }
  132. .aaa {
  133. background: url("../../assets/img/cn2.png") no-repeat center
  134. center/107px 97px;
  135. }
  136. .bbb {
  137. background: url("../../assets/img/en2.png") no-repeat center
  138. center/107px 97px;
  139. }
  140. &:hover {
  141. transform: translateZ(50px);
  142. background-image: linear-gradient(#6ba5de, #165491);
  143. .card_ic {
  144. border-bottom: 1px solid #fff;
  145. }
  146. & > p {
  147. color: #fff;
  148. }
  149. .aaa {
  150. background: url("../../assets/img/cn2Ac.png") no-repeat center
  151. center/107px 97px;
  152. }
  153. .bbb {
  154. background: url("../../assets/img/en2Ac.png") no-repeat center
  155. center/107px 97px;
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. .active{
  163. opacity: 1;
  164. }
  165. }
  166. @media only screen and (max-width: 800px) {
  167. .welcome{
  168. .SeLanguage{
  169. .box{
  170. padding-top: 70px;
  171. width: 90vw;
  172. height: 534px;
  173. background: url('../../assets/imgM/bgL.png');
  174. background-size: 100% 100%;
  175. .top{
  176. &>p{
  177. font-size:24px;
  178. &:nth-of-type(2){
  179. font-size: 14px;
  180. }
  181. }
  182. }
  183. .card{
  184. margin-top: 20px;
  185. width: 239px;
  186. display: block;
  187. &>div{
  188. margin-bottom: 20px;
  189. width: 239px;
  190. height:162px;
  191. .card_ic{
  192. height: 119px;
  193. }
  194. .aaa {
  195. background: url("../../assets/img/cn2.png") no-repeat center
  196. center/59px 54px;
  197. }
  198. .bbb {
  199. background: url("../../assets/img/en2.png") no-repeat center
  200. center/59px 54px;
  201. }
  202. &>p{
  203. height: 43px;
  204. line-height: 43px;
  205. font-size: 14px;
  206. }
  207. }
  208. }
  209. }
  210. }
  211. }
  212. }
  213. </style>