GameEntryPage.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <div class="game-entry-page">
  3. <button
  4. class="return"
  5. @click="store.dispatch('closeGameEntryPage')"
  6. />
  7. <img
  8. class="game-entry-page__title"
  9. src="@/assets/images/game-entry-page-title.png"
  10. draggable="false"
  11. >
  12. <div class="entry-list">
  13. <div
  14. v-if="isGHG"
  15. class="entry-item"
  16. @click="isGHG && store.dispatch('openIframePage', {
  17. url: 'https://houseoss.4dkankan.com/project/yzdyh-dadu/ghg/index.html',
  18. style: 'width: 100%; height: 100%'
  19. })"
  20. >
  21. <img
  22. v-if="!isGHG"
  23. class=""
  24. src="@/assets/images/game-entry-jigsaw.png"
  25. alt=""
  26. draggable="false"
  27. >
  28. <img
  29. v-else
  30. class="highlight"
  31. src="@/assets/images/game-entry-jigsaw-highlight.png"
  32. alt=""
  33. draggable="false"
  34. >
  35. <h3>广寒胜境</h3>
  36. </div>
  37. <div
  38. v-if="isShip"
  39. class="entry-item"
  40. @click="isShip && emit('playShipGame')"
  41. >
  42. <img
  43. v-if="!isShip"
  44. class=""
  45. src="@/assets/images/game-entry-boat.png"
  46. alt=""
  47. draggable="false"
  48. >
  49. <img
  50. v-else
  51. class="highlight"
  52. src="@/assets/images/game-entry-boat-highlight.png"
  53. alt=""
  54. draggable="false"
  55. >
  56. <h3>舟楫千里</h3>
  57. </div>
  58. <div
  59. v-if="isDBG"
  60. class="entry-item"
  61. @click="isDBG && store.dispatch('openIframePage', {
  62. url: $isMobile ? 'https://houseoss.4dkankan.com/project/yzdyh-dadu/duobaoge/mobile/index.html' : 'https://houseoss.4dkankan.com/project/yzdyh-dadu/duobaoge/index.html',
  63. style: 'width: 100%; height: 100%'
  64. })"
  65. >
  66. <img
  67. v-if="!isDBG"
  68. class=""
  69. src="@/assets/images/game-entry-relic-show.png"
  70. alt=""
  71. draggable="false"
  72. >
  73. <img
  74. v-else
  75. class="highlight"
  76. src="@/assets/images/game-entry-relic-show-highlight.png"
  77. alt=""
  78. draggable="false"
  79. >
  80. <h3>古瓷集珍</h3>
  81. </div>
  82. </div>
  83. </div>
  84. </template>
  85. <script setup>
  86. import { inject } from "vue"
  87. import { useStore } from "vuex"
  88. const store = useStore()
  89. const $isMobile = inject('$isMobile')
  90. const gameName = store.state.gameEntryPageAttrs.gameName
  91. const emit = defineEmits(['playShipGame'])
  92. const isGHG = gameName === '广寒宫'
  93. const isShip = gameName === '聊城古船'
  94. const isDBG = gameName === '多宝阁'
  95. </script>
  96. <style lang="less" scoped>
  97. .game-entry-page{
  98. position: absolute;
  99. left: 0;
  100. top: 0;
  101. width: 100%;
  102. height: 100%;
  103. background-image: url(@/assets/images/game-entry-page-bg.jpg);
  104. background-size: cover;
  105. background-repeat: no-repeat;
  106. background-position: center;
  107. &__title {
  108. position: absolute;
  109. top: 20px;
  110. left: 50%;
  111. width: 1062px;
  112. transform: translateX(-50%);
  113. }
  114. >button.return{
  115. position: absolute;
  116. top: 68px;
  117. left: 42px;
  118. width: 58px;
  119. height: 58px;
  120. background-image: url(@/assets/images/btn-return.png);
  121. background-size: cover;
  122. background-repeat: no-repeat;
  123. background-position: center;
  124. }
  125. >.entry-list{
  126. position: absolute;
  127. left: 50%;
  128. top: 320px;
  129. transform: translateX(-50%);
  130. display: flex;
  131. justify-content: center;
  132. align-items: center;
  133. gap: 106px;
  134. >.entry-item{
  135. display: flex;
  136. justify-content: center;
  137. align-items: center;
  138. flex-direction: column;
  139. cursor: pointer;
  140. >img{
  141. width: 284px;
  142. height: 284px;
  143. margin-bottom: 43px;
  144. }
  145. >img.highlight{
  146. width: 326px;
  147. height: 326px;
  148. margin-bottom: 0px;
  149. transform: translateY(-20px);
  150. }
  151. >h3{
  152. font-size: 28px;
  153. font-family: Source Han Sans CN, Source Han Sans CN;
  154. font-weight: 400;
  155. color: #43310E;
  156. line-height: 36px;
  157. }
  158. }
  159. }
  160. }
  161. @media screen and (max-height: 480px) {
  162. .game-entry-page {
  163. button.return {
  164. width: 100px;
  165. height: 100px;
  166. }
  167. }
  168. }
  169. </style>