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.

1147 lines
27 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
4 weeks ago
3 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <div class="ai-emotion-container" ref="userInputDisplayRef">
  3. <!-- 金轮 -->
  4. <div class="golden-wheel">
  5. <img src="@/assets/img/AiEmotion/金轮.png" class="golden-wheel-img" alt="金轮图标"
  6. :class="{ 'rotating-image': isRotating }" />
  7. </div>
  8. <!-- 消息显示区域 -->
  9. <div class="user-input-display">
  10. <div v-for="(message, index) in messages" :key="index" class="message-container">
  11. <!-- 用户输入内容 -->
  12. <div v-if="message.sender === 'user'" class="message-bubble user-message">
  13. {{ message.text }}
  14. </div>
  15. <!-- AI返回结果 -->
  16. <div v-if="message.sender === 'ai'" class="message-bubble ai-message">
  17. {{ message.text }}
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <!-- 股票标签页 -->
  23. <StockTabs />
  24. <!-- 渲染整个页面 -->
  25. <div v-if="isPageLoaded" class="class01">
  26. <div class="class00">
  27. <!-- 四维矩阵图 -->
  28. <div class="class02">
  29. <div class="container">
  30. <img class="item" :src="item" alt="思维矩阵图片" />
  31. <div class="span01">
  32. {{ stockName }}{{ stockName ? '量子四维矩阵图' : '' }}
  33. </div>
  34. </div>
  35. <span class="span02">{{ displayDate }}</span>
  36. </div>
  37. <div class="class0201">
  38. <img src="@/assets/img/AiEmotion/L1.png" alt="情绪监控图标">
  39. </div>
  40. <!-- 温度计图表 -->
  41. <div class="class03">
  42. <div class="class003">
  43. <div class="content1">
  44. <img class="img01" src="@/assets/img/AiEmotion/温度计.png" alt="温度计图标">
  45. <span class="title1">股票温度计</span>
  46. </div>
  47. <div class="div00">
  48. <div class="div01">个股温度{{ data1 ?? "NA" }}</div>
  49. <div class="div02">大盘温度{{ data2 }}</div>
  50. </div>
  51. </div>
  52. <marketTemperature ref="marketTemperatureRef" />
  53. </div>
  54. </div>
  55. <div class="class0301">
  56. <img src="@/assets/img/AiEmotion/L2.png" alt="情绪解码图标">
  57. </div>
  58. <!-- 情绪解码器图表 -->
  59. <div class="class04">
  60. <div class="class0401">
  61. <img class="img02" src='@/assets/img/AiEmotion/emotionDecod.png' alt="情绪解码器图标">
  62. <span class="title2">情绪解码器</span>
  63. </div>
  64. <div class="class0402">
  65. <emotionDecod ref="emotionDecodRef"></emotionDecod>
  66. </div>
  67. </div>
  68. <div class="class0403">
  69. <img src="@/assets/img/AiEmotion/L3.png" alt="情绪推演图标">
  70. </div>
  71. <!-- 情绪探底雷达图表 -->
  72. <div class="class05">
  73. <div class="class0502">
  74. <img class="img03" src="@/assets/img/AiEmotion/探底雷达.png" alt="探底雷达图表">
  75. <span class="title3">情绪探底雷达</span>
  76. </div>
  77. <div class="class0503">
  78. <emotionalBottomRadar ref="emotionalBottomRadarRef"></emotionalBottomRadar>
  79. </div>
  80. </div>
  81. <div class="class0501">
  82. <img src="@/assets/img/AiEmotion/L4.png" alt="情绪套利">
  83. </div>
  84. <!-- 情绪能量转化器图表 -->
  85. <div class="class06">
  86. <div class="class0601">
  87. <img class="img04" src="@/assets/img/AiEmotion/能量转化器.png" alt="能量转化器图标">
  88. <span class="title4">情绪能量转化器</span>
  89. </div>
  90. <div class="class0603">
  91. <emoEnergyConverter ref="emoEnergyConverterRef"></emoEnergyConverter>
  92. </div>
  93. </div>
  94. <!-- 核心看点 -->
  95. <div class="class0702">
  96. <img src="@/assets/img/AiEmotion/核心看点.png" alt="核心看点字样">
  97. </div>
  98. <div class="bk-image">
  99. <div class="text-container">
  100. <p>情绪监控-金融宇宙的量子检测网络核心任务:构建全市场情绪引力场雷达</p>
  101. <p>情绪解码-主力思维的神经破译矩阵核心任务:解构资金行为的量子密码</p>
  102. <p>情绪推演-未来战争的时空推演舱核心任务:情绪推演</p>
  103. <p>情绪套利-财富裂变的粒子对撞机核心任务:将情绪差转化为a收益粒子流</p>
  104. </div>
  105. </div>
  106. <!-- 核心逻辑 -->
  107. <div class="class0700">
  108. <img src="@/assets/img/AiEmotion/核心逻辑.png" alt="核心逻辑字样">
  109. </div>
  110. <div class="class08">
  111. <div class="lz-img">
  112. <img src="@/assets/img/AiEmotion/量子神经决策树.png" alt="树标题">
  113. </div>
  114. <div class="scaled-img">
  115. <img src="@/assets/img/AiEmotion/tree02.png" alt="树图片">
  116. </div>
  117. </div>
  118. <!-- 场景应用 -->
  119. <div class="class09">
  120. <img src="@/assets/img/AiEmotion/场景应用.png" alt="场景应用标题">
  121. <div class="bk-image">
  122. </div>
  123. </div>
  124. </div>
  125. </template>
  126. <script setup>
  127. import { ref, reactive, computed, watch, nextTick, onMounted } from 'vue';
  128. import { getReplyAPI } from '@/api/AiEmotionApi.js'; // 导入工作流接口方法
  129. import axios from 'axios';
  130. import item from '@/assets/img/AiEmotion/bk01.png'; // 导入思维矩阵图片
  131. import emotionDecod from '@/views/components/emotionDecod.vue'; // 导入情绪解码组件
  132. import emotionalBottomRadar from '@/views/components/emotionalBottomRadar.vue'; // 导入情绪探底雷达图组件
  133. import emoEnergyConverter from '@/views/components/emoEnergyConverter.vue'; // 导入情绪能量转化器组件
  134. import marketTemperature from '@/views/components/marketTemperature.vue';
  135. import StockTabs from '@/views/components/StockTabs.vue'; // 导入股票标签页组件
  136. import blueBorderImg from '@/assets/img/AiEmotion/blueBorder.png' //导入蓝色背景框图片
  137. import { ElMessage } from 'element-plus';
  138. import { useEmotionStore } from '@/store/emotion'; // 导入Pinia store
  139. // 使用Pinia store
  140. const emotionStore = useEmotionStore();
  141. // 组件引用
  142. const marketTemperatureRef = ref(null); // 引用市场温度计组件
  143. const emoEnergyConverterRef = ref(null)
  144. const emotionDecodRef = ref(null)
  145. const emotionalBottomRadarRef = ref(null)
  146. const userInputDisplayRef = ref(null);//消息区域的引用
  147. // 响应式数据
  148. const messages = ref([]);
  149. const isPageLoaded = ref(false); // 控制页面是否显示
  150. const isRotating = ref(false);//控制旋转
  151. const version1 = ref(2); // 版本号
  152. // 计算属性 - 从store获取当前股票数据
  153. const currentStock = computed(() => emotionStore.activeStock);
  154. const stockName = computed(() => currentStock.value?.stockInfo.name || "");
  155. const displayDate = computed(() => {
  156. if (!currentStock.value?.apiData) return "";
  157. const lastData = currentStock.value.apiData.GSWDJ?.at(-1);
  158. return lastData ? lastData[0] : "";
  159. });
  160. const data1 = computed(() => {
  161. if (!currentStock.value?.apiData) return null;
  162. const lastData = currentStock.value.apiData.GSWDJ?.at(-1);
  163. return lastData ? Math.round(lastData[1]) : null;
  164. });
  165. const data2 = computed(() => {
  166. if (!currentStock.value?.apiData) return null;
  167. const lastData = currentStock.value.apiData.GSWDJ?.at(-1);
  168. return lastData ? Math.round(lastData[2]) : null;
  169. });
  170. // 监听当前股票变化,重新渲染图表
  171. watch(currentStock, (newStock) => {
  172. if (newStock && newStock.apiData) {
  173. isPageLoaded.value = true;
  174. nextTick(() => {
  175. renderCharts(newStock.apiData);
  176. });
  177. } else {
  178. isPageLoaded.value = false;
  179. }
  180. }, { immediate: true });
  181. //导出方法供外部使用
  182. defineExpose({ handleSendMessage })
  183. // 触发图片旋转的方法
  184. function startImageRotation() {
  185. isRotating.value = true;
  186. // 如果你想在一段时间后停止旋转,可以添加以下代码
  187. setTimeout(() => {
  188. isRotating.value = false;
  189. }, 5000); // 5 秒后停止旋转
  190. }
  191. // 发送消息方法
  192. async function handleSendMessage(input) {
  193. console.log("发送内容:", input);
  194. // 检查用户输入内容是否为空
  195. if (input.trim()) {
  196. const userMessage = reactive({ sender: 'user', text: input });
  197. messages.value.push(userMessage);
  198. // 触发图片旋转
  199. isRotating.value = true;
  200. try {
  201. // 用来调用工作流接口的参数
  202. const params = {
  203. content: userMessage.text,
  204. userData: {
  205. token:
  206. "9ior41AF0xTIbIG2pRnnbZi0+fEeMx8pywnIlrmTwo5FbqJ9lWrSWOxp9MkpKiNtedtUafqvzIwpFKrwuMs",
  207. language: "cn",
  208. brainPrivilegeState: "1",
  209. swordPrivilegeState: "1",
  210. stockForecastPrivile: "1",
  211. spaceForecastPrivile: "1",
  212. aibullPrivilegeState: "1",
  213. aigoldBullPrivilegeS: "1",
  214. airadarPrivilegeStat: "1",
  215. marketList: "hk,cn,usa,my,sg,vi,in,gb",
  216. },
  217. };
  218. const result = await getReplyAPI(params);
  219. const response = await result.json(); // 解析返回的 JSON 数据
  220. console.log("工作流接口返回数据:", response);
  221. // 解析 data 字段
  222. const parsedData = JSON.parse(response.data); // 将字符串形式的 JSON 转换为对象
  223. console.log("解析后的数据:", parsedData);
  224. if (parsedData && parsedData.market && parsedData.code) {
  225. console.log("工作流接口返回股票信息:", parsedData);
  226. // 请求数据接口
  227. fetchData(parsedData.code, parsedData.market, parsedData.name || "未知股票", input.trim());
  228. // 更新 span01 的内容
  229. // updateSpan01();
  230. } else {
  231. ElMessage.error('工作流接口未返回非股票信息');
  232. }
  233. } catch (error) {
  234. ElMessage.error('请求工作流接口失败,请检查网络连接');
  235. } finally {
  236. // 停止图片旋转
  237. isRotating.value = false;
  238. }
  239. } else {
  240. ElMessage.error('消息发送失败,请检查网络连接');
  241. }
  242. }
  243. // 请求数据接口
  244. async function fetchData(code, market, stockName, queryText) {
  245. try {
  246. const stockDataParams = {
  247. // token: '+XgqsgdW0RLIbIG2pxnnbZi0+fEeMx8pywnIlrmTxtkSaPZ9xjSOWrxq+s0rL3RrfNhXPvGtz9srFfjwu8A',
  248. token: '9ior41AF0xTIbIG2pRnnbZi0+fEeMx8pywnIlrmTwo5FbqJ9lWrSWOxp9MkpKiNtedtUafqvzIwpFKrwuMs',
  249. market: market,
  250. code: code,
  251. language: 'cn',
  252. version: version1.value
  253. };
  254. const stockDataResult = await axios.post(
  255. "http://39.101.133.168:8828/link/api/aiEmotion/client/getAiEmotionData",
  256. // 'https://api.homilychart.com/link/api/aiEmotion/client/getAiEmotionData',
  257. stockDataParams,
  258. {
  259. headers: {
  260. "Content-Type": "application/json",
  261. },
  262. }
  263. );
  264. const stockDataResponse = stockDataResult.data; // 获取返回所有的数据
  265. console.log('图表数据接口返回数据:', stockDataResponse.data);
  266. if (stockDataResponse.code === 200 && stockDataResponse.data) {
  267. console.log(stockDataResponse.code)
  268. // 创建股票数据对象
  269. const stockData = {
  270. queryText: queryText,
  271. stockInfo: {
  272. name: stockName,
  273. code: code,
  274. market: market
  275. },
  276. apiData: stockDataResponse.data,
  277. timestamp: new Date().toISOString()
  278. };
  279. // 将股票数据添加到store中
  280. emotionStore.addStock(stockData);
  281. console.log('股票数据已添加到store');
  282. } else {
  283. ElMessage.error('获取接口数据失败');
  284. }
  285. } catch (error) {
  286. ElMessage.error('获取接口数据失败。。。');
  287. }
  288. }
  289. // 渲染组件图表的方法
  290. function renderCharts(data) {
  291. nextTick(() => {
  292. // 添加小延迟确保DOM完全更新
  293. setTimeout(() => {
  294. try {
  295. // 渲染股市温度计图表
  296. if (marketTemperatureRef.value && data.GSWDJ) {
  297. console.log("开始渲染股市温度计图表");
  298. console.log("股市温度计数据", data.GSWDJ);
  299. marketTemperatureRef.value.initChart(data.GSWDJ, data.KLine20, data.WDRL);
  300. console.log("股市温度计图表已渲染");
  301. }
  302. // 渲染情绪解码器图表
  303. if (emotionDecodRef.value && data.QXJMQ) {
  304. console.log("开始渲染情绪解码器图表");
  305. console.log("情绪解码器数据", data.QXJMQ);
  306. emotionDecodRef.value.initQXNLZHEcharts(data.KLine20, data.QXJMQ);
  307. console.log("情绪解码器图表已渲染");
  308. }
  309. // 渲染情绪探底雷达图表
  310. if (emotionalBottomRadarRef.value && data.QXTDLD) {
  311. console.log("开始渲染情绪探底雷达图表");
  312. console.log("数据", data.QXTDLD);
  313. emotionalBottomRadarRef.value.initEmotionalBottomRadar(
  314. data.KLine20,
  315. data.QXTDLD
  316. );
  317. console.log("情绪探底雷达图表已渲染");
  318. }
  319. // 渲染情绪能量转化器图表
  320. if (emoEnergyConverterRef.value && data.QXNLZHQ) {
  321. console.log("开始渲染情绪能量转化器图表");
  322. console.log("KLine20:", data.KLine20);
  323. console.log("QXNLZHQ:", data.QXNLZHQ);
  324. emoEnergyConverterRef.value.initQXNLZHEcharts(data.KLine20, data.QXNLZHQ);
  325. console.log("情绪能量转化器图表已渲染");
  326. }
  327. } catch (error) {
  328. console.error('图表渲染过程中发生错误:', error);
  329. ElMessage.error('图表渲染失败,请重试');
  330. }
  331. }, 100); // 100ms延迟确保DOM稳定
  332. });
  333. }
  334. const scrollToBottom = async () => {
  335. const container = userInputDisplayRef.value;
  336. if (!container) return;
  337. await nextTick();
  338. console.log(container.scrollHeight, "container.scrollHeight");
  339. console.log(container.scrollTop, "container.scrollTop");
  340. console.log(container.offsetHeight, "container.offsetHeight");
  341. container.scrollTop = container.scrollHeight - container.offsetHeight;
  342. };
  343. // setInterval(() =>{
  344. // scrollToBottom();
  345. // },1000);
  346. // 页面挂载完成后触发图片旋转
  347. onMounted(() => {
  348. startImageRotation();
  349. });
  350. </script>
  351. <style scoped>
  352. .class003 {
  353. padding-top: 7rem;
  354. padding-left: 12rem;
  355. }
  356. .class003 .div02 {
  357. background-image: url('@/assets/img/AiEmotion/redBorder.png');
  358. background-repeat: no-repeat;
  359. background-size: 100% 100%;
  360. width: 35%;
  361. min-height: 40px;
  362. float: left;
  363. margin-left: 100px;
  364. margin-top: 30px;
  365. text-align: center;
  366. font-size: 24px;
  367. color: white;
  368. }
  369. .class003 .div01 {
  370. background-image: url('@/assets/img/AiEmotion/blueBorder.png');
  371. background-repeat: no-repeat;
  372. background-size: 100% 100%;
  373. width: 35%;
  374. min-height: 40px;
  375. float: left;
  376. margin-left: 100px;
  377. text-align: center;
  378. margin-top: 10px;
  379. font-size: 24px;
  380. color: white;
  381. }
  382. .golden-wheel {
  383. width: 100%;
  384. display: flex;
  385. justify-content: center;
  386. }
  387. .golden-wheel-img {
  388. width: 60%;
  389. max-width: 500px;
  390. height: auto;
  391. }
  392. /* 定义旋转动画 */
  393. @keyframes rotate {
  394. from {
  395. transform: rotate(0deg);
  396. }
  397. to {
  398. transform: rotate(360deg);
  399. }
  400. }
  401. /* 应用动画到图片 */
  402. .rotating-image {
  403. animation: rotate 5s linear;
  404. /* 5 秒完成一次旋转,线性速度*/
  405. will-change: transform;
  406. /* 优化动画性能 */
  407. }
  408. .bk-image {
  409. background-image: url("@/assets/img/AiEmotion/bk03.png");
  410. background-size: 100% 100%;
  411. /* background-position: center; */
  412. background-repeat: no-repeat;
  413. width: 95%;
  414. height: 30rem;
  415. margin: 0 auto;
  416. margin-top: 20px;
  417. }
  418. /* 最后文字的颜色 */
  419. .text-container {
  420. position: relative;
  421. top: 40%;
  422. left: 50%;
  423. transform: translate(-50%, -50%);
  424. color: white;
  425. /* 设置文字颜色 */
  426. text-align: left;
  427. /* 文字居中对齐 */
  428. padding: 20px;
  429. }
  430. .text-container p {
  431. margin: 10px 0;
  432. /* 设置段落间距 */
  433. font-size: 40px;
  434. /* 设置字体大小 */
  435. margin-left: 50px;
  436. }
  437. .class07 {
  438. background-image: url("@/assets/img/AiEmotion/bk03.png");
  439. /* 使用导入的背景图片 */
  440. background-size: cover;
  441. /* 确保背景图片完整显示 */
  442. background-repeat: no-repeat;
  443. /* 防止背景图片重复 */
  444. width: 95%;
  445. /* 设置容器宽度 */
  446. height: auto;
  447. /* 高度根据内容动态变化 */
  448. min-height: 70rem;
  449. /* 设置最小高度,确保图片显示 */
  450. margin: 0 auto;
  451. }
  452. .class0700 {
  453. margin: 0 auto;
  454. width: fit-content;
  455. }
  456. .class0702 {
  457. margin: 0 auto;
  458. width: fit-content;
  459. }
  460. /* .class0503 {
  461. min-width: 100%;
  462. } */
  463. .class0402 {
  464. width: 80%;
  465. margin: 0 auto;
  466. }
  467. .class0601 {
  468. padding-top: 5rem;
  469. text-align: center;
  470. padding-bottom: 6rem;
  471. }
  472. .class0603 {
  473. min-width: 100%;
  474. /* margin: 0 auto; */
  475. }
  476. .class0502 {
  477. padding-top: 5rem;
  478. text-align: center;
  479. display: flex;
  480. flex-direction: column;
  481. /* 竖向排列元素 */
  482. gap: 1rem;
  483. margin-left: 2rem;
  484. }
  485. .class0601 {
  486. padding-top: 5rem;
  487. text-align: center;
  488. display: flex;
  489. flex-direction: column;
  490. /* 竖向排列元素 */
  491. gap: 1rem;
  492. margin-left: 2rem;
  493. }
  494. .img03 {
  495. width: 10rem;
  496. height: 10rem;
  497. margin-left: 40rem;
  498. }
  499. .img04 {
  500. width: 10rem;
  501. height: 10rem;
  502. margin-left: 40rem;
  503. }
  504. .class0701 {
  505. margin: 0 auto;
  506. width: fit-content;
  507. }
  508. .class0501 {
  509. margin: 0 auto;
  510. width: fit-content;
  511. }
  512. .class0403 {
  513. margin: 0 auto;
  514. width: fit-content;
  515. }
  516. .class0301 {
  517. margin: 0 auto;
  518. width: fit-content;
  519. }
  520. .class0201 {
  521. margin: 0 auto;
  522. width: fit-content;
  523. }
  524. .class0401 {
  525. padding-top: 5rem;
  526. text-align: center;
  527. display: flex;
  528. flex-direction: column;
  529. /* 竖向排列元素 */
  530. gap: 1rem;
  531. margin-left: 2rem;
  532. }
  533. .img02 {
  534. width: 10rem;
  535. height: 10rem;
  536. margin-left: 40rem;
  537. }
  538. .title2 {
  539. color: white;
  540. font-size: 2rem;
  541. font-weight: bold;
  542. margin-left: -4rem;
  543. }
  544. .title3 {
  545. color: white;
  546. font-size: 2rem;
  547. font-weight: bold;
  548. margin-left: -4rem;
  549. }
  550. .title4 {
  551. color: white;
  552. font-size: 2rem;
  553. font-weight: bold;
  554. margin-left: -4rem;
  555. }
  556. .class09 {
  557. text-align: center;
  558. }
  559. /* 为需要放大的图片添加样式 */
  560. .scaled-img {
  561. transform: scale(2.5);
  562. text-align: center;
  563. }
  564. .lz-img {
  565. margin-bottom: 10rem;
  566. text-align: center;
  567. padding-top: 70px;
  568. }
  569. .class08 {
  570. background-image: url("@/assets/img/AiEmotion/bk03.png");
  571. background-size: 100% 100%;
  572. background-repeat: no-repeat;
  573. width: 95%;
  574. height: auto;
  575. min-height: 40rem;
  576. margin: 0 auto;
  577. }
  578. .class06 {
  579. background-image: url('@/assets/img/AiEmotion/bk03.png');
  580. /* 使用导入的背景图片 */
  581. background-size: 100% 100%;
  582. /* 确保背景图片完整显示 */
  583. background-repeat: no-repeat;
  584. /* 防止背景图片重复 */
  585. width: 95%;
  586. /* 设置容器宽度 */
  587. height: auto;
  588. /* 高度根据内容动态变化 */
  589. min-height: 72rem;
  590. /* 设置最小高度,确保图片显示 */
  591. margin: 0 auto;
  592. }
  593. .class05 {
  594. background-image: url("@/assets/img/AiEmotion/bk03.png");
  595. /* 使用导入的背景图片 */
  596. background-size: 100% 100%;
  597. /* 确保背景图片完整显示 */
  598. background-repeat: no-repeat;
  599. /* 防止背景图片重复 */
  600. width: 95%;
  601. /* 设置容器宽度 */
  602. height: auto;
  603. /* 高度根据内容动态变化 */
  604. min-height: 70rem;
  605. /* 设置最小高度,确保图片显示 */
  606. margin: 0 auto;
  607. }
  608. .class04 {
  609. background-image: url('@/assets/img/AiEmotion/bk03.png');
  610. /* 使用导入的背景图片 */
  611. background-size: 100% 100%;
  612. /* 确保背景图片完整显示 */
  613. background-repeat: no-repeat;
  614. /* 防止背景图片重复 */
  615. width: 95%;
  616. /* 设置容器宽度 */
  617. height: auto;
  618. /* 高度根据内容动态变化 */
  619. min-height: 57rem;
  620. /* 设置最小高度,确保图片显示 */
  621. margin: 0 auto;
  622. }
  623. .class03 {
  624. background-image: url('@/assets/img/AiEmotion/bk03.png');
  625. /* 使用导入的背景图片 */
  626. background-size: 100% 100%;
  627. /* 确保背景图片完整显示 */
  628. background-repeat: no-repeat;
  629. /* 防止背景图片重复 */
  630. width: 100%;
  631. /* 设置容器宽度 */
  632. height: auto;
  633. /* 高度根据内容动态变化 */
  634. min-height: 70rem;
  635. /* 设置最小高度,确保图片显示 */
  636. margin: 0 auto;
  637. /* display: flex;
  638. flex-direction:row;
  639. align-items: center;
  640. padding: 1rem;
  641. gap: 1rem; */
  642. }
  643. .class00 {
  644. background-size: 100% 100%;
  645. /* 确保背景图片完整显示 */
  646. background-repeat: no-repeat;
  647. /* 防止背景图片重复 */
  648. width: 95%;
  649. /* 设置容器宽度 */
  650. height: auto;
  651. /* 高度根据内容动态变化 */
  652. min-height: 55rem;
  653. /* 设置最小高度,确保图片显示 */
  654. margin: 0 auto;
  655. }
  656. .content1 {
  657. display: flex;
  658. flex-direction: column;
  659. /* 竖向排列元素 */
  660. gap: 1rem;
  661. margin-left: 2rem;
  662. }
  663. .title1 {
  664. color: white;
  665. font-size: 2.5rem;
  666. font-weight: bold;
  667. margin-left: -1rem;
  668. }
  669. .img01 {
  670. width: 10rem;
  671. height: 10rem;
  672. }
  673. .div00 {
  674. display: flex;
  675. flex-direction: column;
  676. /* 竖向排列元素 */
  677. margin-left: 30rem;
  678. gap: 1rem;
  679. margin-top: -10rem;
  680. width: 70rem;
  681. height: 10rem;
  682. }
  683. .span02 {
  684. font-size: 1.5rem;
  685. color: white;
  686. float: right;
  687. margin-top: -3.5rem;
  688. }
  689. .span01 {
  690. /* 使用导入的背景图片 */
  691. background-size: 100% 100%;
  692. /* 背景图片覆盖整个容器 */
  693. background-repeat: no-repeat;
  694. /* 防止背景图片重复 */
  695. display: inline-block;
  696. /* 确保容器是块级元素 */
  697. padding: 10px;
  698. /* 添加内边距以显示内容 */
  699. color: #fff;
  700. /* 设置文字颜色以确保可读性 */
  701. font-size: 1.5rem;
  702. /* 增加字体大小以便更清晰显示股票名称 */
  703. text-align: center;
  704. transform: translate(-50%, -50%);
  705. margin-left: -13rem;
  706. }
  707. .class01 {
  708. width: 90%;
  709. /* 固定容器宽度 */
  710. min-height: 100px;
  711. /* 设置最小高度,确保初始显示 */
  712. height: auto;
  713. /* 高度根据内容动态变化 */
  714. padding: 40px;
  715. /* 添加内边距,确保内容与边界有间距 */
  716. box-sizing: border-box;
  717. /* 包括内边距在宽度和高度计算中 */
  718. background-color: #5e81a7;
  719. margin: 0 auto;
  720. /* 居中容器 */
  721. margin-bottom: 10rem;
  722. }
  723. .ai-emotion-container {
  724. display: flex;
  725. flex-direction: column;
  726. align-items: center;
  727. justify-content: center;
  728. padding: 20px;
  729. position: relative;
  730. }
  731. .user-input-display {
  732. margin-top: 20px;
  733. display: flex;
  734. flex-direction: column;
  735. width: 100%;
  736. }
  737. .message-container {
  738. display: flex;
  739. margin-bottom: 10px;
  740. }
  741. .user-message {
  742. background-color: #007bff;
  743. color: #fff;
  744. padding: 10px 15px;
  745. border-radius: 15px;
  746. max-width: 60%;
  747. text-align: left;
  748. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  749. align-self: flex-end;
  750. }
  751. .ai-message {
  752. background-color: #f1f1f1;
  753. color: #333;
  754. padding: 10px 15px;
  755. border-radius: 15px;
  756. max-width: 60%;
  757. text-align: left;
  758. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  759. align-self: flex-start;
  760. }
  761. .input-container {
  762. display: flex;
  763. align-items: center;
  764. gap: 10px;
  765. }
  766. .fixed-bottom {
  767. position: fixed;
  768. bottom: 100px;
  769. left: 0;
  770. width: 100%;
  771. background-color: #f8f9fa;
  772. padding: 10px 20px;
  773. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  774. }
  775. .input-box {
  776. padding: 10px;
  777. font-size: 16px;
  778. border: 1px solid #ccc;
  779. border-radius: 5px;
  780. width: calc(100% - 120px);
  781. }
  782. .send-button {
  783. padding: 10px 20px;
  784. font-size: 16px;
  785. color: #fff;
  786. background-color: #007bff;
  787. border: none;
  788. border-radius: 5px;
  789. cursor: pointer;
  790. }
  791. .send-button:hover {
  792. background-color: #0056b3;
  793. }
  794. /* 手机端适配样式 */
  795. @media only screen and (max-width: 768px) {
  796. /* 图片样式 */
  797. .golden-wheel img {
  798. width: 100%;
  799. }
  800. .class02 img {
  801. width: 70%;
  802. }
  803. .class0201 img {
  804. width: 100%;
  805. }
  806. .class0301 img {
  807. width: 100%;
  808. margin: 10px 10px;
  809. }
  810. .class0403 img {
  811. width: 100%;
  812. margin: 10px 10px;
  813. }
  814. .class0501 img {
  815. width: 100%;
  816. margin: 10px 10px;
  817. }
  818. .class0702 img {
  819. width: 100%;
  820. margin: 10px 10px;
  821. }
  822. .class0700 img {
  823. width: 100%;
  824. margin: 10px 10px;
  825. }
  826. .scaled-img img {
  827. width: 30%;
  828. height: auto;
  829. }
  830. .class09 img {
  831. width: 100%;
  832. margin: 10px 10px;
  833. }
  834. .img01 {
  835. height: auto;
  836. margin-left: 0rem;
  837. width: 25%;
  838. margin-top: 10px;
  839. }
  840. .title1 {
  841. font-size: 10px;
  842. margin-left: 13px;
  843. }
  844. .class02 .span02 {
  845. font-size: 14px;
  846. color: white;
  847. float: right;
  848. margin-top: -45px;
  849. }
  850. .class03 {
  851. background-image: url('@/assets/img/AiEmotion/bk03.png');
  852. background-size: 100% 100%;
  853. background-repeat: no-repeat;
  854. width: 132%;
  855. margin-left: -45px;
  856. }
  857. .class03 .class003 {
  858. padding-top: 3rem;
  859. padding-left: 0rem;
  860. }
  861. .class01 {
  862. min-height: 100px;
  863. height: auto;
  864. box-sizing: border-box;
  865. background-color: #5e81a7;
  866. margin: 0 auto;
  867. margin-bottom: 10rem;
  868. }
  869. .class04 {
  870. width: 126%;
  871. /* min-height: 51rem; */
  872. margin-left: -39px;
  873. min-height: 38rem;
  874. }
  875. .class02 .container img {
  876. width: 68%;
  877. height: auto;
  878. margin-top: -15px;
  879. margin-left: -2rem;
  880. }
  881. .title2,
  882. .title3,
  883. .title4 {
  884. font-size: 10px;
  885. margin-left: -3rem;
  886. }
  887. .img02 {
  888. width: 25%;
  889. height: auto;
  890. margin-left: 6rem;
  891. }
  892. .class0401 {
  893. padding-top: 3rem;
  894. }
  895. .img03,
  896. .img04 {
  897. width: 25%;
  898. height: auto;
  899. margin-left: 6rem;
  900. }
  901. .text-container p {
  902. font-size: 10px;
  903. }
  904. .lz-img {
  905. margin-bottom: 3rem;
  906. padding-top: 20px;
  907. img {
  908. width: 45%;
  909. height: auto;
  910. }
  911. }
  912. .class08 {
  913. background-size: 100% 100%;
  914. background-repeat: no-repeat;
  915. width: 127%;
  916. height: auto;
  917. min-height: 13rem;
  918. margin: 0 auto;
  919. margin-left: -41px;
  920. }
  921. .bk-image {
  922. background-size: 100% 100%;
  923. background-repeat: no-repeat;
  924. width: 126%;
  925. height: 15rem;
  926. margin: 0 auto;
  927. margin-top: 0px;
  928. margin-left: -40px;
  929. }
  930. .class05 {
  931. background-size: 100% 100%;
  932. background-repeat: no-repeat;
  933. width: 127%;
  934. height: auto;
  935. min-height: 45rem;
  936. margin-left: -41px;
  937. }
  938. .class06 {
  939. background-size: 100% 100%;
  940. background-repeat: no-repeat;
  941. width: 127%;
  942. height: auto;
  943. min-height: 32rem;
  944. margin: 0 auto;
  945. margin-left: -41px;
  946. }
  947. .text-container {
  948. position: relative;
  949. top: 50%;
  950. left: 50%;
  951. transform: translate(-50%, -50%);
  952. color: white;
  953. text-align: left;
  954. padding: 20px;
  955. }
  956. .div00 {
  957. display: flex;
  958. flex-direction: column;
  959. margin-left: 5rem;
  960. gap: 0;
  961. margin-top: -6rem;
  962. width: 100%;
  963. height: auto;
  964. }
  965. .class003 .div01 {
  966. background-repeat: no-repeat;
  967. background-size: 100% 100%;
  968. width: 35%;
  969. min-height: 25px;
  970. float: left;
  971. margin-left: 100px;
  972. text-align: center;
  973. margin-top: 10px;
  974. font-size: 10px;
  975. color: white;
  976. }
  977. .class003 .div02 {
  978. background-repeat: no-repeat;
  979. background-size: 100% 100%;
  980. width: 35%;
  981. min-height: 25px;
  982. float: left;
  983. margin-left: 100px;
  984. text-align: center;
  985. margin-top: 10px;
  986. font-size: 10px;
  987. color: white;
  988. }
  989. /*
  990. .container {
  991. max-width: 80vw;
  992. width: 100%;
  993. height: auto;
  994. } */
  995. .span01 {
  996. /* 使用导入的背景图片 */
  997. background-size: 100% 100%;
  998. /* 背景图片覆盖整个容器 */
  999. background-repeat: no-repeat;
  1000. /* 防止背景图片重复 */
  1001. display: inline-block;
  1002. /* 确保容器是块级元素 */
  1003. padding: 10px;
  1004. /* 添加内边距以显示内容 */
  1005. color: #fff;
  1006. /* 设置文字颜色以确保可读性 */
  1007. font-size: 13px;
  1008. /* 增加字体大小以便更清晰显示股票名称 */
  1009. text-align: center;
  1010. transform: translate(-50%, -50%);
  1011. margin-left: -5rem;
  1012. }
  1013. .class0502,
  1014. .class0601 {
  1015. padding-top: 3rem;
  1016. }
  1017. }
  1018. </style>