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.

297 lines
6.2 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
4 weeks ago
4 weeks ago
  1. <template>
  2. <div class="homepage">
  3. <!-- 顶部主图背景 -->
  4. <div class="main-icon"></div>
  5. <!-- 按钮区域 -->
  6. <div class="buttons-container">
  7. <!-- 夺宝奇兵模块 -->
  8. <div class="btn-item" @click="goToDBQBmodel">
  9. <div class="btn-icon btn-dbqb"></div>
  10. <div class="btn-ball"></div>
  11. <div class="btn-text btn-text-dbqb"></div>
  12. </div>
  13. <!-- AI情绪模块 -->
  14. <div class="btn-item" @click="goToEmotionsmodel">
  15. <div class="btn-icon btn-ai"></div>
  16. <div class="btn-ball"></div>
  17. <div class="btn-text btn-text-ai"></div>
  18. </div>
  19. </div>
  20. <!-- 底部口号与说明 -->
  21. <div class="footer-wrapper">
  22. <div class="footer-text1"></div>
  23. <div class="footer-text2"></div>
  24. </div>
  25. </div>
  26. </template>
  27. <script setup>
  28. import { onMounted, ref } from 'vue'
  29. import { useRouter } from 'vue-router'
  30. import { setHeight } from '@/utils/setHeight'
  31. import { useDataStore } from "@/store/dataList.js";
  32. const { getQueryVariable, setActiveTabIndex } = useDataStore();
  33. const router = useRouter()
  34. const pageRef = ref(null)
  35. // onMounted(() => {
  36. // setHeight(pageRef.value)
  37. // })
  38. onMounted(async () => {
  39. const isPhone =
  40. /phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i.test(
  41. navigator.userAgent
  42. );
  43. !isPhone &&
  44. localStorage.setItem(
  45. "localToken",
  46. decodeURIComponent(String(getQueryVariable("token")))
  47. );
  48. })
  49. const goToDBQBmodel = () => {
  50. router.push('/DBQBmodel')
  51. }
  52. const goToEmotionsmodel = () => {
  53. router.push('/Emotionsmodel')
  54. }
  55. </script>
  56. <style scoped>
  57. .homepage {
  58. /* width: 100vw; */
  59. /* min-height: 100vh; */
  60. background-color: #000cfc;
  61. background-image: url('@/assets/img/Selectmodel/-s-bg.png');
  62. background-size: cover;
  63. background-position: center;
  64. background-repeat: no-repeat;
  65. overflow-x: hidden;
  66. display: flex;
  67. flex-direction: column;
  68. align-items: center;
  69. box-sizing: border-box;
  70. text-align: center;
  71. }
  72. .main-icon {
  73. width: 90vw;
  74. max-width: 280px;
  75. height: 280px;
  76. background-image: url('@/assets/img/Selectmodel/-s-机器人.png');
  77. background-size: contain;
  78. background-repeat: no-repeat;
  79. background-position: center;
  80. margin-top: 10vh;
  81. }
  82. /* ===== 默认(PC端)按钮区域 ===== */
  83. .buttons-container {
  84. margin-top: 5vh;
  85. display: flex;
  86. gap: 30vw;
  87. justify-content: center;
  88. align-items: flex-end;
  89. flex-wrap: nowrap;
  90. }
  91. .btn-item {
  92. position: relative;
  93. display: flex;
  94. flex-direction: column;
  95. align-items: center;
  96. width: 90vw;
  97. max-width: 200px;
  98. }
  99. .btn-icon {
  100. /* height: 80px;
  101. width: 100%; */
  102. background-size: contain;
  103. background-repeat: no-repeat;
  104. background-position: center;
  105. }
  106. .btn-dbqb {
  107. height: 150px;
  108. width: 100%;
  109. background-image: url('@/assets/img/Selectmodel/-s-夺宝奇兵logo.png');
  110. }
  111. .btn-ai {
  112. height: 150px;
  113. width: 100%;
  114. background-image: url('@/assets/img/Selectmodel/金轮 拷贝.png');
  115. }
  116. .btn-ball {
  117. height: 150px;
  118. width: 150%;
  119. margin-top: -30px;
  120. background-image: url('@/assets/img/Selectmodel/球.png');
  121. background-size: contain;
  122. background-repeat: no-repeat;
  123. background-position: center;
  124. position: relative;
  125. }
  126. .btn-text {
  127. height: 200px;
  128. width: 150%;
  129. position: absolute;
  130. bottom: -20px;
  131. left: 50%;
  132. transform: translateX(-50%);
  133. background-size: contain;
  134. background-repeat: no-repeat;
  135. background-position: center;
  136. }
  137. .btn-text-dbqb {
  138. background-image: url('@/assets/img/Selectmodel/-s-夺宝奇兵大模型.png');
  139. }
  140. .btn-text-ai {
  141. background-image: url('@/assets/img/Selectmodel/-s-AI情绪大模型.png');
  142. }
  143. /* ===== 底部口号区域 ===== */
  144. .footer-wrapper {
  145. margin-top: 6vh;
  146. display: flex;
  147. flex-direction: column;
  148. align-items: center;
  149. gap: 5vh;
  150. }
  151. .footer-text1 {
  152. width: 100vh;
  153. max-width: 100vh;
  154. height: 9vh;
  155. background-image: url('@/assets/img/Selectmodel/智能体.png');
  156. background-size: 100% 100%;
  157. background-size: contain;
  158. background-repeat: no-repeat;
  159. background-position: center;
  160. }
  161. .footer-text2 {
  162. width: 70vw;
  163. max-width: 360px;
  164. height: 30px;
  165. margin-bottom: 60px;
  166. background-image: url('@/assets/img/Selectmodel/-s-弘历团队.png');
  167. background-size: contain;
  168. background-repeat: no-repeat;
  169. background-position: center;
  170. }
  171. /* 手机适配 */
  172. @media screen and (max-width: 600px) {
  173. .homepage {
  174. height: auto; /* 解决底部留白 */
  175. width: 100%;
  176. overflow-x: hidden;
  177. }
  178. .main-icon {
  179. margin-top: 350px;
  180. width: 9rem;
  181. height: 10rem;
  182. }
  183. .buttons-container {
  184. margin-top: 80px;
  185. gap: 10vw;
  186. position: relative;
  187. flex-wrap: nowrap;
  188. }
  189. .btn-item {
  190. width: 40vw;
  191. display: flex;
  192. flex-direction: column;
  193. align-items: center;
  194. position: relative;
  195. padding-bottom: 20px;
  196. }
  197. .btn-icon {
  198. height: 80px;
  199. margin-bottom: -10px;
  200. }
  201. .btn-ball {
  202. height: 80px;
  203. margin-top: -10px;
  204. position: relative;
  205. z-index: 1;
  206. }
  207. .btn-text {
  208. position: absolute;
  209. bottom: 45px;
  210. width: 90%;
  211. height: 40px;
  212. z-index: 2;
  213. }
  214. .footer-text1 {
  215. width: 100vw;
  216. height: 60px;
  217. margin-top: 10px;
  218. background-size: 100% 100%; /* 保证全宽显示 */
  219. }
  220. .footer-text2 {
  221. width: 70vw;
  222. height: 24px;
  223. margin-top: 10px;
  224. }
  225. }
  226. /* 平板适配 */
  227. @media screen and (min-width: 601px) and (max-width: 1024px) {
  228. .homepage {
  229. height: 120vh;
  230. }
  231. .main-icon {
  232. margin-top: 50%;
  233. width: 50vw;
  234. height: 50vw;
  235. }
  236. .btn-item {
  237. padding-top: 20px;
  238. width: 300vw;
  239. position: relative;
  240. }
  241. .btn-icon,
  242. .btn-ball {
  243. height: 100px;
  244. width: 300px;
  245. }
  246. .btn-text {
  247. height: 90px;
  248. width: 100%;
  249. top: 70%;
  250. left: 50%;
  251. transform: translate(-50%, -50%);
  252. }
  253. .footer-text1 {
  254. width: 100vw;
  255. max-width: 900px;
  256. height: 200px;
  257. }
  258. .footer-text2 {
  259. padding-top: 30px;
  260. height: 26px;
  261. }
  262. }
  263. </style>