You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
3.8 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <div
  3. ref="pageRef"
  4. class="homepage"
  5. :style="{ backgroundImage: `url(${bgImage})` }"
  6. >
  7. <!-- 顶部图标 -->
  8. <img class="top-icon" :src="topIcon" alt="顶部图标" />
  9. <!-- 中间图示及说明 -->
  10. <!-- 副标题 -->
  11. <div class="content-container" >
  12. <img class="sub-title" :src="subtitle" alt="四维作战体系" />
  13. <img class="content-icon" :src="contenicon" alt="四维情绪" />
  14. </div>
  15. <!-- 按钮区域 -->
  16. <div class="buttons-container">
  17. <button class="btn-item" @click="goToAiEmotion">
  18. <img :src="btnIcon" alt="开启财运" />
  19. </button>
  20. </div>
  21. </div>
  22. </template>
  23. <script setup>
  24. import { onMounted, ref } from 'vue'
  25. import { useRouter } from 'vue-router'
  26. import bgImage from '@/assets/img/Emotionsmodel/-s-bg.png'
  27. import topIcon from '@/assets/img/Emotionsmodel/大标题.png'
  28. import subtitle from '@/assets/img/Emotionsmodel/-s-标题 拷贝.png'
  29. import contenicon from '@/assets/img/Emotionsmodel/-s-四维.png'
  30. import btnIcon from '@/assets/img/Emotionsmodel/-s-开启财运.png'
  31. import { setHeight } from '@/utils/setHeight'
  32. const router = useRouter()
  33. const pageRef = ref(null)
  34. onMounted(() => {
  35. setHeight(pageRef.value)
  36. })
  37. const goToAiEmotion = () => {
  38. // 设置 sessionStorage 控制 homepage.vue 激活 AiEmotion tab
  39. sessionStorage.setItem("activeTabAI", "AiEmotion")
  40. sessionStorage.setItem("activeIndexAI", "2")
  41. router.push("/homePage")
  42. }
  43. </script>
  44. <style scoped>
  45. .homepage {
  46. /* width: 100vw; */
  47. /* min-height: 100vh; */
  48. background-image: url('@/assets/img/Emotionsmodel/-s-bg.png');
  49. background-size: cover;
  50. background-position: center;
  51. background-repeat: no-repeat;
  52. display: flex;
  53. flex-direction: column;
  54. justify-content: space-evenly;
  55. align-items: center;
  56. padding: 20px;
  57. box-sizing: border-box;
  58. color: white;
  59. text-align: center;
  60. font-family: 'Microsoft YaHei', sans-serif;
  61. }
  62. /* 顶部图标 */
  63. .top-icon {
  64. width: 40vw;
  65. max-width: 300px;
  66. height: auto;
  67. margin-top: 5vh;
  68. }
  69. /* 四维体系整体容器修复 */
  70. .content-container {
  71. display: flex;
  72. flex-direction: column;
  73. justify-content: center;
  74. align-items: center;
  75. margin-top: 40px;
  76. }
  77. /* 副标题 */
  78. .sub-title {
  79. width: 90%;
  80. max-width: 480px;
  81. height: auto;
  82. margin-top: 30px;
  83. }
  84. /* 内容图 */
  85. .content-icon {
  86. width: 90%;
  87. max-width: 520px;
  88. height: auto;
  89. margin-top: 10px;
  90. }
  91. /* 按钮区域 */
  92. .buttons-container {
  93. margin-top: auto;
  94. margin-bottom: 3vh;
  95. display: flex;
  96. justify-content: center;
  97. align-items: center;
  98. width: 100%;
  99. }
  100. .btn-item {
  101. background: none;
  102. border: none;
  103. cursor: pointer;
  104. transition: transform 0.3s ease;
  105. }
  106. .btn-item:hover {
  107. transform: scale(1.05);
  108. }
  109. .btn-item img {
  110. width: 220px;
  111. max-width: 80vw;
  112. height: auto;
  113. padding-top: 30px;
  114. }
  115. /* 平板适配 */
  116. @media (max-width: 1024px) {
  117. .top-icon {
  118. margin-top: 80px;
  119. width: 30vh;
  120. max-width: 300vh;
  121. }
  122. .content-container {
  123. margin-top: 60px;
  124. flex-direction: column;
  125. justify-content: center;
  126. align-items: center
  127. }
  128. .sub-title {
  129. width: 95%;
  130. max-width: 420px;
  131. }
  132. .content-icon {
  133. width: 95%;
  134. max-width: 460px;
  135. }
  136. .btn-item img {
  137. width: 400px;
  138. }
  139. }
  140. /* 手机适配 */
  141. @media (max-width: 600px) {
  142. .top-icon {
  143. width: 80vw;
  144. margin-top: -1vh;
  145. }
  146. .sub-title {
  147. width: 95%;
  148. margin-top: -2vh;
  149. }
  150. .content-icon {
  151. width: 95%;
  152. margin-top: -1vh;
  153. }
  154. .buttons-container {
  155. margin-top: 4vh;
  156. margin-bottom: 4vh;
  157. }
  158. .btn-item img {
  159. margin-bottom: 4vh;
  160. width: 300px;
  161. }
  162. }
  163. @media (max-width: 400px) {
  164. .btn-item img {
  165. width: 120px;
  166. }
  167. }
  168. </style>