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.

366 lines
8.5 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <div class="homepage">
  3. <!-- <BackToHomeButton /> -->
  4. <!-- 顶部主图背景 -->
  5. <!-- <div class="main-icon"></div> -->
  6. <img class="main-icon" :src="robot" alt="AI小财神" />
  7. <!-- 按钮区域 -->
  8. <div class="buttons-container">
  9. <!-- 夺宝奇兵模块 -->
  10. <div class="btn-item" @click="goToDBQBmodel">
  11. <div class="btn-icon btn-dbqb"></div>
  12. <div class="btn-ball"></div>
  13. <div class="btn-text btn-text-dbqb"></div>
  14. </div>
  15. <!-- AI情绪模块 -->
  16. <div class="btn-item" @click="goToEmotionsmodel">
  17. <div class="btn-icon btn-ai"></div>
  18. <div class="btn-ball"></div>
  19. <div class="btn-text btn-text-ai"></div>
  20. </div>
  21. </div>
  22. <!-- 底部口号与说明 -->
  23. <div class="footer-wrapper">
  24. <div class="footer-text1"></div>
  25. <div class="footer-text2"></div>
  26. </div>
  27. </div>
  28. </template>
  29. <script setup>
  30. import { onMounted, ref } from "vue";
  31. import { useRouter } from "vue-router";
  32. import { setHeight } from "@/utils/setHeight";
  33. import { useDataStore } from "@/store/dataList.js";
  34. const { getQueryVariable, setActiveTabIndex, getUserInfo } = useDataStore();
  35. import robot from "@/assets/img/Selectmodel/机器人 拷贝.png";
  36. import BackToHomeButton from "@/views/components/BackToHomeButton.vue";
  37. import { useAppBridge } from "@/assets/js/useAppBridge.js";
  38. const router = useRouter();
  39. const pageRef = ref(null);
  40. onMounted(() => {
  41. // setHeight(pageRef.value)
  42. const isPhone =
  43. /phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i.test(
  44. navigator.userAgent
  45. );
  46. !isPhone &&
  47. localStorage.setItem(
  48. "localToken",
  49. decodeURIComponent(String(getQueryVariable("token")))
  50. );
  51. fnGetToken()
  52. // localStorage.setItem(
  53. // "localToken",
  54. // "pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q"
  55. // );
  56. getUserInfo();
  57. });
  58. // 获取token的核心函数
  59. const fnGetToken = () => {
  60. console.log('进入fnGetToken')
  61. window.JWready = (ress) => {
  62. console.log('进入JWready')
  63. try {
  64. ress = JSON.parse(ress);
  65. // console.log(ress, 'ress')
  66. } catch (error) {
  67. console.log(error, "fnGetToken error");
  68. } //platform为5是app端
  69. // platform.value = ress.data.platform
  70. // 处理平台判断
  71. console.log(ress.data.platform, "ress.data.platform");
  72. if (!ress.data.platform) {
  73. // 非App环境通过URL参数获取
  74. localStorage.setItem(
  75. "localToken",
  76. decodeURIComponent(String(getQueryVariable("token")))
  77. );
  78. // localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w")
  79. } else {
  80. // App环境通过桥接获取
  81. useAppBridge().packageFun(
  82. "JWgetStorage",
  83. (response) => {
  84. const res = JSON.parse(response); // 解析返回的结果
  85. localStorage.setItem("localToken", res.data);
  86. // localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w")
  87. },
  88. 5,
  89. {
  90. key: "token",
  91. }
  92. );
  93. }
  94. };
  95. // console.log('出来了')
  96. // 触发App桥接
  97. useAppBridge().packageFun("JWwebReady", () => {}, 5, {});
  98. };
  99. const goToDBQBmodel = () => {
  100. router.push("/DBQBmodel");
  101. };
  102. const goToEmotionsmodel = () => {
  103. router.push("/Emotionsmodel");
  104. };
  105. </script>
  106. <style scoped>
  107. .homepage {
  108. background-image: url("@/assets/img/Selectmodel/bg.png");
  109. background-size: 100% 100%;
  110. background-position: center;
  111. background-repeat: no-repeat;
  112. width: 100vw;
  113. height: 100vh;
  114. /* min-height: 100vh; */
  115. /* overflow-x: hidden; */
  116. display: flex;
  117. flex-direction: column;
  118. align-items: center;
  119. /* box-sizing: border-box;
  120. text-align: center; */
  121. background-attachment: fixed;
  122. }
  123. .main-icon {
  124. max-width: 350px;
  125. width: 28vw;
  126. /* max-width: 280px; */
  127. height: auto;
  128. position: absolute;
  129. top: 20vh;
  130. }
  131. /* ===== 默认(PC端)按钮区域 ===== */
  132. .buttons-container {
  133. margin-top: 8vh;
  134. display: flex;
  135. gap: 30vw;
  136. justify-content: center;
  137. align-items: flex-end;
  138. flex-wrap: nowrap;
  139. position: absolute;
  140. top: 40vh;
  141. }
  142. .btn-item {
  143. position: relative;
  144. display: flex;
  145. flex-direction: column;
  146. align-items: center;
  147. width: 90vw;
  148. max-width: 200px;
  149. cursor: pointer;
  150. animation: breathing 1.5s ease-in-out infinite;
  151. }
  152. /* 呼吸动效关键帧 */
  153. @keyframes breathing {
  154. 0%,
  155. 100% {
  156. transform: scale(1);
  157. }
  158. 50% {
  159. transform: scale(1.02);
  160. }
  161. }
  162. .btn-icon {
  163. /* height: 80px;
  164. width: 100%; */
  165. background-size: contain;
  166. background-repeat: no-repeat;
  167. background-position: center;
  168. }
  169. .btn-dbqb {
  170. height: 150px;
  171. width: 100%;
  172. background-image: url("@/assets/img/Selectmodel/-s-夺宝奇兵logo.png");
  173. }
  174. .btn-ai {
  175. height: 150px;
  176. width: 100%;
  177. background-image: url("@/assets/img/Selectmodel/金轮 拷贝.png");
  178. z-index: 3;
  179. }
  180. .btn-ball {
  181. height: 150px;
  182. width: 150%;
  183. margin-top: -30px;
  184. background-image: url("@/assets/img/Selectmodel/球.png");
  185. background-size: contain;
  186. background-repeat: no-repeat;
  187. background-position: center;
  188. position: relative;
  189. }
  190. .btn-text {
  191. height: 200px;
  192. width: 150%;
  193. position: absolute;
  194. bottom: -20px;
  195. left: 50%;
  196. transform: translateX(-50%);
  197. background-size: contain;
  198. background-repeat: no-repeat;
  199. background-position: center;
  200. }
  201. .btn-text-dbqb {
  202. background-image: url("@/assets/img/Selectmodel/-s-夺宝奇兵大模型.png");
  203. }
  204. .btn-text-ai {
  205. background-image: url("@/assets/img/Selectmodel/-s-AI情绪大模型.png");
  206. }
  207. /* ===== 底部口号区域 ===== */
  208. .footer-wrapper {
  209. /* margin-top: 6vh; */
  210. display: flex;
  211. flex-direction: column;
  212. align-items: center;
  213. gap: 5vh;
  214. position: absolute;
  215. bottom: 20px;
  216. }
  217. .footer-text1 {
  218. /* width: 200vw; */
  219. /* max-width: 200vw; */
  220. height: 6vw;
  221. background-image: url("@/assets/img/Selectmodel/智能体 拷贝.png");
  222. background-size: 100% 100%;
  223. background-size: contain;
  224. background-repeat: no-repeat;
  225. background-position: center;
  226. width: 100vw;
  227. }
  228. .footer-text2 {
  229. width: 70vw;
  230. max-width: 360px;
  231. height: 30px;
  232. /* margin-bottom: 60px; */
  233. background-image: url("@/assets/img/Selectmodel/-s-弘历团队.png");
  234. background-size: contain;
  235. background-repeat: no-repeat;
  236. background-position: center;
  237. }
  238. /* 手机适配 */
  239. @media screen and (max-width: 768px) {
  240. .homepage {
  241. background-image: url("@/assets/img/Selectmodel/手机bg.png");
  242. /* height: auto; */
  243. /* 解决底部留白 */
  244. /* width: 100%; */
  245. min-height: 100%;
  246. background-size: 100% 100%;
  247. overflow-x: hidden;
  248. }
  249. .main-icon {
  250. background-image: url("@/assets/img/Selectmodel/机器人手机.png");
  251. width: 70%;
  252. height: auto;
  253. background-repeat: no-repeat;
  254. background-size: 100% 100%;
  255. }
  256. .buttons-container {
  257. margin-top: 8rem;
  258. gap: 10vw;
  259. position: relative;
  260. flex-wrap: nowrap;
  261. }
  262. .btn-item {
  263. width: 40vw;
  264. display: flex;
  265. flex-direction: column;
  266. align-items: center;
  267. position: relative;
  268. padding-bottom: 20px;
  269. }
  270. .btn-icon {
  271. height: 80px;
  272. margin-bottom: -10px;
  273. }
  274. .btn-ball {
  275. height: 80px;
  276. margin-top: -10px;
  277. position: relative;
  278. z-index: 1;
  279. }
  280. .btn-text {
  281. position: absolute;
  282. bottom: 45px;
  283. width: 90%;
  284. height: 40px;
  285. z-index: 2;
  286. }
  287. .footer-text1 {
  288. background-image: url("@/assets/img/Selectmodel/智能体.png");
  289. width: 100vw;
  290. height: 60px;
  291. margin-top: 10px;
  292. background-size: 100% 100%;
  293. /* 保证全宽显示 */
  294. }
  295. .footer-text2 {
  296. width: 70vw;
  297. height: 24px;
  298. margin-top: 10px;
  299. }
  300. }
  301. /* 平板适配 */
  302. /* @media screen and (min-width: 769px) and (max-width: 1024px) {
  303. .homepage {
  304. background-image: url("@/assets/img/Selectmodel/手机bg.png");
  305. }
  306. .btn-item {
  307. padding-top: 20px;
  308. width: 300vw;
  309. position: relative;
  310. }
  311. .buttons-container {
  312. gap: 30vw;
  313. margin-top: 5vh;
  314. }
  315. .btn-icon,
  316. .btn-ball {
  317. height: 100px;
  318. width: 300px;
  319. }
  320. .btn-text {
  321. height: 90px;
  322. width: 100%;
  323. top: 70%;
  324. left: 50%;
  325. transform: translate(-50%, -50%);
  326. }
  327. } */
  328. </style>