index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <div class="wrapper">
  3. <div class="bgimg">
  4. <div class="con">
  5. <div class="btn" @click="enter">
  6. <span class="btn-txt">点击进入</span>
  7. </div>
  8. </div>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. import browser from "@/utils/browser.js";
  14. export default {
  15. components: {
  16. /* bg */
  17. },
  18. data() {
  19. return {
  20. isMobile: browser.mobile,
  21. state: false,
  22. cdn_url: "https://4dscene.4dage.com/ShaoShan/audios/",
  23. };
  24. },
  25. computed: {},
  26. watch: {},
  27. created() {
  28. // this.$showLoading();
  29. const that = this;
  30. this.$nextTick(() => {
  31. document.getElementById("startvideo").addEventListener("canplay", () => {
  32. that.$hideLoading();
  33. });
  34. });
  35. },
  36. mounted() {},
  37. methods:{
  38. enter() {
  39. this.$router.push('/ruins')
  40. }
  41. }
  42. };
  43. </script>
  44. <style lang="less" scoped>
  45. .wrapper {
  46. width: 100%;
  47. height: 100%;
  48. }
  49. .mobileLayout {
  50. width: 100vw;
  51. height: 100vh;
  52. position: fixed;
  53. left: 0;
  54. bottom: 10vh;
  55. .bg {
  56. width: 100%;
  57. height: 100%;
  58. }
  59. .logo {
  60. position: fixed;
  61. top: 5vw;
  62. left: 5vw;
  63. width: 40%;
  64. z-index: 100;
  65. }
  66. .search-bar {
  67. position: fixed;
  68. top: 5vw;
  69. right: 5vw;
  70. width: 30%;
  71. z-index: 100;
  72. }
  73. }
  74. .layout {
  75. position: relative;
  76. z-index: 9;
  77. width: 100%;
  78. height: 100%;
  79. .xlz-bg {
  80. position: absolute;
  81. top: 50%;
  82. z-index: 89;
  83. transform: translateY(-50%);
  84. }
  85. .bg {
  86. position: absolute;
  87. z-index: 999;
  88. width: 100%;
  89. height: 100%;
  90. object-fit: fill;
  91. left: 0;
  92. }
  93. .bgimg {
  94. position: absolute;
  95. z-index: 99;
  96. width: 100%;
  97. left: 0;
  98. height: 100%;
  99. background: url("../../assets/images/index-bg.png") no-repeat center center;
  100. background-size: cover;
  101. .con {
  102. left: 50%;
  103. top: 25%;
  104. width: 20%;
  105. height: 10%;
  106. margin-left: -10%;
  107. position: relative;
  108. .btn {
  109. margin: 0 auto;
  110. margin-top: 26px;
  111. width: 100%;
  112. height: 74px;
  113. line-height: 74px;
  114. text-align: center;
  115. background: url(../../assets/images/btn-bg.png) no-repeat;
  116. background-size: 100% 100%;
  117. cursor: pointer;
  118. .btn-txt {
  119. font-size: 32px;
  120. font-family: Source Han Sans CN;
  121. font-weight: bold;
  122. line-height: 54px;
  123. color: #9c0012;
  124. opacity: 1;
  125. }
  126. }
  127. }
  128. }
  129. }
  130. </style>