GameEntryPage.vue 3.8 KB

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