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.

2911 lines
75 KiB

7 months ago
2 weeks ago
2 weeks ago
2 weeks ago
2 months ago
2 months ago
7 months ago
7 months ago
7 months ago
7 months ago
2 weeks ago
2 weeks ago
7 months ago
2 weeks ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
2 weeks ago
7 months ago
7 months ago
2 months ago
7 months ago
7 months ago
4 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
7 months ago
2 weeks ago
2 weeks ago
2 weeks ago
7 months ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
6 months ago
6 months ago
6 months ago
6 months ago
2 weeks ago
4 weeks ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 weeks ago
2 months ago
7 months ago
7 months ago
4 months ago
2 weeks ago
2 weeks ago
2 months ago
2 months ago
2 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 weeks ago
2 weeks ago
2 weeks ago
2 months ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
2 months ago
4 weeks ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 weeks ago
2 weeks ago
  1. <script setup>
  2. // 导入
  3. import { ref, computed, onMounted, watch, nextTick, onUnmounted, h } from "vue";
  4. import { setHeight } from "../utils/setHeight";
  5. import {
  6. getUserCountAPI,
  7. showExchangeAPI,
  8. godExchangeAPI,
  9. exchangeAPI,
  10. getGoldCoinAPI,
  11. } from "../api/AIxiaocaishen";
  12. import { ElMessage } from "element-plus";
  13. import AIchat from "./AIchat.vue";
  14. import AIfind from "./AIfind.vue";
  15. import AiEmotion from "./AiEmotion.vue";
  16. import deepNine from "./deepNine.vue";
  17. import Feedback from "./Feedback.vue";
  18. import Announcement from "./Announcement.vue";
  19. import { useAppBridge } from "../assets/js/useAppBridge.js";
  20. import { useDataStore } from "@/store/dataList.js";
  21. import { useChatStore } from "../store/chat";
  22. import { useEmotionAudioStore } from "../store/emotionAudio";
  23. import { useAudioStore } from "../store/audio";
  24. import { useDeepNineStore } from "../store/deepNine";
  25. import _ from "lodash";
  26. import logo from "../assets/img/homePage/logo.png";
  27. import madeInHL from "../assets/img/homePage/madeInHL.png";
  28. import getCountAll from "../assets/img/homePage/get-count-all.png";
  29. import announcementBtn from "../assets/img/homePage/announcement.png";
  30. import thinkActive from "../assets/img/homePage/tail/think-active.png";
  31. import thinkNoActive from "../assets/img/homePage/tail/think-no-active.png";
  32. import languageBtn from "../assets/img/homePage/tail/language.png";
  33. import dbqbButton01 from "../assets/img/AiEmotion/dbqb-button01.png";
  34. import dbqbButton02 from "../assets/img/AiEmotion/dbqb-button02.png";
  35. import emotionButton01 from "../assets/img/AiEmotion/emotion-button01.png";
  36. import emotionButton02 from "../assets/img/AiEmotion/emotion-button02.png";
  37. import voice from "../assets/img/homePage/tail/voice.png";
  38. import voiceNoActive from "../assets/img/homePage/tail/voice-no-active.png";
  39. import sendBtn from "../assets/img/homePage/tail/send.png";
  40. import msgBtn from "../assets/img/homePage/tail/msg.png";
  41. import feedbackBtn from "../assets/img/Feedback/feedbackBtn.png";
  42. import back from "../assets/img/Feedback/back.png";
  43. import HistoryRecord from "./components/HistoryRecord.vue";
  44. // import VConsole from "vconsole";
  45. // const vConsole = new VConsole();
  46. const isMobile = ref(null);
  47. // 获取 AiEmotion 组件的 ref
  48. const aiEmotionRef = ref(null);
  49. // 获取深度九大模型组件的 ref
  50. const deepNineRef = ref(null);
  51. // 获取历史记录组件的 ref
  52. const historyRecordRef = ref(null);
  53. // import { useUserStore } from "../store/userPessionCode.js";
  54. const { getQueryVariable, setActiveTabIndex, getUserInfo } = useDataStore();
  55. const dataStore = useDataStore();
  56. const chatStore = useChatStore();
  57. // 变量
  58. // 音频管理
  59. const emotionAudioStore = useEmotionAudioStore();
  60. const audioStore = useAudioStore();
  61. // 根据当前页面类型获取对应的音频store
  62. const getCurrentAudioStore = () => {
  63. return activeTab.value === "AiEmotion" ? emotionAudioStore : audioStore;
  64. };
  65. const isVoice = computed(() => {
  66. const currentStore = getCurrentAudioStore();
  67. return currentStore.isVoiceEnabled;
  68. });
  69. const toggleVoice = () => {
  70. const currentStore = getCurrentAudioStore();
  71. if (!currentStore.isVoiceEnabled) {
  72. // 如果语音功能关闭,先开启语音功能
  73. currentStore.toggleVoice();
  74. } else {
  75. // 如果语音功能开启,则切换播放/暂停状态
  76. if (currentStore.currentAudioUrl || currentStore.ttsUrl) {
  77. // 有音频时切换播放/暂停
  78. currentStore.togglePlayPause();
  79. } else {
  80. // 没有音频时关闭语音功能
  81. currentStore.toggleVoice();
  82. }
  83. }
  84. };
  85. // 将默认值改为从 sessionStorage 中获取,如果没有则使用默认值 'aifindCow'为第一个默认tab
  86. const activeTab = ref(sessionStorage.getItem("activeTabAI") || "AIchat");
  87. const activeIndex = ref(
  88. parseInt(sessionStorage.getItem("activeIndexAI") || "0")
  89. );
  90. // 手机端选择器的值,与activeTab保持同步
  91. const activeTabMobile = ref(activeTab.value);
  92. // 监听activeTab变化,同步到activeTabMobile
  93. watch(activeTab, (newVal) => {
  94. activeTabMobile.value = newVal;
  95. });
  96. // 手机端选择器变化处理
  97. const handleMobileTabChange = (value) => {
  98. const tabIndexMap = {
  99. "AIchat": 0,
  100. "AiEmotion": 1,
  101. "deepNine": 2
  102. };
  103. setActiveTab(value, tabIndexMap[value]);
  104. };
  105. const tabs = computed(() => [
  106. {
  107. name: "AIchat",
  108. label: "夺宝奇兵大模型",
  109. },
  110. // {
  111. // name: "AIfind",
  112. // label: "发现",
  113. // },
  114. {
  115. name: "AiEmotion",
  116. label: "AI情绪大模型",
  117. },
  118. {
  119. name: "deepNine",
  120. label: "深度九大模型",
  121. },
  122. ]);
  123. // 修改 setActiveTab 方法,添加一个可选参数 forceAIchat
  124. const setActiveTab = (tab, index, forceAIchat = false) => {
  125. isScrolling.value = false; //回复滚动到底部方法
  126. isAnnouncementVisible.value = false;
  127. // 重置输入框禁用状态,防止页面切换时状态残留
  128. console.log("tab", tab, "index", index);
  129. if (tab == "AIchat") {
  130. isInputDisabled.value = chatStore.chatInput;
  131. console.log("切换到AIchat页面,输入框状态为", isInputDisabled.value);
  132. } else if (tab == "AiEmotion") {
  133. isInputDisabled.value = chatStore.emotionInput;
  134. console.log("切换到AiEmotion页面,输入框状态为", isInputDisabled.value);
  135. } else if (tab == "deepNine") {
  136. isInputDisabled.value = chatStore.deepNineInput;
  137. console.log("切换到deepNine页面,输入框状态为", isInputDisabled.value);
  138. } else {
  139. isInputDisabled.value = false;
  140. }
  141. if (forceAIchat && activeTab.value !== "AIchat") {
  142. activeTab.value = "AIchat";
  143. activeIndex.value = 0;
  144. sessionStorage.setItem("activeTabAI", "AIchat");
  145. sessionStorage.setItem("activeIndexAI", "0");
  146. } else {
  147. activeTab.value = tab;
  148. activeIndex.value = index;
  149. sessionStorage.setItem("activeTabAI", tab);
  150. sessionStorage.setItem("activeIndexAI", index.toString());
  151. }
  152. setActiveTabIndex(index);
  153. console.log(tab, index, "tab, index");
  154. setHeight(document.getElementById("testId")); // 给父组件发送窗口高度
  155. };
  156. // 修改 activeComponent 的计算逻辑
  157. const activeComponent = computed(() => {
  158. if (activeTab.value === "AIchat") {
  159. return AIchat;
  160. } else if (activeTab.value === "AIfind") {
  161. return AIfind;
  162. } else if (activeTab.value === "AiEmotion") {
  163. return AiEmotion; // 新增逻辑
  164. } else if (activeTab.value === "deepNine") {
  165. return deepNine;
  166. }
  167. });
  168. const activeTwoTab = computed(() => {
  169. if (isAnnouncementVisible.value) {
  170. return Announcement;
  171. } else {
  172. return Feedback;
  173. }
  174. });
  175. // 新增一个方法,调用时先判断是否处于 AIchat,若不在则跳转到 AIchat
  176. const ensureAIchat = () => {
  177. setActiveTab("AIchat", 0, true);
  178. };
  179. // 获取次数
  180. const UserCount = computed(() => chatStore.UserCount);
  181. const getCount = () => {
  182. console.log("点击了获取次数的按钮");
  183. };
  184. // 深度思考
  185. const isThinking = ref(true);
  186. const toggleThink = () => {
  187. isThinking.value = !isThinking.value;
  188. };
  189. // 发送消息
  190. const message = ref("");
  191. // 传输对象
  192. const messages = ref([]);
  193. // 信息加载状态
  194. const isLoading = computed(() => {
  195. chatStore.isLoading;
  196. });
  197. // 输入框禁用状态
  198. const isInputDisabled = ref(false);
  199. // 添加用户消息
  200. const updateMessage = (title) => {
  201. message.value = title;
  202. console.log("updateMessage 的值:", title);
  203. };
  204. watch(
  205. () => chatStore.announcementMsg,
  206. (newVal) => {
  207. console.log("监听到公告改变", chatStore.announcementMsg);
  208. if (chatStore.announcementMsg && !isInputDisabled.value) {
  209. message.value = chatStore.announcementMsg;
  210. chatStore.announcementMsg = null;
  211. }
  212. }
  213. );
  214. watch(
  215. () => dataStore.isFeedback,
  216. async (newVal) => {
  217. if (!dataStore.isFeedback) {
  218. // 重置公告页面显示状态
  219. isAnnouncementVisible.value = false;
  220. await nextTick();
  221. // 监听页面高度
  222. throttledHeightListener();
  223. }
  224. }
  225. );
  226. watch(
  227. () => chatStore.chatInput,
  228. async (newVal) => {
  229. if (activeTab.value == "AIchat") {
  230. isInputDisabled.value = chatStore.chatInput;
  231. }
  232. }
  233. );
  234. watch(
  235. () => chatStore.emotionInput,
  236. async (newVal) => {
  237. if (activeTab.value == "AiEmotion") {
  238. isInputDisabled.value = chatStore.emotionInput;
  239. }
  240. }
  241. );
  242. watch(
  243. () => chatStore.deepNineInput,
  244. async (newVal) => {
  245. if (activeTab.value == "deepNine") {
  246. isInputDisabled.value = chatStore.deepNineInput;
  247. }
  248. }
  249. );
  250. const sendMessage = async () => {
  251. if (
  252. localStorage.getItem("localToken") == null ||
  253. localStorage.getItem("localToken") == ""
  254. ) {
  255. ElMessage.error("请先登录");
  256. return;
  257. }
  258. // 检查输入内容是否为空
  259. if (!message.value || !message.value.trim()) {
  260. ElMessage.warning("输入内容不能为空");
  261. return;
  262. }
  263. isScrolling.value = false;
  264. // 注意:历史记录会在消息发送后自动更新,无需手动添加
  265. // 取消历史记录选中状态
  266. if (historyRecordRef) {
  267. historyRecordRef.value.selectedRecordId = null;
  268. }
  269. // 判断当前是否为 AiEmotion 组件
  270. if (activeTab.value === "AiEmotion") {
  271. // 禁用输入框
  272. isInputDisabled.value = true;
  273. chatStore.emotionInput = true;
  274. // 调用 AiEmotion 组件的 handleSendMessage 方法
  275. aiEmotionRef.value?.handleSendMessage(message.value, () => {
  276. // 打字机效果完成后的回调,重新启用输入框
  277. isInputDisabled.value = false;
  278. chatStore.emotionInput = false;
  279. });
  280. message.value = ""; // 清空输入框
  281. return;
  282. }
  283. // 判断当前是否为深度九大模型
  284. if (activeTab.value === "deepNine") {
  285. // 禁用输入框
  286. isInputDisabled.value = true;
  287. // 获取深度九大模型的 store
  288. const deepNineStore = useDeepNineStore();
  289. // 添加消息到深度九大模型的 store 中
  290. const messageContent = message.value;
  291. message.value = ""; // 清空输入框
  292. setTimeout(() => {
  293. console.log("深度九大模型:添加消息", messageContent);
  294. messages.value = [
  295. ...messages.value,
  296. {
  297. sender: "user",
  298. content: messageContent,
  299. audioArray: [],
  300. audioStatus: false,
  301. },
  302. ];
  303. }, 200);
  304. return;
  305. }
  306. // 调用 ensureAIchat 确保跳转到 AIchat 页面
  307. ensureAIchat();
  308. if (isInputDisabled.value) return;
  309. isInputDisabled.value = true;
  310. chatStore.chatInput = true;
  311. const messageContent = message.value;
  312. // 重置消息输入框
  313. message.value = "";
  314. setTimeout(() => {
  315. console.log("延时后添加消息", messageContent);
  316. // 发送消息时,设置 isLoading 为 true
  317. messages.value = [
  318. ...messages.value,
  319. {
  320. sender: "user",
  321. content: messageContent,
  322. audioArray: [],
  323. audioStatus: false,
  324. },
  325. ];
  326. console.log(messages.value, "messages.value");
  327. }, 200);
  328. };
  329. // 重新启用输入框的方法
  330. const enableInput = () => {
  331. console.log("解除禁用");
  332. isInputDisabled.value = false;
  333. };
  334. // 处理历史记录选择
  335. const handleHistorySelect = (stockData) => {
  336. console.log("接收到历史记录数据:", stockData);
  337. // 如果当前不在AiEmotion页面,切换到AiEmotion页面
  338. // if (activeTab.value !== 'AiEmotion') {
  339. // setActiveTab('AiEmotion', 1);
  340. // }
  341. // 等待组件渲染完成后调用addStock方法
  342. nextTick(() => {
  343. if (aiEmotionRef.value && aiEmotionRef.value.addStock) {
  344. aiEmotionRef.value.addStock(stockData);
  345. } else {
  346. console.error("AiEmotion组件或addStock方法不可用");
  347. }
  348. });
  349. };
  350. // 公告
  351. // 新增一个变量来控制是否显示公告页面
  352. const isAnnouncementVisible = ref(false);
  353. // Token规则提示框相关
  354. const tokenRuleDialogVisible = ref(false);
  355. const hasShownTokenRule = ref({
  356. AIchat: sessionStorage.getItem("hasShownTokenRule_AIchat") === "true",
  357. AiEmotion: sessionStorage.getItem("hasShownTokenRule_AiEmotion") === "true",
  358. deepNine: sessionStorage.getItem("hasShownTokenRule_deepNine") === "true",
  359. });
  360. // 关闭Token规则提示框
  361. const closeTokenRuleDialog = () => {
  362. tokenRuleDialogVisible.value = false;
  363. };
  364. // 打开Token规则提示框
  365. const openTokenRuleDialog = () => {
  366. tokenRuleDialogVisible.value = true;
  367. };
  368. // 添加全局点击事件监听器,使任何点击动作都能关闭提示框
  369. // 定义处理函数,以便正确移除事件监听器
  370. const handleGlobalClick = (event) => {
  371. // 检查点击事件是否来自"兑换规则"按钮
  372. const changeRuleElement = document.querySelector(".changeRule");
  373. if (
  374. changeRuleElement &&
  375. (changeRuleElement === event.target ||
  376. changeRuleElement.contains(event.target))
  377. ) {
  378. // 如果点击的是"兑换规则"按钮,不关闭提示框
  379. return;
  380. }
  381. if (tokenRuleDialogVisible.value) {
  382. tokenRuleDialogVisible.value = false;
  383. }
  384. };
  385. onMounted(() => {
  386. document.addEventListener("click", handleGlobalClick);
  387. });
  388. // 在组件卸载时移除事件监听器
  389. onUnmounted(() => {
  390. document.removeEventListener("click", handleGlobalClick);
  391. });
  392. // 检查是否需要显示Token规则提示框(从其他页面跳转过来时)
  393. const checkTokenRuleOnPageLoad = () => {
  394. const activeTab = sessionStorage.getItem("activeTabAI");
  395. const fromExternalPage = sessionStorage.getItem("fromExternalPage");
  396. if (
  397. fromExternalPage === "true" &&
  398. activeTab &&
  399. !hasShownTokenRule.value[activeTab]
  400. ) {
  401. tokenRuleDialogVisible.value = true;
  402. hasShownTokenRule.value[activeTab] = true;
  403. sessionStorage.setItem(`hasShownTokenRule_${activeTab}`, "true");
  404. // 清除标记,避免重复显示
  405. sessionStorage.removeItem("fromExternalPage");
  406. }
  407. };
  408. const showAnnouncement = async () => {
  409. console.log("打开公告");
  410. dataStore.isFeedback = true; // 显示用户反馈页面
  411. isScrolling.value = false; //回复滚动到底部方法
  412. isAnnouncementVisible.value = true; // 显示公告页面
  413. if (isMobile.value) {
  414. if (historyRecordRef) {
  415. historyRecordRef.value.isCollapsed = true;
  416. }
  417. }
  418. };
  419. // 跳转用户反馈
  420. const showFeedback = () => {
  421. console.log("打开用户反馈");
  422. dataStore.isFeedback = true; // 显示用户反馈页面
  423. isAnnouncementVisible.value = false; // 显示反馈页面
  424. if (isMobile.value) {
  425. if (historyRecordRef) {
  426. historyRecordRef.value.isCollapsed = true;
  427. }
  428. }
  429. };
  430. // 保证发送消息时,滚动屏在底部
  431. const tabContentAIchat = ref(null);
  432. const tabContentAiEmotion = ref(null);
  433. const tabContentDeepNine = ref(null);
  434. const isScrolling = ref(false); //判断用户是否在滚动
  435. // AiEmotion页面高度监听器相关变量
  436. const aiEmotionHeightObserver = ref(null);
  437. const isAiEmotionAutoScrollEnabled = ref(false);
  438. const isAiEmotionUserScrolling = ref(false); // 用户是否正在手动滚动
  439. const aiEmotionScrollTimer = ref(null); // 滚动检测定时器
  440. const isChartInteracting = ref(false); // 图表是否正在交互
  441. const chartInteractionTimer = ref(null); // 图表交互检测定时器
  442. // 获取当前活动页面的滚动容器
  443. const getCurrentScrollContainer = () => {
  444. if (activeTab.value === "AIchat") {
  445. return tabContentAIchat.value;
  446. } else if (activeTab.value === "AiEmotion") {
  447. return tabContentAiEmotion.value;
  448. } else if (activeTab.value === "deepNine") {
  449. return tabContentDeepNine.value;
  450. }
  451. return null;
  452. };
  453. const smoothScrollToBottom = async () => {
  454. // console.log("调用滚动到底部的方法");
  455. // await nextTick();
  456. const container = getCurrentScrollContainer();
  457. // console.log(container, 'container')
  458. // console.log(isScrolling.value, 'isScrolling.value')
  459. if (!container) return;
  460. await nextTick(); // 确保在DOM更新后执行
  461. if (!isScrolling.value) {
  462. container.scrollTop = container.scrollHeight - container.offsetHeight;
  463. // container.scrollTop = container.scrollHeight;
  464. // container.scrollTop = container.offsetHeight;
  465. // container.scrollTop = container.scrollHeight + container.offsetHeight;
  466. // console.log(container.scrollHeight, container.offsetHeight, container.scrollHeight - container.offsetHeight, container.scrollTop, "总长度", "可视长度", "位置")
  467. }
  468. };
  469. const throttledSmoothScrollToBottom = _.throttle(smoothScrollToBottom, 300, {
  470. trailing: false,
  471. });
  472. // AiEmotion页面自动滚动到底部的防抖函数
  473. const debouncedAiEmotionScrollToBottom = _.debounce(() => {
  474. if (
  475. activeTab.value === "AiEmotion" &&
  476. isAiEmotionAutoScrollEnabled.value &&
  477. !isAiEmotionUserScrolling.value &&
  478. !isChartInteracting.value
  479. ) {
  480. const container = tabContentAiEmotion.value;
  481. if (container) {
  482. container.scrollTop = container.scrollHeight - container.offsetHeight;
  483. }
  484. }
  485. }, 150);
  486. // 启动AiEmotion页面高度监听器
  487. const startAiEmotionHeightObserver = () => {
  488. // 先停止之前的监听器
  489. stopAiEmotionHeightObserver();
  490. isAiEmotionAutoScrollEnabled.value = true;
  491. // 创建ResizeObserver监听页面内容变化
  492. aiEmotionHeightObserver.value = new ResizeObserver((entries) => {
  493. if (
  494. isAiEmotionAutoScrollEnabled.value &&
  495. activeTab.value === "AiEmotion" &&
  496. !isChartInteracting.value
  497. ) {
  498. debouncedAiEmotionScrollToBottom();
  499. }
  500. });
  501. // 监听document.body的尺寸变化
  502. if (document.body) {
  503. aiEmotionHeightObserver.value.observe(document.body);
  504. }
  505. // 创建MutationObserver监听DOM结构变化
  506. const mutationObserver = new MutationObserver((mutations) => {
  507. let shouldScroll = false;
  508. mutations.forEach((mutation) => {
  509. if (mutation.type === "childList" && mutation.addedNodes.length > 0) {
  510. // 检查新增的节点是否包含实际内容
  511. const hasContent = Array.from(mutation.addedNodes).some((node) => {
  512. if (node.nodeType === Node.ELEMENT_NODE) {
  513. return node.offsetHeight > 0 || node.scrollHeight > 0;
  514. }
  515. return (
  516. node.nodeType === Node.TEXT_NODE &&
  517. node.textContent.trim().length > 0
  518. );
  519. });
  520. if (hasContent) {
  521. shouldScroll = true;
  522. }
  523. }
  524. });
  525. if (
  526. shouldScroll &&
  527. isAiEmotionAutoScrollEnabled.value &&
  528. activeTab.value === "AiEmotion" &&
  529. !isChartInteracting.value
  530. ) {
  531. debouncedAiEmotionScrollToBottom();
  532. }
  533. });
  534. // 监听AiEmotion页面的主要内容区域的DOM变化
  535. const aiEmotionContainer = tabContentAiEmotion.value;
  536. if (aiEmotionContainer) {
  537. mutationObserver.observe(aiEmotionContainer, {
  538. childList: true,
  539. subtree: true,
  540. attributes: false,
  541. characterData: true,
  542. });
  543. }
  544. // 保存mutationObserver引用以便清理
  545. aiEmotionHeightObserver.value.mutationObserver = mutationObserver;
  546. // 为AiEmotion页面的滚动容器添加滚动事件监听器
  547. if (aiEmotionContainer) {
  548. aiEmotionContainer.addEventListener("scroll", handleAiEmotionUserScroll, {
  549. passive: true,
  550. });
  551. // 保存滚动事件监听器引用以便清理
  552. aiEmotionHeightObserver.value.scrollListener = handleAiEmotionUserScroll;
  553. }
  554. console.log("AiEmotion页面高度监听器已启动");
  555. };
  556. // AiEmotion页面用户滚动检测
  557. const handleAiEmotionUserScroll = () => {
  558. // 标记用户正在滚动
  559. isAiEmotionUserScrolling.value = true;
  560. // 清除之前的定时器
  561. if (aiEmotionScrollTimer.value) {
  562. clearTimeout(aiEmotionScrollTimer.value);
  563. }
  564. // 设置定时器,2秒后恢复自动滚动
  565. // aiEmotionScrollTimer.value = setTimeout(() => {
  566. // isAiEmotionUserScrolling.value = false;
  567. // console.log("AiEmotion页面用户滚动检测:恢复自动滚动");
  568. // }, 2000);
  569. };
  570. // 图表交互状态管理
  571. const handleChartInteractionStart = () => {
  572. console.log("图表交互开始,临时禁用自动滚动");
  573. isChartInteracting.value = true;
  574. // 清除之前的定时器
  575. if (chartInteractionTimer.value) {
  576. clearTimeout(chartInteractionTimer.value);
  577. }
  578. };
  579. const handleChartInteractionEnd = () => {
  580. // 清除之前的定时器
  581. if (chartInteractionTimer.value) {
  582. clearTimeout(chartInteractionTimer.value);
  583. }
  584. // 设置定时器,1秒后恢复自动滚动
  585. chartInteractionTimer.value = setTimeout(() => {
  586. isChartInteracting.value = false;
  587. console.log("图表交互结束,恢复自动滚动");
  588. }, 1000);
  589. };
  590. // 暴露图表交互管理函数给全局使用
  591. window.handleChartInteractionStart = handleChartInteractionStart;
  592. window.handleChartInteractionEnd = handleChartInteractionEnd;
  593. // 处理AiEmotion页面的滚动请求
  594. const handleAiEmotionScrollToBottom = () => {
  595. if (activeTab.value === "AiEmotion") {
  596. const container = tabContentAiEmotion.value;
  597. if (container) {
  598. // 使用nextTick确保DOM已更新
  599. nextTick(() => {
  600. container.scrollTop = container.scrollHeight - container.offsetHeight;
  601. console.log("AiEmotion页面:执行容器滚动到底部");
  602. });
  603. }
  604. }
  605. };
  606. // 停止AiEmotion页面高度监听器
  607. const stopAiEmotionHeightObserver = () => {
  608. isAiEmotionAutoScrollEnabled.value = false;
  609. isAiEmotionUserScrolling.value = false;
  610. // 清理滚动检测定时器
  611. if (aiEmotionScrollTimer.value) {
  612. clearTimeout(aiEmotionScrollTimer.value);
  613. aiEmotionScrollTimer.value = null;
  614. }
  615. if (aiEmotionHeightObserver.value) {
  616. // 清理ResizeObserver
  617. aiEmotionHeightObserver.value.disconnect();
  618. // 清理MutationObserver
  619. if (aiEmotionHeightObserver.value.mutationObserver) {
  620. aiEmotionHeightObserver.value.mutationObserver.disconnect();
  621. aiEmotionHeightObserver.value.mutationObserver = null;
  622. }
  623. // 清理滚动事件监听器
  624. if (
  625. aiEmotionHeightObserver.value.scrollListener &&
  626. tabContentAiEmotion.value
  627. ) {
  628. tabContentAiEmotion.value.removeEventListener(
  629. "scroll",
  630. aiEmotionHeightObserver.value.scrollListener
  631. );
  632. aiEmotionHeightObserver.value.scrollListener = null;
  633. }
  634. aiEmotionHeightObserver.value = null;
  635. }
  636. console.log("AiEmotion页面高度监听器已停止");
  637. };
  638. watch(
  639. () => chatStore.messages.length,
  640. () => {
  641. // console.log('messages变化了')
  642. // 只有在AIchat页面时才执行自动滚动
  643. if (activeTab.value === "AIchat" || activeTab.value === "deepNine") {
  644. throttledSmoothScrollToBottom();
  645. }
  646. // setTimeout(throttledSmoothScrollToBottom, 100);
  647. },
  648. { deep: false, immediate: true }
  649. );
  650. watch(
  651. () => chatStore.dbqbClickRecord,
  652. async (newValue, oldValue) => {
  653. const container = getCurrentScrollContainer();
  654. if (!container) return;
  655. await nextTick(); // 确保在DOM更新后执行
  656. container.scrollTop = 0;
  657. }
  658. );
  659. watch(
  660. () => chatStore.dbqbScrollToTop,
  661. async (newValue, oldValue) => {
  662. const container = getCurrentScrollContainer();
  663. if (!container) return;
  664. await nextTick(); // 确保在DOM更新后执行
  665. container.scrollTop = 0;
  666. }
  667. );
  668. watch(
  669. activeTab,
  670. async () => {
  671. console.log("activeTab变化了", activeTab.value);
  672. if (
  673. activeTab.value == "AIchat" ||
  674. activeTab.value == "AiEmotion" ||
  675. activeTab.value == "deepNine"
  676. ) {
  677. if (historyRecordRef.value && historyRecordRef.value.getHistoryList) {
  678. let model =
  679. activeTab.value == "AIchat"
  680. ? 1
  681. : activeTab.value == "AiEmotion"
  682. ? 2
  683. : 3;
  684. const result = historyRecordRef.value.getHistoryList({
  685. model: model,
  686. token: localStorage.getItem("localToken"),
  687. });
  688. }
  689. }
  690. if (activeTab.value === "AIchat" || activeTab.value === "deepNine") {
  691. isScrolling.value = false; //回复滚动到底部方法
  692. // 停止AiEmotion页面的高度监听器
  693. stopAiEmotionHeightObserver();
  694. setTimeout(() => {
  695. // throttledSmoothScrollToBottom();
  696. }, 100);
  697. } else if (activeTab.value === "AiEmotion") {
  698. // 启动AiEmotion页面的高度监听器
  699. await nextTick(); // 确保DOM更新后启动监听器
  700. startAiEmotionHeightObserver();
  701. } else {
  702. // 其他页面时停止AiEmotion页面的高度监听器
  703. stopAiEmotionHeightObserver();
  704. }
  705. // AiEmotion页面不执行自动滚动,避免刷新后滚动到底部
  706. // setTimeout(throttledSmoothScrollToBottom, 100);
  707. },
  708. { deep: true, immediate: true }
  709. );
  710. // 获取token的核心函数
  711. // const fnGetToken = () => {
  712. // // console.log('进入fnGetToken')
  713. // window.JWready = (ress) => {
  714. // // console.log('进入JWready')
  715. // try {
  716. // ress = JSON.parse(ress);
  717. // // console.log(ress, 'ress')
  718. // } catch (error) {
  719. // console.log(error, "fnGetToken error");
  720. // } //platform为5是app端
  721. // // platform.value = ress.data.platform
  722. // // 处理平台判断
  723. // console.log(ress.data.platform, "ress.data.platform");
  724. // if (!ress.data.platform) {
  725. // // 非App环境通过URL参数获取
  726. // localStorage.setItem(
  727. // "localToken",
  728. // decodeURIComponent(String(getQueryVariable("token")))
  729. // );
  730. // // localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w")
  731. // } else {
  732. // // App环境通过桥接获取
  733. // useAppBridge().packageFun(
  734. // "JWgetStorage",
  735. // (response) => {
  736. // const res = JSON.parse(response); // 解析返回的结果
  737. // localStorage.setItem("localToken", res.data);
  738. // // localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w")
  739. // },
  740. // 5,
  741. // {
  742. // key: "token",
  743. // }
  744. // );
  745. // }
  746. // };
  747. // // console.log('出来了')
  748. // // 触发App桥接
  749. // useAppBridge().packageFun("JWwebReady", () => {}, 5, {});
  750. // };
  751. // 在setTimeout中延迟执行
  752. // setTimeout(() => {
  753. // fnGetToken();
  754. // }, 800);
  755. const heightListener = () => {
  756. const tabContainer = getCurrentScrollContainer();
  757. if (!tabContainer) return;
  758. let befortop = 0;
  759. const scrollHandler = () => {
  760. const aftertop = tabContainer.scrollTop;
  761. // 新增底部判断逻辑
  762. const isBottom =
  763. aftertop + tabContainer.offsetHeight + 70 >= tabContainer.scrollHeight;
  764. if (activeTab.value === "AIchat") {
  765. if (aftertop - befortop > 0) {
  766. // console.log("向下滚动");
  767. isScrolling.value = true;
  768. } else {
  769. // console.log("向上滚动");
  770. isScrolling.value = true;
  771. }
  772. // 添加底部状态检测
  773. if (isBottom) {
  774. // console.log("滚动到底部");
  775. isScrolling.value = false;
  776. }
  777. }
  778. befortop = aftertop;
  779. };
  780. // console.log(isScrolling.value, 'isScrolling.value')
  781. tabContainer.addEventListener("scroll", scrollHandler);
  782. };
  783. const throttledHeightListener = _.throttle(heightListener, 500, {
  784. trailing: false,
  785. });
  786. // const goToRecharge = () => {
  787. // console.log("点击充值");
  788. // // http://39.101.133.168:8919/payment/recharge/index?
  789. // // url=http%3A%2F%2Flocalhost%3A8080%2FLiveActivity%2Fpck
  790. // // &platform=1
  791. // // &token=+S4h5QEE1hTIb4CxphrnbZi0+fEeMx8pywnIlrmTmo4QO6IolWnVWu5r+J4rKXMwK41UPfKqyIp+RvWmtM8
  792. // const userAgent = navigator.userAgent.toLowerCase();
  793. // const mobileKeywords = ["mobile", "android", "iphone", "ipad", "ipod"];
  794. // const isMobile = mobileKeywords.some((keyword) =>
  795. // userAgent.includes(keyword)
  796. // );
  797. // console.log(isMobile ? "手机" : "电脑");
  798. // const url = encodeURI("http://39.101.133.168:8857/aixiaocaishen/homePage");
  799. // console.log(url, "url");
  800. // const platform = isMobile ? 2 : 1;
  801. // const token = encodeURIComponent(localStorage.getItem("localToken"));
  802. // console.log(token, "token");
  803. // const rechargeUrl =
  804. // "http://39.101.133.168:8919/payment/recharge/index?" +
  805. // "url=" +
  806. // url +
  807. // "&platform=" +
  808. // platform +
  809. // "&token=" +
  810. // token;
  811. // console.log(rechargeUrl, "rechargeUrl");
  812. // window.location.href = rechargeUrl;
  813. // // window.open(rechargeUrl)
  814. // };
  815. const adjustFooterPosition = (height) => {
  816. const html = document.querySelector("html");
  817. const body = document.querySelector("body");
  818. const isAndroid = /Android/i.test(navigator.userAgent);
  819. if (isAndroid) {
  820. console.log("是安卓设备");
  821. console.log("window.visualViewport", window.visualViewport.height);
  822. const homePage = document.querySelector(".homepage");
  823. homePage.style.height = `${height}px`;
  824. // homePage.style.height = `460px`;
  825. html.scrollTop = 0;
  826. } else {
  827. console.log("非安卓设备");
  828. console.log("调整底部位置", height);
  829. const homePage = document.querySelector(".homepage");
  830. homePage.style.height = `${height}px`;
  831. html.scrollTop = 0;
  832. }
  833. setTimeout(() => {
  834. // 隐藏滚动条
  835. html.style.overflow = "hidden";
  836. body.style.overflow = "hidden";
  837. }, 200);
  838. };
  839. // 是否正在输入法组合
  840. const inputing = ref(false);
  841. const onFocus = function () {
  842. const visualViewport = window.visualViewport;
  843. // 获取可视区域高度
  844. setTimeout(() => {
  845. console.log("输入框聚焦");
  846. console.log(visualViewport.height, "visualViewport.height");
  847. const keyboardHeight = window.innerHeight - visualViewport.height;
  848. console.log(window.innerHeight, "window.innerHeight");
  849. console.log(keyboardHeight, "keyboardHeight");
  850. adjustFooterPosition(visualViewport.height);
  851. }, 200);
  852. };
  853. const onBlur = function () {
  854. inputing.value = false;
  855. const visualViewport = window.visualViewport;
  856. setTimeout(() => {
  857. console.log("输入框失焦");
  858. const keyboardHeight = window.innerHeight - visualViewport.height;
  859. console.log(window.innerHeight, "window.innerHeight");
  860. console.log(visualViewport.height, "visualViewport.height");
  861. console.log(keyboardHeight, "keyboardHeight");
  862. adjustFooterPosition(visualViewport.height);
  863. }, 200);
  864. };
  865. // window.addEventListener("resize", () => {
  866. // // 检测是否为iOS设备
  867. // const isIOS = /iPhone|iPad|iPod|ios/i.test(navigator.userAgent);
  868. // console.log("是否为iOS设备:", isIOS);
  869. // if (!isIOS) {
  870. // console.log("窗口大小变化");
  871. // const homePage = document.querySelector(".homepage");
  872. // homePage.style.height = `${window.innerHeight}px`;
  873. // }
  874. // });
  875. let touchmoveHandlerRef = null;
  876. const touchmoveHandler = (e) => {
  877. if (!dataStore.isFeedback) {
  878. if (historyRecordRef) {
  879. if (!historyRecordRef.value.isCollapsed) {
  880. return;
  881. }
  882. }
  883. // 判断触摸目标是否在当前活动页面的可滚动区域内
  884. const currentContainer = getCurrentScrollContainer();
  885. const isScrollableArea =
  886. currentContainer && currentContainer.contains(e.target);
  887. // 如果不在可滚动区域,则阻止滚动
  888. if (!isScrollableArea) {
  889. e.preventDefault();
  890. }
  891. }
  892. };
  893. const judgeDevice = async () => {
  894. // 延时300ms
  895. await new Promise((resolve) => setTimeout(resolve, 200));
  896. const userAgent = navigator.userAgent;
  897. isMobile.value =
  898. /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
  899. userAgent
  900. );
  901. console.log("当前设备为:", isMobile.value ? "移动端" : "PC端");
  902. };
  903. const throttledJudgeDevice = _.throttle(judgeDevice, 300, {
  904. trailing: false,
  905. });
  906. const expandHistory = () => {
  907. if (
  908. historyRecordRef.value &&
  909. historyRecordRef.value.isCollapsed !== undefined
  910. ) {
  911. console.log("存在");
  912. historyRecordRef.value.isCollapsed = !historyRecordRef.value.isCollapsed;
  913. if (activeTab.value == "AIchat") {
  914. chatStore.aiChatCall = true;
  915. } else if (activeTab.value == "AiEmotion") {
  916. chatStore.aiEmotionCall = true;
  917. } else if (activeTab.value == "deepNine") {
  918. chatStore.deepNineCall = true;
  919. }
  920. }
  921. };
  922. const feedbackBack = () => {
  923. dataStore.isFeedback = false;
  924. };
  925. const backToHome = () => {
  926. if (isMobile.value) {
  927. console.log("用户是移动端");
  928. // 调用原生方法跳转到首页
  929. uni.postMessage({
  930. data: {
  931. val: {
  932. name: "JWopenView",
  933. extra: {
  934. data: {
  935. type: 3,
  936. },
  937. },
  938. },
  939. },
  940. });
  941. } else {
  942. console.log("用户是pc端");
  943. const env = import.meta.env.VITE_ENV;
  944. console.log("当前的环境为:", env);
  945. if (env == "development" || env == "test") {
  946. window.parent.location.href =
  947. "http://121.89.234.155:8807/hljw/homepage?menu=999999991";
  948. } else {
  949. window.parent.postMessage(
  950. {
  951. type: "NAVIGATE_TO_HOMEPAGE",
  952. menu: "999999991",
  953. },
  954. "*"
  955. );
  956. }
  957. // window.parent.location.href = window.parent.document.referrer
  958. }
  959. };
  960. // 8.18金币兑换Token start
  961. const userInfo = ref({
  962. nickname: "",
  963. img: "",
  964. jwcode: "",
  965. });
  966. const changeRule = ref({
  967. gold: 1,
  968. token: 1,
  969. });
  970. const changeLevelList = ref([
  971. { position: 10, calculatedPosition: 10 },
  972. { position: 20, calculatedPosition: 20 },
  973. { position: 50, calculatedPosition: 50 },
  974. { position: 100, calculatedPosition: 100 },
  975. { position: 200, calculatedPosition: 200 },
  976. { position: 500, calculatedPosition: 500 },
  977. { position: 1000, calculatedPosition: 1000 },
  978. ]);
  979. const activeLevel = ref(
  980. changeLevelList.value[0] || { position: 10, calculatedPosition: 10 }
  981. );
  982. const gold = ref(90);
  983. // 点击剩余次数会弹出的弹窗
  984. // 新增一个 ref 来控制弹窗的显示与隐藏
  985. const dialogVisible = ref(false);
  986. const rechargeDialogVisible = ref(false);
  987. const confirmDialogVisible = ref(false);
  988. const changeSuccessDialogVisible = ref(false);
  989. // 图片加载错误处理
  990. const handleImageError = (event) => {
  991. console.error("图片加载失败:", event.target.src);
  992. // 可以设置默认图片或重试逻辑
  993. event.target.src =
  994. "https://cdn.legu168.com/jtzy/Product/pcjingwang/images/userimg.png";
  995. };
  996. // 获取次数
  997. const showCount = async () => {
  998. try {
  999. if (
  1000. !dataStore.userInfo.img ||
  1001. !dataStore.userInfo.nickname ||
  1002. !dataStore.userInfo.jwcode
  1003. ) {
  1004. console.log("缺少用户信息,调用方法");
  1005. await getUserInfo();
  1006. }
  1007. userInfo.value.nickname = dataStore.userInfo.nickname;
  1008. userInfo.value.img = dataStore.userInfo.img;
  1009. userInfo.value.jwcode = dataStore.userInfo.jwcode;
  1010. console.log("userInfo", userInfo.value);
  1011. const [res, res2] = await Promise.all([
  1012. showExchangeAPI(),
  1013. getGoldCoinAPI({
  1014. token: String(localStorage.getItem("localToken")),
  1015. }),
  1016. ]);
  1017. changeLevelList.value = res.data;
  1018. activeLevel.value = changeLevelList.value[0];
  1019. changeRule.value.token = res.data[0].ratio;
  1020. gold.value = res2.data.total;
  1021. // 显示弹窗
  1022. dialogVisible.value = true;
  1023. console.log("dialogVisible 的值:", dialogVisible.value); // 添加日志确认
  1024. } catch (e) {
  1025. console.error("获取兑换列表出错", e);
  1026. }
  1027. };
  1028. const chooseLevel = (item) => {
  1029. activeLevel.value = item;
  1030. };
  1031. const changeToken = () => {
  1032. if (gold.value < activeLevel.value.position) {
  1033. rechargeDialogVisible.value = true;
  1034. return;
  1035. } else {
  1036. confirmDialogVisible.value = true;
  1037. }
  1038. };
  1039. const goRecharge = () => {
  1040. console.log("执行前往充值方法");
  1041. sessionStorage.setItem("rechargeFlag", "1");
  1042. sessionStorage.setItem("activeLevel", JSON.stringify(activeLevel.value));
  1043. if (isMobile.value) {
  1044. console.log("用户是移动端");
  1045. uni.postMessage({
  1046. data: {
  1047. val: {
  1048. name: "JWopenView",
  1049. extra: {
  1050. data: {
  1051. type: 4,
  1052. },
  1053. },
  1054. },
  1055. },
  1056. });
  1057. } else {
  1058. console.log("用户是pc端");
  1059. const env = import.meta.env.VITE_ENV;
  1060. console.log("当前的环境为:", env);
  1061. if (env == "development" || env == "test") {
  1062. window.parent.location.href =
  1063. "http://121.89.234.155:8807/user/myGold?token=" +
  1064. encodeURIComponent(localStorage.getItem("localToken")) +
  1065. "&where=xiaocaishen&successUrl=https://hwjb.homilychart.com/aixiaocaishen/homePage";
  1066. // "&where=xiaocaishen&successUrl=http://192.168.1.5:3000/aixiaocaishen/homePage";
  1067. } else {
  1068. window.parent.location.href =
  1069. "https://web.homilychart.com/user/myGold?token=" +
  1070. encodeURIComponent(localStorage.getItem("localToken")) +
  1071. "&where=xiaocaishen&successUrl=https://mp.homilychart.com/aixiaocaishen/homePage";
  1072. }
  1073. // window.parent.location.href = window.parent.document.referrer
  1074. }
  1075. };
  1076. const goChange = async () => {
  1077. try {
  1078. await exchangeAPI({
  1079. token: String(localStorage.getItem("localToken")),
  1080. num: activeLevel.value.position,
  1081. });
  1082. confirmDialogVisible.value = false;
  1083. dialogVisible.value = false;
  1084. changeSuccessDialogVisible.value = true;
  1085. // setTimeout(() => {
  1086. // changeSuccessDialogVisible.value = false;
  1087. // }, 2000);
  1088. // 刷新次数
  1089. await chatStore.getUserCount();
  1090. } catch (e) {
  1091. console.error("兑换失败", e);
  1092. }
  1093. };
  1094. // 8.18金币兑换Token end
  1095. onMounted(async () => {
  1096. // 检查是否需要显示Token规则提示框
  1097. checkTokenRuleOnPageLoad();
  1098. throttledJudgeDevice();
  1099. // 禁用全局触摸滚动
  1100. touchmoveHandlerRef = touchmoveHandler;
  1101. document.addEventListener("touchmove", touchmoveHandlerRef, {
  1102. passive: false,
  1103. });
  1104. setHeight(document.getElementById("testId")); // 给父组件发送窗口高度
  1105. // 获取次数
  1106. await chatStore.getUserCount();
  1107. // 滚动到底部
  1108. throttledSmoothScrollToBottom();
  1109. // 监听页面高度
  1110. throttledHeightListener();
  1111. // 添加输入框焦点处理
  1112. // handleInputFocus();
  1113. // 初始化视口高度变量
  1114. // updateAppHeight();
  1115. // 添加原生事件监听器
  1116. window.showCountHandler = showCount;
  1117. window.addEventListener("resize", throttledJudgeDevice);
  1118. window.receiveUniAppMessage = async function (messageData) {
  1119. console.log("收到 uni-app 消息:", messageData);
  1120. // 根据消息类型进行不同处理
  1121. switch (messageData.type) {
  1122. case "paymentSuccess":
  1123. // 处理支付成功消息
  1124. const [res1, res2] = await Promise.all([
  1125. godExchangeAPI({ state: 1 }),
  1126. getGoldCoinAPI({ token: String(localStorage.getItem("localToken")) }),
  1127. ]);
  1128. gold.value = res2.data.total;
  1129. rechargeDialogVisible.value = false;
  1130. break;
  1131. default:
  1132. console.log("未知消息类型:", messageData.type);
  1133. }
  1134. };
  1135. if (
  1136. sessionStorage.getItem("rechargeFlag") == "1" &&
  1137. getQueryVariable("successType") == "success"
  1138. ) {
  1139. await godExchangeAPI({ state: 1 });
  1140. await showCount();
  1141. activeLevel.value =
  1142. JSON.parse(sessionStorage.getItem("activeLevel")) ||
  1143. changeLevelList.value[0];
  1144. console.log("activeLevel", activeLevel.value);
  1145. sessionStorage.removeItem("activeLevel");
  1146. sessionStorage.setItem("rechargeFlag", "0");
  1147. }
  1148. });
  1149. onUnmounted(() => {
  1150. window.removeEventListener("resize", throttledJudgeDevice);
  1151. if (touchmoveHandlerRef) {
  1152. console.log("卸载touchmoveHandlerRef组件");
  1153. document.removeEventListener("touchmove", touchmoveHandlerRef);
  1154. }
  1155. // 清理AiEmotion页面的高度监听器
  1156. stopAiEmotionHeightObserver();
  1157. delete window.showCountHandler;
  1158. delete window.receiveUniAppMessage;
  1159. // 清理图表交互相关的定时器和全局函数
  1160. if (chartInteractionTimer.value) {
  1161. clearTimeout(chartInteractionTimer.value);
  1162. }
  1163. if (window.handleChartInteractionStart) {
  1164. delete window.handleChartInteractionStart;
  1165. }
  1166. if (window.handleChartInteractionEnd) {
  1167. delete window.handleChartInteractionEnd;
  1168. }
  1169. });
  1170. </script>
  1171. <template>
  1172. <div class="homepage" id="testId">
  1173. <!-- 历史记录组件 -->
  1174. <HistoryRecord ref="historyRecordRef" :current-type="activeTab" @selectRecord="handleHistorySelect"
  1175. :isMobile="isMobile" @showAnnouncement="showAnnouncement" @showFeedback="showFeedback" />
  1176. <div v-if="isMobile && !historyRecordRef?.isCollapsed" class="zhezhao" @click="expandHistory"></div>
  1177. <el-container v-if="!dataStore.isFeedback" class="main-container" :class="{
  1178. collapsed: !isMobile && historyRecordRef?.isCollapsed,
  1179. unCollapsed: !isMobile && !historyRecordRef?.isCollapsed,
  1180. }">
  1181. <!-- AI小财神头部 logo 次数 公告 -->
  1182. <el-header class="homepage-head">
  1183. <!-- logo -->
  1184. <div class="homepage-logo" v-if="isMobile">
  1185. <img class="expand" @click="expandHistory"
  1186. src="https://d31zlh4on95l9h.cloudfront.net/images/37fe3d79a8a700f6c674c9f0e7af066b.png" alt="icon" />
  1187. <img :src="logo" alt="图片加载失败" class="logo1" />
  1188. <!-- <img :src="madeInHL" alt="图片加载失败" class="logo2" /> -->
  1189. </div>
  1190. <div class="homepage-right-group" v-if="isMobile">
  1191. <div class="count-badge" @click="showCount">
  1192. <img src="https://d31zlh4on95l9h.cloudfront.net/images/74e20c65c9ef2526477c63ad68698a50.png"
  1193. class="action-btn" />
  1194. <div class="count-number">{{ UserCount }}</div>
  1195. <div class="clickGetCount">点击获取Token</div>
  1196. </div>
  1197. <div class="backToHomeBtn" @click="backToHome()">
  1198. <img src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png" alt="返回首页"
  1199. class="backImg" />
  1200. <div class="backContent">返回首页</div>
  1201. </div>
  1202. <!-- <img
  1203. :src="announcementBtn"
  1204. class="announcement-btn action-btn"
  1205. @click="showAnnouncement"
  1206. />
  1207. <img
  1208. :src="feedbackBtn"
  1209. class="announcement-btn action-btn"
  1210. @click="showFeedback"
  1211. /> -->
  1212. </div>
  1213. </el-header>
  1214. <!-- 主体部分小人 问题轮询图 对话内容 -->
  1215. <el-main class="homepage-body">
  1216. <div class="main-wrapper">
  1217. <section class="tab-section">
  1218. <div class="tab-container" :class="{
  1219. pcTabContainer: !isMobile,
  1220. }">
  1221. <div class="tab-items-container">
  1222. <div v-for="(tab, index) in tabs" :key="tab.name" @click="setActiveTab(tab.name, index)" :class="[
  1223. 'tab-item',
  1224. { active: activeIndex === index && !isAnnouncementVisible },
  1225. ]">
  1226. <span>{{ tab.label }}</span>
  1227. </div>
  1228. </div>
  1229. <div v-if="!isMobile" class="pc-count-badge">
  1230. <div class="pc-countBtn" @click="showCount">
  1231. <div class="pc-action-btn">
  1232. <div class="pc-count-number">{{ UserCount }}</div>
  1233. </div>
  1234. <div class="pc-clickGetCount">点击获取Token</div>
  1235. </div>
  1236. <div class="pc-backToHomeBtn" @click="backToHome()">
  1237. <img src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png"
  1238. alt="返回首页" class="pc-backImg" />
  1239. <div class="pc-backContent">返回首页</div>
  1240. </div>
  1241. </div>
  1242. </div>
  1243. </section>
  1244. <!-- AIchat页面的独立滚动容器 -->
  1245. <div v-show="activeTab === 'AIchat'" class="tab-content" :class="{
  1246. pcTabContent: !isMobile,
  1247. }" ref="tabContentAIchat">
  1248. <component v-if="activeTab === 'AIchat'" :is="activeComponent" :messages="messages"
  1249. @updateMessage="updateMessage" @sendMessage="sendMessage" @ensureAIchat="ensureAIchat"
  1250. @enableInput="enableInput" />
  1251. </div>
  1252. <!-- AiEmotion页面的独立滚动容器 -->
  1253. <div v-show="activeTab === 'AiEmotion'" class="tab-content" :class="{
  1254. pcTabContent: !isMobile,
  1255. }" ref="tabContentAiEmotion">
  1256. <component v-if="activeTab === 'AiEmotion'" :is="activeComponent" :messages="messages"
  1257. @updateMessage="updateMessage" @sendMessage="sendMessage" @ensureAIchat="ensureAIchat"
  1258. @enableInput="enableInput" @scrollToBottom="handleAiEmotionScrollToBottom" @showCount="showCount"
  1259. ref="aiEmotionRef" />
  1260. </div>
  1261. <!-- deepNine页面的独立滚动容器 -->
  1262. <div v-show="activeTab === 'deepNine'" class="tab-content" :class="{
  1263. pcTabContent: !isMobile,
  1264. }" ref="tabContentDeepNine">
  1265. <component v-if="activeTab === 'deepNine'" :is="activeComponent" :messages="messages"
  1266. @updateMessage="updateMessage" @sendMessage="sendMessage" @ensureAIchat="ensureAIchat"
  1267. @enableInput="enableInput" @scrollToBottom="handleDeepNineScrollToBottom" @showCount="showCount"
  1268. ref="deepNineRef" />
  1269. </div>
  1270. </div>
  1271. </el-main>
  1272. <!-- 尾部 问题输入框 深度思考 多语言 语音播报 -->
  1273. <el-footer class="homepage-footer" :class="{
  1274. pcFooter: !isMobile,
  1275. }" id="input">
  1276. <!-- 第一行按钮 -->
  1277. <div class="footer-first-line">
  1278. <div class="left-group">
  1279. <!-- <img v-if="isThinking" :src="thinkActive" @click="toggleThink" class="action-btn" />
  1280. <img v-else :src="thinkNoActive" @click="toggleThink" class="action-btn" />
  1281. <img :src="languageBtn" @click="changeLanguage" class="action-btn" /> -->
  1282. <!-- PC端按钮 -->
  1283. <template v-if="!isMobile">
  1284. <!-- 夺宝奇兵大模型按钮 -->
  1285. <img :src="activeTab === 'AIchat' ? dbqbButton01 : dbqbButton02" @click="setActiveTab('AIchat', 0)"
  1286. class="action-btn model-btn" alt="夺宝奇兵大模型" />
  1287. <!-- AI情绪大模型按钮 -->
  1288. <img :src="activeTab === 'AiEmotion' ? emotionButton01 : emotionButton02
  1289. " @click="setActiveTab('AiEmotion', 1)" class="action-btn model-btn" alt="AI情绪大模型" />
  1290. <!-- 深度九大模型按钮 -->
  1291. <img :src="activeTab === 'deepNine' ? emotionButton01 : emotionButton02
  1292. " @click="setActiveTab('deepNine', 2)" class="action-btn model-btn" alt="深度九大模型" />
  1293. </template>
  1294. <!-- 手机端下拉选择 -->
  1295. <template v-else>
  1296. <el-select v-model="activeTabMobile" class="mobile-model-select" @change="handleMobileTabChange">
  1297. <el-option label="夺宝奇兵大模型" value="AIchat" />
  1298. <el-option label="AI情绪大模型" value="AiEmotion" />
  1299. <el-option label="深度九大模型" value="deepNine" />
  1300. </el-select>
  1301. </template>
  1302. <!-- <img v-if="
  1303. getCurrentAudioStore().isVoiceEnabled &&
  1304. getCurrentAudioStore().isPlaying
  1305. " :src="voice" @click="toggleVoice" class="action-btn" style="animation: pulse 1.5s infinite" />
  1306. <img v-else-if="
  1307. getCurrentAudioStore().isVoiceEnabled &&
  1308. !getCurrentAudioStore().isPlaying
  1309. " :src="voiceNoActive" @click="toggleVoice" class="action-btn" />
  1310. <img v-else :src="voiceNoActive" @click="toggleVoice" class="action-btn" /> -->
  1311. </div>
  1312. </div>
  1313. <!-- 第二行输入框 -->
  1314. <div class="footer-second-line">
  1315. <!-- <img :src="msgBtn" class="msg-icon" /> -->
  1316. <div class="input-container">
  1317. <el-input type="textarea" v-model="message" @focus="onFocus" @blur="onBlur"
  1318. :autosize="{ minRows: 1, maxRows: 4 }" class="msg-input" @keydown.enter.exact.prevent="
  1319. isLoading || isInputDisabled ? null : sendMessage()
  1320. " :disabled="isInputDisabled" resize="none" :class="{ input: !message && !inputing }"
  1321. @compositionstart="inputing = true" @compositionend="inputing = false">
  1322. </el-input>
  1323. <img :src="isInputDisabled
  1324. ? 'https://d31zlh4on95l9h.cloudfront.net/images/aa192bcbc1682c97e1bc6fb422f2afff.png'
  1325. : 'https://d31zlh4on95l9h.cloudfront.net/images/e6ec2ae238ced85b74e0912e988f243e.png'
  1326. " @click="sendMessage" class="action-btn send-btn-inner" :style="{
  1327. opacity: isInputDisabled ? 0.5 : 1,
  1328. cursor: isInputDisabled ? 'not-allowed' : 'pointer',
  1329. }" />
  1330. </div>
  1331. </div>
  1332. </el-footer>
  1333. </el-container>
  1334. <el-container v-else class="main-container" :class="{
  1335. collapsed: historyRecordRef?.isCollapsed && !isMobile,
  1336. unCollapsed: !historyRecordRef?.isCollapsed && !isMobile,
  1337. }">
  1338. <el-header class="homepage-head">
  1339. <!-- logo -->
  1340. <div class="homepage-logo">
  1341. <img src="https://d31zlh4on95l9h.cloudfront.net/images/4c91fce359a1c184772857594c38e3b4.png" alt="返回按钮"
  1342. class="backToHomeImg" @click="feedbackBack" />
  1343. <!-- <img :src="madeInHL" alt="图片加载失败" class="logo2" /> -->
  1344. </div>
  1345. <div class="homepage-right-group">
  1346. <div class="count-badge" @click="showCount">
  1347. <img src="https://d31zlh4on95l9h.cloudfront.net/images/74e20c65c9ef2526477c63ad68698a50.png"
  1348. class="action-btn" />
  1349. <div class="count-number">{{ UserCount }}</div>
  1350. <div class="clickGetCount">点击获取Token</div>
  1351. </div>
  1352. <div class="backToHomeBtn" @click="backToHome()">
  1353. <img src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png" alt="返回首页"
  1354. class="backImg" />
  1355. <div class="backContent">返回首页</div>
  1356. </div>
  1357. <!-- <img
  1358. :src="announcementBtn"
  1359. class="announcement-btn action-btn"
  1360. @click="showAnnouncement"
  1361. />
  1362. <img
  1363. :src="feedbackBtn"
  1364. class="announcement-btn action-btn"
  1365. @click="showFeedback"
  1366. /> -->
  1367. </div>
  1368. </el-header>
  1369. <!-- 主体部分小人 问题轮询图 对话内容 -->
  1370. <el-main class="homepage-body">
  1371. <component :is="activeTwoTab" />
  1372. </el-main>
  1373. </el-container>
  1374. <!-- 弹窗 -->
  1375. <!-- 新增弹窗组件 -->
  1376. <el-dialog v-if="!isMobile" v-model="dialogVisible" width="48%">
  1377. <!-- 中间内容部分 -->
  1378. <div class="changeMsg">
  1379. <div class="changeInfo">
  1380. <div class="changeImg">
  1381. <img :src="userInfo.img" alt="头像" class="changeImgClass" @error="handleImageError" />
  1382. </div>
  1383. <div class="changeContent">
  1384. <div class="changeUsername">{{ userInfo.nickname }}</div>
  1385. <div class="changeJwcode">精网号{{ userInfo.jwcode }}</div>
  1386. </div>
  1387. </div>
  1388. <div class="changeRule" @click="openTokenRuleDialog">
  1389. 兑换规则{{ changeRule.gold }}金币={{ changeRule.token }}Token
  1390. <div>点击查看详情</div>
  1391. </div>
  1392. </div>
  1393. <div class="changeLevel">
  1394. <div class="changeLevelTitle">兑换Token</div>
  1395. <div class="changeLevelContent">
  1396. <div class="changeLevelItems" v-for="item in changeLevelList" :key="item" :class="{
  1397. changeLevelItemsActive: item.position == activeLevel.position,
  1398. }" @click="chooseLevel(item)">
  1399. <div class="changeLevelItem">
  1400. <div class="changeLevelItemToken">
  1401. <img src="https://d31zlh4on95l9h.cloudfront.net/images/403ef762dd2f335df3b0c9e3fe488375.png" alt="token"
  1402. class="changeLevelItemTokenImg" />
  1403. {{ item.calculatedPosition }}
  1404. </div>
  1405. <div class="changeLevelItemToken">{{ item.position }} 金币</div>
  1406. </div>
  1407. </div>
  1408. </div>
  1409. </div>
  1410. <div class="changeNow">
  1411. 应付金额
  1412. <div class="changePay">{{ activeLevel.position }}</div>
  1413. (金币余额{{ gold }})
  1414. </div>
  1415. <div class="changeBtn" @click="changeToken">立即兑换</div>
  1416. </el-dialog>
  1417. <el-dialog v-else v-model="dialogVisible" width="80%">
  1418. <!-- 中间内容部分 -->
  1419. <div class="changeMsg">
  1420. <div class="changeInfo">
  1421. <div class="changeImg">
  1422. <img :src="userInfo.img" alt="头像" class="changeImgClass" @error="handleImageError" />
  1423. </div>
  1424. <div class="changeContent">
  1425. <div class="changeJwcode">精网号{{ userInfo.jwcode }}</div>
  1426. </div>
  1427. </div>
  1428. </div>
  1429. <div class="changeLevel">
  1430. <div class="changeLevelTitle">
  1431. 兑换Token
  1432. <div class="changeRule" @click="openTokenRuleDialog">
  1433. (兑换规则{{ changeRule.gold }}金币={{ changeRule.token }}Token)
  1434. <div>点击查看详情</div>
  1435. </div>
  1436. </div>
  1437. <div class="changeLevelContent">
  1438. <div class="changeLevelItems" v-for="item in changeLevelList" :key="item" :class="{
  1439. changeLevelItemsActive: item.position == activeLevel.position,
  1440. }" @click="chooseLevel(item)">
  1441. <div class="changeLevelItem">
  1442. <div class="changeLevelItemToken">
  1443. <img src="https://d31zlh4on95l9h.cloudfront.net/images/403ef762dd2f335df3b0c9e3fe488375.png" alt="token"
  1444. class="changeLevelItemTokenImg" />
  1445. {{ item.calculatedPosition }}
  1446. </div>
  1447. <div class="changeLevelItemToken">{{ item.position }} 金币</div>
  1448. </div>
  1449. </div>
  1450. </div>
  1451. </div>
  1452. <div class="changeNow">
  1453. 应付金额
  1454. <div class="changePay">{{ activeLevel.position }}</div>
  1455. (金币余额{{ gold }})
  1456. </div>
  1457. <div class="changeBtn" @click="changeToken">立即兑换</div>
  1458. </el-dialog>
  1459. <el-dialog v-model="rechargeDialogVisible" :width="isMobile ? '60%' : '30%'" :show-close="false">
  1460. <div class="rechargeDialogTitle">温馨提示</div>
  1461. <div class="rechargeDialogContent">
  1462. 尊敬的用户您好您当前的金币余额不足无法进行兑换可充值金币后进行兑换点击下方的前往充值可进行充值
  1463. </div>
  1464. <div class="rechargeDialogBtnGroup">
  1465. <div class="recharge" @click="goRecharge">前往充值</div>
  1466. <div class="rechargeDialogCancel" @click="rechargeDialogVisible = false">
  1467. 取消
  1468. </div>
  1469. </div>
  1470. </el-dialog>
  1471. <el-dialog v-model="confirmDialogVisible" :width="isMobile ? '60%' : '30%'" :show-close="false" align-center="true">
  1472. <div class="confirmDialogTitle">兑换</div>
  1473. <div class="confirmDialogContent">
  1474. 尊敬的用户您好您确认要花费{{ activeLevel.position }}金币兑换{{
  1475. activeLevel.calculatedPosition
  1476. }}Token吗
  1477. </div>
  1478. <div class="confirmDialogBtnGroup">
  1479. <div class="confirmDialogConfirm" @click="goChange()">确认</div>
  1480. <div class="confirmDialogCancel" @click="confirmDialogVisible = false">
  1481. 取消
  1482. </div>
  1483. </div>
  1484. </el-dialog>
  1485. <el-dialog v-model="changeSuccessDialogVisible" :width="isMobile ? '60%' : '30%'" :show-close="false"
  1486. class="changeSuccessDialog" align-center center>
  1487. <div class="changeSuccessDialogTitle">
  1488. <img v-if="!isMobile" src="https://d31zlh4on95l9h.cloudfront.net/images/84edd341b2ddec464fc4475254f7a309.png"
  1489. style="scale: 0.7" alt="token图标" />
  1490. 兑换成功
  1491. </div>
  1492. <div class="changeSuccessDialogContent">
  1493. 尊敬的用户恭喜您成功兑换{{ activeLevel.calculatedPosition }} Token
  1494. </div>
  1495. <div class="changeSuccessDialogFooter">
  1496. <button class="confirmButton" @click="changeSuccessDialogVisible = false">
  1497. 确定
  1498. </button>
  1499. </div>
  1500. </el-dialog>
  1501. <!-- Token规则提示框 -->
  1502. <div v-if="tokenRuleDialogVisible" class="tokenRuleDialog" @click="closeTokenRuleDialog">
  1503. <div class="tokenRuleDialogContent" @click.stop>
  1504. <div class="tokenRuleDialogClose" @click="closeTokenRuleDialog">
  1505. <el-icon>
  1506. <Close />
  1507. </el-icon>
  1508. </div>
  1509. <div class="tokenRuleDialogTitle">Token规则</div>
  1510. <div class="tokenRuleSection">
  1511. <div class="tokenRuleSectionTitle">Token消耗规则</div>
  1512. <div class="tokenRuleItem">
  1513. "夺宝奇兵大模型""AI情绪大模型""深度九大模型"中搜索股票若搜索成功内容正常生成则会消耗1Token
  1514. </div>
  1515. <div class="tokenRuleItem">
  1516. "夺宝奇兵大模型""AI情绪大模型""深度九大模型"中搜索股票若搜索有误无法生成内容则不会消耗Token
  1517. </div>
  1518. <div class="tokenRuleItem">
  1519. 搜索同一只股票产出内容相同时只扣除1Token
  1520. </div>
  1521. <div class="tokenRuleItem">
  1522. "夺宝奇兵""AI小财神"中Token是互通的
  1523. </div>
  1524. </div>
  1525. <div class="tokenRuleSection">
  1526. <div class="tokenRuleSectionTitle">Token兑换规则</div>
  1527. <div class="tokenRuleItem">
  1528. 点击右上角"获取Token"即可进入Token兑换页进行金币兑换Token
  1529. </div>
  1530. <div class="tokenRuleItem">
  1531. 金币兑换Token的比例为1金币=1Token一经兑换不予退还
  1532. </div>
  1533. </div>
  1534. <div class="tokenRuleNote">
  1535. 注意报告生成过程中请耐心等待在此期间请勿进行页面刷新操作以免导致报告生成进程中断
  1536. </div>
  1537. </div>
  1538. </div>
  1539. </div>
  1540. </template>
  1541. <style scoped>
  1542. /* 标签栏 */
  1543. .tab-container {
  1544. display: flex;
  1545. margin-bottom: 10px;
  1546. height: 100%;
  1547. position: relative;
  1548. align-items: center;
  1549. width: 100%;
  1550. /* 使用三段式布局 */
  1551. justify-content: space-between;
  1552. }
  1553. .tab-items-container {
  1554. display: flex;
  1555. justify-content: center;
  1556. flex: 1;
  1557. gap: 200px;
  1558. }
  1559. .pcTabContainer {
  1560. padding: 0 20px;
  1561. /* 添加内边距,避免内容贴边 */
  1562. }
  1563. .tab-item {
  1564. cursor: pointer;
  1565. padding: 8px 12px;
  1566. font-size: clamp(18px, 3vw, 20px);
  1567. color: #fff;
  1568. transition: all 0.3s;
  1569. border-bottom: 2px solid transparent;
  1570. font-weight: bold;
  1571. /* 确保tab项目不会被挤压 */
  1572. flex-shrink: 0;
  1573. }
  1574. .tab-item.active {
  1575. /* color: #000;
  1576. border-color: #000; */
  1577. background: linear-gradient(0deg, #ffffff, #fec13e);
  1578. -webkit-background-clip: text;
  1579. background-clip: text;
  1580. -webkit-text-fill-color: transparent;
  1581. color: transparent;
  1582. border-color: #fec13e;
  1583. }
  1584. .tab-item:not(.active):hover {
  1585. color: #999999;
  1586. }
  1587. .tab-content {
  1588. overflow-y: auto;
  1589. overflow-x: hidden;
  1590. scroll-behavior: smooth;
  1591. height: 100%;
  1592. /* 添加平滑滚动效果 */
  1593. }
  1594. .pcTabContent {
  1595. padding: 0 6%;
  1596. }
  1597. .backToHomeImg {
  1598. width: 40px;
  1599. height: 40px;
  1600. margin-left: 10px;
  1601. }
  1602. @media (max-width: 768px) {
  1603. .tab-container {
  1604. justify-content: center;
  1605. }
  1606. .tab-items-container {
  1607. justify-content: center;
  1608. gap: 0px;
  1609. /* 移动端使用更小的间距 */
  1610. }
  1611. .tab-item {
  1612. font-size: clamp(14px, 3vw, 16px);
  1613. padding: 6px 10px;
  1614. }
  1615. }
  1616. </style>
  1617. <style scoped>
  1618. html {
  1619. height: 100dvh;
  1620. overflow: hidden !important;
  1621. position: fixed;
  1622. margin: 0;
  1623. padding: 0;
  1624. -webkit-overflow-scrolling: auto;
  1625. /* 禁用 iOS 弹性滚动 */
  1626. }
  1627. body {
  1628. height: 100dvh;
  1629. overflow: clip;
  1630. margin: 0;
  1631. padding: 0;
  1632. -webkit-overflow-scrolling: auto;
  1633. /* 禁用 iOS 弹性滚动 */
  1634. position: fixed;
  1635. }
  1636. #app {
  1637. overflow: hidden;
  1638. height: 100%;
  1639. margin: 0;
  1640. padding: 0;
  1641. }
  1642. .homepage {
  1643. /* height: var(--app-height, 100vh); */
  1644. height: var(--app-height, 100vh);
  1645. margin: 0 auto;
  1646. background-image: url("https://d31zlh4on95l9h.cloudfront.net/images/98c8230d386012c9f1e70bf05a30de5e.png");
  1647. background-size: 100% 100%;
  1648. background-repeat: no-repeat;
  1649. background-position: center;
  1650. display: flex;
  1651. flex-direction: row;
  1652. /* 改为水平布局 */
  1653. overflow: hidden;
  1654. position: fixed;
  1655. top: 0;
  1656. left: 0;
  1657. right: 0;
  1658. bottom: 0;
  1659. width: 100%;
  1660. /* -webkit-overflow-scrolling: touch; */
  1661. }
  1662. .zhezhao {
  1663. width: 100%;
  1664. height: 100%;
  1665. background-color: rgba(0, 0, 0, 0.5);
  1666. z-index: 100;
  1667. position: fixed;
  1668. }
  1669. @media (min-width: 769px) {
  1670. .main-container {
  1671. flex: 1;
  1672. transition: margin-left 0.3s ease;
  1673. display: flex;
  1674. flex-direction: column;
  1675. overflow: hidden;
  1676. }
  1677. .main-container.unCollapsed {
  1678. margin-left: 300px;
  1679. /* 为历史记录组件留出空间 */
  1680. }
  1681. /* 当历史记录组件折叠时调整主容器边距 */
  1682. .main-container.collapsed {
  1683. margin-left: 40px;
  1684. }
  1685. }
  1686. /* 移动端适配 */
  1687. @media (max-width: 768px) {
  1688. .homepage {
  1689. background-image: url("https://d31zlh4on95l9h.cloudfront.net/images/90d31d7052e729c63acb9e2cb94d1307.png");
  1690. }
  1691. }
  1692. .homepage .el-container {
  1693. height: 100%;
  1694. flex-direction: column;
  1695. display: flex;
  1696. width: 100%;
  1697. overflow: hidden;
  1698. /* 防止容器滚动 */
  1699. }
  1700. .el-container .el-header {
  1701. flex-shrink: 0;
  1702. /* 防止头部压缩 */
  1703. height: auto;
  1704. min-height: 60px;
  1705. padding: 5px 0;
  1706. position: sticky;
  1707. top: 0;
  1708. z-index: 10;
  1709. /* background-color: rgba(255, 255, 255, 0.9); */
  1710. }
  1711. .el-container .el-main {
  1712. flex: 1;
  1713. /* 自动占据剩余空间 */
  1714. overflow: hidden;
  1715. /* 主容器不滚动 */
  1716. display: flex;
  1717. flex-direction: column;
  1718. min-height: 0;
  1719. /* 允许内容区域缩小 */
  1720. position: relative;
  1721. height: auto;
  1722. }
  1723. .el-container .el-footer {
  1724. flex-shrink: 0;
  1725. height: auto;
  1726. min-height: 70px;
  1727. position: sticky;
  1728. bottom: 0;
  1729. z-index: 20;
  1730. background-color: rgba(211, 24, 24, 0);
  1731. box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  1732. -webkit-transform: translateZ(0);
  1733. transform: translateZ(0);
  1734. padding-bottom: env(safe-area-inset-bottom, 0);
  1735. /* 适配iPhone X及以上的底部安全区域 */
  1736. }
  1737. .homepage-head {
  1738. padding: 0px;
  1739. display: flex;
  1740. position: relative;
  1741. justify-content: space-between;
  1742. width: 100%;
  1743. }
  1744. .homepage-right-group {
  1745. display: flex;
  1746. /* gap: 8px; */
  1747. align-items: center;
  1748. margin-left: auto;
  1749. margin-right: 5px;
  1750. }
  1751. .homepage-right-group .action-btn {
  1752. height: 40px;
  1753. }
  1754. .count-badge {
  1755. position: relative;
  1756. cursor: pointer;
  1757. }
  1758. .count-badge:hover {
  1759. transform: scale(1.05);
  1760. }
  1761. .count-number {
  1762. position: absolute;
  1763. top: 16px;
  1764. right: 0px;
  1765. width: 68%;
  1766. text-align: center;
  1767. color: #6a00ff;
  1768. font-size: 14px;
  1769. font-weight: bold;
  1770. }
  1771. .clickGetCount {
  1772. width: 100%;
  1773. text-align: center;
  1774. color: white;
  1775. font-size: 12px;
  1776. }
  1777. .backToHomeBtn {
  1778. display: flex;
  1779. flex-direction: column;
  1780. justify-content: center;
  1781. align-items: center;
  1782. cursor: pointer;
  1783. }
  1784. .backToHomeBtn:hover {
  1785. transform: scale(1.05);
  1786. }
  1787. .backImg {
  1788. width: 60%;
  1789. height: auto;
  1790. }
  1791. .backContent {
  1792. width: 100%;
  1793. text-align: center;
  1794. color: white;
  1795. font-size: 12px;
  1796. white-space: nowrap;
  1797. }
  1798. .pc-count-badge {
  1799. display: flex;
  1800. height: 100%;
  1801. gap: 10px;
  1802. align-items: center;
  1803. /* 移除绝对定位,使用flex布局自然定位 */
  1804. flex-shrink: 0;
  1805. }
  1806. .pc-countBtn {
  1807. height: 60px;
  1808. width: 115px;
  1809. position: relative;
  1810. cursor: pointer;
  1811. display: flex;
  1812. flex-direction: column;
  1813. align-items: center;
  1814. }
  1815. .pc-countBtn:hover {
  1816. transform: scale(1.05);
  1817. }
  1818. .pc-action-btn {
  1819. width: 100%;
  1820. height: 70%;
  1821. background-image: url("https://d31zlh4on95l9h.cloudfront.net/images/74e20c65c9ef2526477c63ad68698a50.png");
  1822. background-repeat: no-repeat;
  1823. background-size: 100% 100%;
  1824. }
  1825. .pc-count-number {
  1826. position: absolute;
  1827. top: 15px;
  1828. right: 4px;
  1829. width: 68%;
  1830. text-align: center;
  1831. color: #6a00ff;
  1832. font-size: 15px;
  1833. font-weight: bold;
  1834. }
  1835. .pc-clickGetCount {
  1836. width: 100%;
  1837. text-align: center;
  1838. color: white;
  1839. font-size: 12px;
  1840. }
  1841. .pc-backToHomeBtn {
  1842. width: 30%;
  1843. height: 100%;
  1844. display: flex;
  1845. flex-direction: column;
  1846. align-items: center;
  1847. cursor: pointer;
  1848. }
  1849. .pc-backImg {
  1850. width: 100%;
  1851. height: auto;
  1852. }
  1853. .pc-backContent {
  1854. width: 100%;
  1855. text-align: center;
  1856. color: white;
  1857. font-size: 12px;
  1858. }
  1859. .pc-backToHomeBtn:hover {
  1860. transform: scale(1.05);
  1861. }
  1862. .homepage-right-group .announcement-btn {
  1863. cursor: pointer;
  1864. transition: transform 0.3s;
  1865. }
  1866. .homepage-right-group .announcement-btn:hover {
  1867. transform: scale(1.3);
  1868. }
  1869. .homepage-body {
  1870. padding: 0px;
  1871. display: flex;
  1872. flex-direction: column;
  1873. flex: 1;
  1874. min-height: 0;
  1875. /* 允许内容区域缩小 */
  1876. overflow: hidden;
  1877. }
  1878. .main-wrapper {
  1879. height: 100%;
  1880. display: flex;
  1881. flex-direction: column;
  1882. flex: 1;
  1883. min-height: 0;
  1884. /* 允许内容区域缩小 */
  1885. }
  1886. .tab-section {
  1887. flex-shrink: 0;
  1888. /* 禁止伸缩 */
  1889. }
  1890. .tab-content {
  1891. flex: 1;
  1892. overflow-y: auto;
  1893. min-height: 0;
  1894. /* 关键:允许内容收缩 */
  1895. }
  1896. .homepage-logo {
  1897. height: 100%;
  1898. width: fit-content;
  1899. display: flex;
  1900. /* flex-direction: column; */
  1901. align-items: center;
  1902. justify-content: center;
  1903. margin-left: 20px;
  1904. margin-right: auto;
  1905. position: relative;
  1906. gap: 10px;
  1907. }
  1908. .expand {
  1909. font-size: 2.5rem;
  1910. cursor: pointer;
  1911. color: white;
  1912. }
  1913. .logo1 {
  1914. width: 110px;
  1915. height: auto;
  1916. margin-bottom: 8px;
  1917. }
  1918. .logo2 {
  1919. width: 80px;
  1920. height: auto;
  1921. }
  1922. /* 尾部 */
  1923. .homepage-footer {
  1924. display: flex;
  1925. flex-direction: column;
  1926. gap: 5px;
  1927. flex-shrink: 0;
  1928. /* width: 100%; */
  1929. background-color: #fff;
  1930. }
  1931. .pcFooter {
  1932. margin: 0 6% 4%;
  1933. }
  1934. .footer-first-line {
  1935. display: flex;
  1936. justify-content: space-between;
  1937. align-items: center;
  1938. padding: 5px 15px;
  1939. flex-shrink: 0;
  1940. }
  1941. .left-group {
  1942. display: flex;
  1943. gap: 15px;
  1944. }
  1945. .action-btn {
  1946. cursor: pointer;
  1947. transition: transform 0.2s;
  1948. height: 28px;
  1949. }
  1950. .model-btn {
  1951. height: 32px;
  1952. transition: all 0.3s ease;
  1953. }
  1954. .model-btn:hover {
  1955. transform: scale(1.1);
  1956. }
  1957. /* 手机端模型选择器样式 */
  1958. .mobile-model-select {
  1959. width: 180px;
  1960. --el-select-border-color-hover: var(--el-border-color-hover);
  1961. --el-select-disabled-border: var(--el-disabled-border-color);
  1962. --el-select-font-size: var(--el-font-size-base);
  1963. --el-select-close-hover-color: var(--el-text-color-secondary);
  1964. --el-select-input-focus-border-color: var(--el-color-primary);
  1965. --el-select-input-font-size: 14px;
  1966. }
  1967. .send-btn {
  1968. margin-left: 10px;
  1969. height: 33px !important;
  1970. width: auto;
  1971. /* margin-right: 5px; */
  1972. }
  1973. .input-container {
  1974. position: relative;
  1975. width: 100%;
  1976. }
  1977. .send-btn-inner {
  1978. position: absolute;
  1979. right: 10px;
  1980. top: 50%;
  1981. transform: translateY(-50%);
  1982. height: 28px !important;
  1983. width: auto;
  1984. z-index: 10;
  1985. transition: all 0.3s ease;
  1986. }
  1987. .send-btn-inner:hover {
  1988. transform: translateY(-50%) scale(1.1);
  1989. }
  1990. /* 音频播放动画 */
  1991. @keyframes pulse {
  1992. 0% {
  1993. transform: scale(1);
  1994. }
  1995. 50% {
  1996. transform: scale(1.1);
  1997. }
  1998. 100% {
  1999. transform: scale(1);
  2000. }
  2001. }
  2002. .footer-second-line {
  2003. position: relative;
  2004. display: flex;
  2005. align-items: center;
  2006. padding: 5px 15px 10px;
  2007. flex-shrink: 0;
  2008. }
  2009. .msg-icon {
  2010. position: absolute;
  2011. left: 25px;
  2012. top: 50%;
  2013. transform: translateY(-50%);
  2014. width: 24px;
  2015. z-index: 999;
  2016. }
  2017. .msg-input:deep(.el-textarea__inner) {
  2018. border: none !important;
  2019. box-shadow: none !important;
  2020. overflow-y: auto !important;
  2021. transition: all 0.2s ease-out;
  2022. resize: none !important;
  2023. line-height: 1.5 !important;
  2024. max-height: 100px !important;
  2025. padding-right: 45px !important;
  2026. }
  2027. .msg-input {
  2028. min-height: 34px;
  2029. width: 100%;
  2030. border-radius: 5px;
  2031. font-size: 16px;
  2032. transition: all 0.3s ease-out;
  2033. overflow-y: hidden;
  2034. box-shadow: 0 4px 12px rgba(89, 24, 241, 0.3);
  2035. background: #fff;
  2036. z-index: 5;
  2037. /* 添加iOS设备特殊处理 */
  2038. -webkit-appearance: none;
  2039. appearance: none;
  2040. }
  2041. .msg-input:focus {
  2042. outline: none;
  2043. }
  2044. .input::before {
  2045. content: "请输入股票名称或股票代码...";
  2046. position: absolute;
  2047. left: 11px;
  2048. top: 5px;
  2049. color: var(--el-text-color-secondary);
  2050. pointer-events: none;
  2051. white-space: nowrap;
  2052. overflow-x: hidden;
  2053. text-overflow: ellipsis;
  2054. width: 80%;
  2055. z-index: 6;
  2056. }
  2057. .changeMsg {
  2058. display: flex;
  2059. width: 100%;
  2060. margin-bottom: 30px;
  2061. flex-wrap: wrap;
  2062. gap: 20px;
  2063. }
  2064. .changeInfo {
  2065. display: flex;
  2066. background-color: #f8f8f8;
  2067. border-radius: 5px;
  2068. padding: 10px 20px;
  2069. /* width: 40%; */
  2070. white-space: nowrap;
  2071. }
  2072. .changeImg {
  2073. height: 100%;
  2074. display: flex;
  2075. justify-content: center;
  2076. align-items: center;
  2077. margin-right: 10px;
  2078. }
  2079. .changeImgClass {
  2080. width: 50px;
  2081. height: auto;
  2082. }
  2083. .changeContent {
  2084. display: flex;
  2085. flex-direction: column;
  2086. justify-content: center;
  2087. font-weight: bold;
  2088. }
  2089. .changeRule {
  2090. display: flex;
  2091. flex-direction: column;
  2092. background-color: #f8f8f8;
  2093. border-radius: 5px;
  2094. text-align: center;
  2095. align-items: center;
  2096. justify-content: center;
  2097. color: #4e86fe;
  2098. white-space: nowrap;
  2099. padding: 5px 20px;
  2100. min-width: 40%;
  2101. transition: all 0.3s ease;
  2102. cursor: pointer;
  2103. }
  2104. .changeRule:hover {
  2105. background-color: #e8f0ff;
  2106. box-shadow: 0 2px 8px rgba(78, 134, 254, 0.2);
  2107. transform: translateY(-2px);
  2108. }
  2109. .changeLevel {
  2110. display: flex;
  2111. flex-direction: column;
  2112. }
  2113. .changeLevelTitle {
  2114. font-weight: bold;
  2115. margin-bottom: 10px;
  2116. }
  2117. .changeLevelContent {
  2118. display: flex;
  2119. flex-wrap: wrap;
  2120. gap: 15px;
  2121. margin-bottom: 10px;
  2122. }
  2123. .changeLevelItems {
  2124. display: flex;
  2125. background-color: #f8f8f8;
  2126. width: 20%;
  2127. min-width: 70px;
  2128. max-width: 150px;
  2129. justify-content: center;
  2130. align-items: center;
  2131. flex-direction: column;
  2132. border-radius: 10px;
  2133. padding: 5px;
  2134. cursor: pointer;
  2135. }
  2136. .changeLevelItems:hover {
  2137. background-color: #ecf2ff;
  2138. }
  2139. .changeLevelItemsActive {
  2140. border: 1px solid #4e86fe;
  2141. background-color: #ecf2ff;
  2142. }
  2143. .changeLevelItem {
  2144. display: flex;
  2145. flex-direction: column;
  2146. justify-content: center;
  2147. align-items: center;
  2148. }
  2149. .changeLevelItemToken {
  2150. display: flex;
  2151. justify-content: center;
  2152. align-items: center;
  2153. }
  2154. .changeLevelItemTokenImg {
  2155. width: 40px;
  2156. height: 40px;
  2157. }
  2158. .changeNow {
  2159. display: flex;
  2160. white-space: nowrap;
  2161. /* font-weight: bold; */
  2162. margin-bottom: 15px;
  2163. align-items: center;
  2164. }
  2165. .changePay {
  2166. color: #4e86fe;
  2167. margin: 0px 5px;
  2168. font-size: 1.1rem;
  2169. }
  2170. .changeBtn {
  2171. width: 40%;
  2172. max-width: 350px;
  2173. background-color: #4e86fe;
  2174. color: white;
  2175. display: flex;
  2176. justify-content: center;
  2177. align-content: center;
  2178. padding: 10px;
  2179. border-radius: 5px;
  2180. cursor: pointer;
  2181. }
  2182. .changeBtn:hover {
  2183. background-color: #3a73e6;
  2184. }
  2185. .rechargeDialogTitle {
  2186. font-size: 1.7rem;
  2187. /* font-weight: bold; */
  2188. color: #4e86fe;
  2189. display: flex;
  2190. justify-content: center;
  2191. align-items: center;
  2192. letter-spacing: 10px;
  2193. }
  2194. .rechargeDialogContent {
  2195. padding: 20px;
  2196. font-size: 1.2rem;
  2197. }
  2198. .rechargeDialogBtnGroup {
  2199. display: flex;
  2200. font-size: 1.2rem;
  2201. padding: 0px 20px;
  2202. justify-content: space-between;
  2203. }
  2204. .recharge {
  2205. color: white;
  2206. background-color: #4e86fe;
  2207. padding: 10px 20px;
  2208. border-radius: 13px;
  2209. cursor: pointer;
  2210. min-width: 20%;
  2211. text-align: center;
  2212. white-space: nowrap;
  2213. }
  2214. .recharge:hover {
  2215. background-color: #3a73e6;
  2216. }
  2217. .rechargeDialogCancel {
  2218. border: 1px solid rgb(202, 202, 202);
  2219. padding: 10px 20px;
  2220. border-radius: 13px;
  2221. cursor: pointer;
  2222. min-width: 20%;
  2223. text-align: center;
  2224. }
  2225. .rechargeDialogCancel:hover {
  2226. background-color: #ecf2ff;
  2227. }
  2228. .confirmDialogTitle {
  2229. font-size: 1.7rem;
  2230. /* font-weight: bold; */
  2231. color: #4e86fe;
  2232. display: flex;
  2233. justify-content: center;
  2234. align-items: center;
  2235. letter-spacing: 10px;
  2236. }
  2237. .confirmDialogContent {
  2238. padding: 20px;
  2239. font-size: 1.2rem;
  2240. }
  2241. .confirmDialogBtnGroup {
  2242. display: flex;
  2243. font-size: 1.2rem;
  2244. padding: 0px 20px;
  2245. justify-content: space-between;
  2246. }
  2247. .confirmDialogConfirm {
  2248. color: white;
  2249. background-color: #4e86fe;
  2250. padding: 10px 20px;
  2251. border-radius: 13px;
  2252. cursor: pointer;
  2253. min-width: 20%;
  2254. text-align: center;
  2255. }
  2256. .confirmDialogConfirm:hover {
  2257. background-color: #3a73e6;
  2258. }
  2259. .confirmDialogCancel {
  2260. border: 1px solid rgb(202, 202, 202);
  2261. padding: 10px 20px;
  2262. border-radius: 13px;
  2263. cursor: pointer;
  2264. min-width: 20%;
  2265. text-align: center;
  2266. }
  2267. .confirmDialogCancel:hover {
  2268. background-color: #ecf2ff;
  2269. }
  2270. .changeSuccessDialogTitle {
  2271. font-size: 1.7rem;
  2272. font-weight: bold;
  2273. color: #7849de;
  2274. display: flex;
  2275. justify-content: center;
  2276. align-items: center;
  2277. letter-spacing: 10px;
  2278. }
  2279. .changeSuccessDialogTitle image {
  2280. font-size: 1.7rem;
  2281. font-weight: bold;
  2282. color: #7849de;
  2283. display: flex;
  2284. justify-content: center;
  2285. align-items: center;
  2286. letter-spacing: 10px;
  2287. }
  2288. .changeSuccessDialogContent {
  2289. padding: 20px;
  2290. color: white;
  2291. font-size: 1.2rem;
  2292. font-weight: bold;
  2293. text-align: center;
  2294. }
  2295. /* Token规则提示框样式 - 与DBQBmodel无权限弹出框一致 */
  2296. .tokenRuleDialog {
  2297. width: 100%;
  2298. display: flex;
  2299. justify-content: center;
  2300. align-items: center;
  2301. position: fixed;
  2302. bottom: 20%;
  2303. color: white;
  2304. z-index: 9999;
  2305. }
  2306. .tokenRuleDialogContent {
  2307. position: relative;
  2308. border-radius: 5px;
  2309. border: 1px solid white;
  2310. padding: 20px 30px;
  2311. background-color: #261176;
  2312. display: flex;
  2313. flex-direction: column;
  2314. justify-content: center;
  2315. align-items: flex-start;
  2316. max-width: 500px;
  2317. width: 70vw;
  2318. max-height: 70vh;
  2319. overflow-y: auto;
  2320. box-sizing: border-box;
  2321. }
  2322. .tokenRuleDialogClose {
  2323. border-radius: 5px;
  2324. border: 1px solid white;
  2325. background-color: #8621d9;
  2326. padding: 2px;
  2327. display: flex;
  2328. justify-content: center;
  2329. align-items: center;
  2330. position: absolute;
  2331. top: 0px;
  2332. right: 0px;
  2333. width: 24px;
  2334. height: 24px;
  2335. cursor: pointer;
  2336. color: white;
  2337. }
  2338. .tokenRuleDialogTitle {
  2339. color: #fec13e;
  2340. font-size: 20px;
  2341. font-weight: bold;
  2342. text-align: center;
  2343. width: 100%;
  2344. }
  2345. .tokenRuleSection {
  2346. width: 100%;
  2347. }
  2348. .tokenRuleSectionTitle {
  2349. color: #fec13e;
  2350. font-size: 16px;
  2351. font-weight: bold;
  2352. margin-bottom: 8px;
  2353. }
  2354. .tokenRuleItem {
  2355. color: white;
  2356. font-size: 16px;
  2357. line-height: 1.5;
  2358. }
  2359. .tokenRuleNote {
  2360. background: rgba(134, 33, 217, 0.3);
  2361. border: 1px solid #fec13e;
  2362. border-radius: 5px;
  2363. padding: 12px;
  2364. color: white;
  2365. font-size: 14px;
  2366. line-height: 1.5;
  2367. text-align: center;
  2368. word-wrap: break-word;
  2369. overflow-wrap: break-word;
  2370. }
  2371. @media (max-width: 768px) {
  2372. .tokenRuleDialog {
  2373. bottom: 20%;
  2374. }
  2375. .tokenRuleDialogContent {
  2376. width: 80vw;
  2377. padding: 15px 20px;
  2378. max-height: 80vh;
  2379. }
  2380. .tokenRuleDialogTitle {
  2381. font-size: 18px;
  2382. }
  2383. .tokenRuleSectionTitle {
  2384. font-size: 14px;
  2385. margin-bottom: 6px;
  2386. }
  2387. .tokenRuleItem {
  2388. font-size: 13px;
  2389. line-height: 1.4;
  2390. word-wrap: break-word;
  2391. overflow-wrap: break-word;
  2392. }
  2393. .tokenRuleNote {
  2394. font-size: 12px;
  2395. padding: 10px;
  2396. line-height: 1.4;
  2397. }
  2398. .tokenRuleDialogClose {
  2399. width: 20px;
  2400. height: 20px;
  2401. }
  2402. }
  2403. @media (max-width: 768px) {
  2404. .logo1 {
  2405. max-width: 110px;
  2406. width: 25vw;
  2407. }
  2408. .homepage-right-group {
  2409. gap: 10px;
  2410. }
  2411. .homepage-right-group .action-btn {
  2412. height: 30px;
  2413. }
  2414. .count-number {
  2415. top: 10px;
  2416. font-size: 12px;
  2417. }
  2418. .backImg {
  2419. width: 35px;
  2420. height: auto;
  2421. }
  2422. .action-btn {
  2423. height: 21px;
  2424. }
  2425. .footer-second-line {
  2426. padding: 5px 10px 10px;
  2427. }
  2428. .msg-input {
  2429. /* min-height: 44px; */
  2430. /* height: 44px; */
  2431. font-size: 16px;
  2432. }
  2433. /* .changeImg {
  2434. width: 30px;
  2435. height: 30px;
  2436. } */
  2437. .changeLevel {
  2438. flex-direction: horizontal;
  2439. }
  2440. .changeLevelContent {
  2441. display: flex;
  2442. /* justify-content: center; */
  2443. }
  2444. .changeLevelItems {
  2445. flex: 0 0 calc(33% - 20px);
  2446. /* margin-right: auto; */
  2447. }
  2448. .changeLevelTitle {
  2449. align-items: center;
  2450. display: flex;
  2451. flex-direction: column;
  2452. }
  2453. .changeRule {
  2454. margin-left: 10px;
  2455. width: 0%;
  2456. background-color: white;
  2457. }
  2458. .changeMsg {
  2459. gap: 10px 20px;
  2460. margin-bottom: 10px;
  2461. }
  2462. .changeImgClass {
  2463. width: 30px;
  2464. height: 30px;
  2465. }
  2466. /* .changeContent {
  2467. font-size: 0.5rem;
  2468. } */
  2469. .changeLevelItems {
  2470. font-size: 0.7rem;
  2471. min-width: 0px;
  2472. }
  2473. .changeLevelItemToken {
  2474. white-space: nowrap;
  2475. }
  2476. .changeLevelItemTokenImg {
  2477. width: 20px;
  2478. height: 20px;
  2479. }
  2480. .changeInfo {
  2481. margin: 0px auto;
  2482. }
  2483. .changeBtn {
  2484. margin: 0px auto;
  2485. }
  2486. .rechargeDialogTitle {
  2487. font-size: 1.3rem;
  2488. }
  2489. .rechargeDialogContent {
  2490. padding: 10px 0px;
  2491. font-size: 0.8rem;
  2492. }
  2493. .rechargeDialogBtnGroup {
  2494. font-size: 1rem;
  2495. }
  2496. .recharge {
  2497. padding: 5px 10px;
  2498. }
  2499. .rechargeDialogCancel {
  2500. padding: 5px 10px;
  2501. }
  2502. .confirmDialogTitle {
  2503. font-size: 1.3rem;
  2504. }
  2505. .confirmDialogContent {
  2506. padding: 10px 0px;
  2507. font-size: 0.8rem;
  2508. }
  2509. .confirmDialogBtnGroup {
  2510. font-size: 1rem;
  2511. }
  2512. .confirmDialogConfirm {
  2513. padding: 5px 10px;
  2514. }
  2515. .confirmDialogCancel {
  2516. padding: 5px 10px;
  2517. }
  2518. .changeSuccessDialogTitle {
  2519. font-size: 1.3rem;
  2520. }
  2521. .changeSuccessDialogContent {
  2522. font-size: 1rem;
  2523. }
  2524. }
  2525. </style>
  2526. <style>
  2527. .changeSuccessDialog {
  2528. background: linear-gradient(180deg, #80d3f8, #8080ff);
  2529. }
  2530. .changeSuccessDialogFooter {
  2531. display: flex;
  2532. justify-content: center;
  2533. margin-top: 20px;
  2534. }
  2535. .confirmButton {
  2536. background: #8a52df;
  2537. color: white;
  2538. border: none;
  2539. border-radius: 5px;
  2540. padding: 8px 30px;
  2541. font-size: 16px;
  2542. cursor: pointer;
  2543. transition: all 0.3s ease;
  2544. }
  2545. .confirmButton:hover {
  2546. background: #3a75e6;
  2547. transform: translateY(-2px);
  2548. box-shadow: 0 2px 8px rgba(78, 134, 254, 0.3);
  2549. }
  2550. </style>