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.

788 lines
24 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
3 weeks ago
4 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
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
4 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
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
4 weeks ago
4 weeks ago
4 weeks ago
3 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
4 weeks ago
4 weeks ago
3 weeks ago
4 weeks ago
4 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
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
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <div class="ai-emotion-container">
  3. <!-- 金轮 -->
  4. <div class="golden-wheel">
  5. <img src="@/assets/img/AiEmotion/金轮.png" alt="金轮图标" :class="{ 'rotating-image': isRotating }">
  6. </div>
  7. <!-- 消息显示区域 -->
  8. <div class="user-input-display" ref="userInputDisplayRef">
  9. <div v-for="(message, index) in messages" :key="index" class="message-container">
  10. <!-- 用户输入内容 -->
  11. <div v-if="message.sender === 'user'" class="message-bubble user-message">
  12. {{ message.text }}
  13. </div>
  14. <!-- AI返回结果 -->
  15. <div v-if="message.sender === 'ai'" class="message-bubble ai-message">
  16. {{ message.text }}
  17. </div>
  18. </div>
  19. </div>
  20. <!-- 输入框和发送按钮 -->
  21. <!-- <footer class="input-container fixed-bottom">
  22. <input type="text" v-model="userInput" placeholder="请输入内容..." class="input-box" />
  23. <button @click="handleSendMessage(userInput)" class="send-button">发送</button>
  24. </footer> -->
  25. <!-- <div class="input-container fixed-bottom">
  26. <input type="text" v-model="userInput" placeholder="请输入内容..." class="input-box" />
  27. <button @click="sendMessage" class="send-button">发送</button>
  28. </div> -->
  29. </div>
  30. <!-- 渲染整个页面 -->
  31. <div v-if="isPageLoaded" class="class01">
  32. <div class="class00">
  33. <!-- 四维矩阵图 -->
  34. <div class="class02">
  35. <div class="span01">
  36. {{ stockName }}{{ stockName ? '量子四维矩阵图' : '' }}
  37. </div>
  38. <span class="span02">{{ displayDate }}</span>
  39. </div>
  40. <div class="class0201">
  41. <img src="@/assets/img/AiEmotion/L1.png" alt="情绪监控图标">
  42. </div>
  43. <!-- 温度计图表 -->
  44. <div class="class03">
  45. <div class="class003" style="padding-top: 7rem;padding-left: 12rem;">
  46. <img src="@/assets/img/AiEmotion/温度计.png" alt="温度计图标" style="float: left;padding-left: 5rem;">
  47. <div class="div00">
  48. <div class="div01">galg</div>
  49. <div class="div02">hkjkl</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 src='@/assets/img/AiEmotion/emotionDecod.png' alt="情绪解码器图标">
  62. </div>
  63. <div class="class0402">
  64. <emotionDecod ref="emotionDecodRef"></emotionDecod>
  65. </div>
  66. </div>
  67. <div class="class0403">
  68. <img src="@/assets/img/AiEmotion/L3.png" alt="情绪推演图标">
  69. </div>
  70. <!-- 情绪探底雷达图表 -->
  71. <div class="class05">
  72. <div class="class0502">
  73. <img src="@/assets/img/AiEmotion/探底雷达.png" alt="探底雷达图表">
  74. </div>
  75. <div class="class0503">
  76. <emotionalBottomRadar ref="emotionalBottomRadarRef"></emotionalBottomRadar>
  77. </div>
  78. </div>
  79. <div class="class0501">
  80. <img src="@/assets/img/AiEmotion/L4.png" alt="情绪套利">
  81. </div>
  82. <!-- 情绪能量转化器图表 -->
  83. <div class="class06">
  84. <div class="class0601">
  85. <img src="@/assets/img/AiEmotion/能量转化器.png" alt="能量转化器图标">
  86. </div>
  87. <emoEnergyConverter ref="emoEnergyConverterRef"></emoEnergyConverter>
  88. </div>
  89. <!-- 核心看点 -->
  90. <div class="class0702">
  91. <img src="@/assets/img/AiEmotion/核心看点.png" alt="核心看点字样">
  92. </div>
  93. <div class="bk-image">
  94. <div class="text-container">
  95. <p>情绪监控-金融宇宙的量子检测网络核心任务:构建全市场情绪引力场雷达</p>
  96. <p>情绪解码-主力思维的神经破译矩阵核心任务:解构资金行为的量子密码</p>
  97. <p>情绪推演-未来战争的时空推演舱核心任务:情绪推演</p>
  98. <p>情绪套利-财富裂变的粒子对撞机核心任务:将情绪差转化为a收益粒子流</p>
  99. </div>
  100. </div>
  101. <!-- 核心逻辑 -->
  102. <div class="class0700">
  103. <img src="@/assets/img/AiEmotion/核心逻辑.png" alt="核心逻辑字样">
  104. </div>
  105. <div class="class08">
  106. <div class="lz-img">
  107. <img src="@/assets/img/AiEmotion/量子神经决策树.png" alt="树标题">
  108. </div>
  109. <div class="scaled-img">
  110. <img src="@/assets/img/AiEmotion/tree02.png" alt="树图片">
  111. </div>
  112. </div>
  113. <!-- 场景应用 -->
  114. <div class="class09">
  115. <img src="@/assets/img/AiEmotion/场景应用.png" alt="场景应用标题">
  116. <div class="bk-image">
  117. <!-- <div class="text-container">
  118. <p>情绪监控-金融宇宙的量子检测网络核心任务:构建全市场情绪引力场雷达</p>
  119. <p>情绪解码-主力思维的神经破译矩阵核心任务:解构资金行为的量子密码</p>
  120. <p>情绪推演-未来战争的时空推演舱核心任务:情绪推演</p>
  121. <p>情绪套利-财富裂变的粒子对撞机核心任务:将情绪差转化为a收益粒子流</p>
  122. </div> -->
  123. </div>
  124. </div>
  125. </div>
  126. <!-- <div v-else class="loading">
  127. <p>数据加载中请稍候...</p>
  128. </div> -->
  129. </template>
  130. <script setup>
  131. import { ref, reactive } from 'vue';
  132. import { getReplyAPI } from '@/api/AiEmotionApi.js'; // 导入工作流接口方法
  133. import axios from 'axios';
  134. import emotionDecod from '@/views/components/emotionDecod.vue'; // 导入情绪解码组件
  135. import emotionalBottomRadar from '@/views/components/emotionalBottomRadar.vue'; // 导入情绪探底雷达图组件
  136. import emoEnergyConverter from '@/views/components/emoEnergyConverter.vue'; // 导入情绪能量转化器组件
  137. import marketTemperature from '@/views/components/marketTemperature.vue';
  138. import blueBorderImg from '@/assets/img/AiEmotion/blueBorder.png' //导入蓝色背景框图片
  139. const stockName = ref(''); // 存储股票名称
  140. const marketTemperatureRef = ref(null); // 引用市场温度计组件
  141. const emoEnergyConverterRef = ref(null)
  142. const emotionDecodRef = ref(null)
  143. const emotionalBottomRadarRef = ref(null)
  144. const userInput = ref('');
  145. const messages = ref([]);
  146. const displayDate = ref(''); // 用于存储显示的日期
  147. const isPageLoaded = ref(false); // 控制页面是否显示
  148. const isRotating = ref(false);//控制旋转
  149. const userInputDisplayRef = ref(null);//消息区域的引用
  150. //导出方法供外部使用
  151. defineExpose({handleSendMessage})
  152. // 从本地存储中加载对话历史的方法
  153. const loadMessagesFromLocalStorage = () => {
  154. const storedMessages = localStorage.getItem('chatMessages');
  155. if (storedMessages) {
  156. messages.value = JSON.parse(storedMessages);
  157. }
  158. };
  159. // 将对话历史保存到本地存储的方法
  160. const saveMessagesToLocalStorage = () => {
  161. localStorage.setItem('chatMessages', JSON.stringify(messages.value));
  162. };
  163. // 触发图片旋转的方法
  164. function startImageRotation() {
  165. isRotating.value = true;
  166. // 如果你想在一段时间后停止旋转,可以添加以下代码
  167. setTimeout(() => {
  168. isRotating.value = false;
  169. }, 5000); // 5 秒后停止旋转
  170. }
  171. // 更新 span01 中股票名字的方法
  172. function updateSpan01() {
  173. nextTick(() => {
  174. const span01 = document.querySelector('.span01');
  175. if (span01) {
  176. span01.textContent = `${stockName.value}量子四维矩阵图`;
  177. }
  178. });
  179. }
  180. // 发送消息方法
  181. async function handleSendMessage(input) {
  182. console.log('发送内容:', input);
  183. // 检查用户输入内容是否为空
  184. if (input.trim()) {
  185. const userMessage = reactive({ sender: 'user', text: input });
  186. messages.value.push(userMessage);
  187. userInput.value = ''; // 清空输入框
  188. // 添加等待提示信息
  189. messages.value.push({
  190. sender: 'ai',
  191. text: '数据加载中,请稍候...'
  192. });
  193. // 滚动到最新消息
  194. nextTick(() => {
  195. if (userInputDisplayRef.value) {
  196. userInputDisplayRef.value.scrollTop = userInputDisplayRef.value.scrollHeight;
  197. }
  198. });
  199. // 触发图片旋转
  200. isRotating.value = true;
  201. try {
  202. // 用来调用工作流接口的参数
  203. const params = {
  204. content: userMessage.text,
  205. userData: {
  206. token: '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. stockName.value = parsedData.name || '未知股票';
  228. // 请求数据接口
  229. fetchData(parsedData.code, parsedData.market);
  230. // 更新 span01 的内容
  231. updateSpan01();
  232. } else {
  233. console.error('工作流接口返回非股票信息:', parsedData.refuse);
  234. messages.value.push({
  235. sender: 'ai',
  236. text: `工作流接口返回信息: ${parsedData.refuse || '未知错误'}`,
  237. });
  238. }
  239. } catch (error) {
  240. console.error('请求工作流接口失败:', error);
  241. messages.value.push({
  242. sender: 'ai',
  243. text: '工作流接口请求失败,请稍后再试。',
  244. });
  245. } finally {
  246. // 停止图片旋转
  247. isRotating.value = false;
  248. // 保存对话历史到本地存储
  249. saveMessagesToLocalStorage();
  250. }
  251. } else {
  252. messages.value.push({
  253. sender: 'ai',
  254. text: '请输入内容后再发送。',
  255. });
  256. // 滚动到最新消息
  257. nextTick(() => {
  258. if (userInputDisplayRef.value) {
  259. userInputDisplayRef.value.scrollTop = userInputDisplayRef.value.scrollHeight;
  260. }
  261. });
  262. }
  263. }
  264. const version1 = ref(2); // 版本号
  265. // 请求数据接口
  266. async function fetchData(code, market) {
  267. try {
  268. const stockDataParams = {
  269. // token: '+XgqsgdW0RLIbIG2pxnnbZi0+fEeMx8pywnIlrmTxtkSaPZ9xjSOWrxq+s0rL3RrfNhXPvGtz9srFfjwu8A',
  270. token: '9ior41AF0xTIbIG2pRnnbZi0+fEeMx8pywnIlrmTwo5FbqJ9lWrSWOxp9MkpKiNtedtUafqvzIwpFKrwuMs',
  271. market: 'usa',
  272. code: 'TSLA',
  273. language: 'cn',
  274. version: version1.value
  275. };
  276. const stockDataResult = await axios.post(
  277. 'http://39.101.133.168:8828/link/api/aiEmotion/client/getAiEmotionData',
  278. // 'https://api.homilychart.com/link/api/aiEmotion/client/getAiEmotionData',
  279. stockDataParams,
  280. {
  281. headers: {
  282. 'Content-Type': 'application/json',
  283. },
  284. }
  285. );
  286. const stockDataResponse = stockDataResult.data; // 获取返回所有的数据
  287. console.log('图表数据接口返回数据:', stockDataResponse.data);
  288. if (stockDataResponse.code === 200 && stockDataResponse.data) {
  289. messages.value.push({
  290. sender: 'ai',
  291. text: `股票数据已成功获取`,
  292. });
  293. // 滚动到最新消息
  294. nextTick(() => {
  295. if (userInputDisplayRef.value) {
  296. userInputDisplayRef.value.scrollTop = userInputDisplayRef.value.scrollHeight;
  297. }
  298. });
  299. console.log('1111111111111111111111')
  300. // 调用渲染图表的方法
  301. renderCharts(stockDataResponse.data);
  302. console.log('2222222222222222222222')
  303. // 设置当天日期
  304. const today = new Date();
  305. const year = today.getFullYear();
  306. const month = String(today.getMonth() + 1).padStart(2, '0');
  307. const day = String(today.getDate()).padStart(2, '0');
  308. displayDate.value = `${year}/${month}/${day}`;
  309. // 数据和图表加载完成,显示页面
  310. isPageLoaded.value = true;
  311. } else {
  312. messages.value.push({
  313. sender: 'ai',
  314. text: '图表数据接口返回数据不完整,请稍后再试。',
  315. });
  316. // 滚动到最新消息
  317. nextTick(() => {
  318. if (userInputDisplayRef.value) {
  319. userInputDisplayRef.value.scrollTop = userInputDisplayRef.value.scrollHeight;
  320. }
  321. });
  322. }
  323. } catch (error) {
  324. messages.value.push({
  325. sender: 'ai',
  326. text: '图表数据接口请求失败,请稍后再试。',
  327. });
  328. }
  329. }
  330. // 渲染组件图表的方法
  331. function renderCharts(data) {
  332. nextTick(() => {
  333. // 渲染股市温度计图表
  334. if (marketTemperatureRef.value && data.GSWDJ) {
  335. console.log('开始渲染股市温度计图表');
  336. console.log('股市温度计数据', data.GSWDJ)
  337. marketTemperatureRef.value.initChart(data.GSWDJ, data.KLine20, data.WDRL);
  338. console.log('股市温度计图表已渲染');
  339. }
  340. // 渲染情绪解码器图表
  341. if (emotionDecodRef.value && data.QXJMQ) {
  342. console.log('开始渲染情绪解码器图表');
  343. console.log('情绪解码器数据', data.QXJMQ)
  344. emotionDecodRef.value.initQXNLZHEcharts(data.KLine20, data.QXJMQ);
  345. console.log('情绪解码器图表已渲染');
  346. }
  347. // 渲染情绪探底雷达图表
  348. if (emotionalBottomRadarRef.value && data.QXTDLD) {
  349. console.log('开始渲染情绪探底雷达图表');
  350. console.log('数据', data.QXTDLD)
  351. emotionalBottomRadarRef.value.initEmotionalBottomRadar(data.KLine20, data.QXTDLD);
  352. console.log('情绪探底雷达图表已渲染');
  353. }
  354. // 渲染情绪能量转化器图表
  355. if (emoEnergyConverterRef.value && data.QXNLZHQ) {
  356. console.log('开始渲染情绪能量转化器图表');
  357. console.log('KLine20:', data.KLine20);
  358. console.log('QXNLZHQ:', data.QXNLZHQ);
  359. emoEnergyConverterRef.value.initQXNLZHEcharts(data.KLine20, data.QXNLZHQ);
  360. console.log('情绪能量转化器图表已渲染');
  361. }
  362. });
  363. }
  364. // 页面挂载完成后触发图片旋转
  365. onMounted(() => {
  366. startImageRotation();
  367. loadMessagesFromLocalStorage();//加载历史对话
  368. });
  369. </script>
  370. <style scoped>
  371. .class003 .div02{
  372. background-image: url('@/assets/img/AiEmotion/redBorder.png');
  373. background-repeat: no-repeat;
  374. background-size: 100% 100%;
  375. width: 35%;
  376. min-height: 40px;
  377. float: left;
  378. margin-left: 100px;
  379. margin-top: 30px;
  380. text-align: center;
  381. font-size: 24px;
  382. color: white;
  383. }
  384. .class003 .div01{
  385. background-image: url('@/assets/img/AiEmotion/blueBorder.png');
  386. background-repeat: no-repeat;
  387. background-size: 100% 100%;
  388. width: 35%;
  389. min-height: 40px;
  390. float: left;
  391. margin-left: 100px;
  392. text-align: center;
  393. margin-top: 10px;
  394. font-size: 24px;
  395. color: white;
  396. }
  397. /* 定义旋转动画 */
  398. @keyframes rotate {
  399. from {
  400. transform: rotate(0deg);
  401. }
  402. to {
  403. transform: rotate(360deg);
  404. }
  405. }
  406. /* 应用动画到图片 */
  407. .rotating-image {
  408. animation: rotate 5s linear;
  409. /* 5 秒完成一次旋转,线性速度*/
  410. }
  411. .bk-image {
  412. background-image: url('@/assets/img/AiEmotion/bk03.png');
  413. background-size: 100% 100%;
  414. /* background-position: center; */
  415. background-repeat: no-repeat;
  416. width: 95%;
  417. height: 30rem;
  418. margin: 0 auto;
  419. margin-top: 20px;
  420. }
  421. /* 最后文字的颜色 */
  422. .text-container {
  423. position: relative;
  424. top: 40%;
  425. left: 50%;
  426. transform: translate(-50%, -50%);
  427. color: white;
  428. /* 设置文字颜色 */
  429. text-align: left;
  430. /* 文字居中对齐 */
  431. padding: 20px;
  432. }
  433. .text-container p {
  434. margin: 10px 0;
  435. /* 设置段落间距 */
  436. font-size: 40px;
  437. /* 设置字体大小 */
  438. margin-left: 50px;
  439. }
  440. .class07 {
  441. background-image: url('@/assets/img/AiEmotion/bk03.png');
  442. /* 使用导入的背景图片 */
  443. background-size: cover;
  444. /* 确保背景图片完整显示 */
  445. background-repeat: no-repeat;
  446. /* 防止背景图片重复 */
  447. width: 95%;
  448. /* 设置容器宽度 */
  449. height: auto;
  450. /* 高度根据内容动态变化 */
  451. min-height: 70rem;
  452. /* 设置最小高度,确保图片显示 */
  453. margin: 0 auto;
  454. }
  455. .class0700 {
  456. margin: 0 auto;
  457. width: fit-content;
  458. }
  459. .class0702 {
  460. margin: 0 auto;
  461. width: fit-content;
  462. }
  463. .class0503 {
  464. width: 80%;
  465. margin: 0 auto;
  466. }
  467. .class0402 {
  468. width: 80%;
  469. margin: 0 auto;
  470. }
  471. .class0601 {
  472. padding-top: 10rem;
  473. text-align: center;
  474. }
  475. .class0502 {
  476. padding-top: 10rem;
  477. text-align: center;
  478. }
  479. .class0701 {
  480. margin: 0 auto;
  481. width: fit-content;
  482. }
  483. .class0501 {
  484. margin: 0 auto;
  485. width: fit-content;
  486. }
  487. .class0403 {
  488. margin: 0 auto;
  489. width: fit-content;
  490. }
  491. .class0301 {
  492. margin: 0 auto;
  493. width: fit-content;
  494. }
  495. .class0201 {
  496. margin: 0 auto;
  497. width: fit-content;
  498. }
  499. .class0401 {
  500. padding-top: 10rem;
  501. text-align: center;
  502. }
  503. .class09 {
  504. text-align: center;
  505. }
  506. /* 为需要放大的图片添加样式 */
  507. .scaled-img {
  508. transform: scale(2.5);
  509. text-align: center;
  510. }
  511. .lz-img {
  512. margin-bottom: 10rem;
  513. text-align: center;
  514. padding-top: 70px;
  515. }
  516. .class08 {
  517. background-image: url('@/assets/img/AiEmotion/bk03.png');
  518. background-size: 100% 100%;
  519. background-repeat: no-repeat;
  520. width: 95%;
  521. height: auto;
  522. min-height: 40rem;
  523. margin: 0 auto;
  524. }
  525. .class06 {
  526. background-image: url('@/assets/img/AiEmotion/bk03.png');
  527. /* 使用导入的背景图片 */
  528. background-size: 100% 100%;
  529. /* 确保背景图片完整显示 */
  530. background-repeat: no-repeat;
  531. /* 防止背景图片重复 */
  532. width: 95%;
  533. /* 设置容器宽度 */
  534. height: auto;
  535. /* 高度根据内容动态变化 */
  536. min-height: 70rem;
  537. /* 设置最小高度,确保图片显示 */
  538. margin: 0 auto;
  539. }
  540. .class05 {
  541. background-image: url('@/assets/img/AiEmotion/bk03.png');
  542. /* 使用导入的背景图片 */
  543. background-size: 100% 100%;
  544. /* 确保背景图片完整显示 */
  545. background-repeat: no-repeat;
  546. /* 防止背景图片重复 */
  547. width: 95%;
  548. /* 设置容器宽度 */
  549. height: auto;
  550. /* 高度根据内容动态变化 */
  551. min-height: 70rem;
  552. /* 设置最小高度,确保图片显示 */
  553. margin: 0 auto;
  554. }
  555. .class04 {
  556. background-image: url('@/assets/img/AiEmotion/bk03.png');
  557. /* 使用导入的背景图片 */
  558. background-size: 100% 100%;
  559. /* 确保背景图片完整显示 */
  560. background-repeat: no-repeat;
  561. /* 防止背景图片重复 */
  562. width: 95%;
  563. /* 设置容器宽度 */
  564. height: auto;
  565. /* 高度根据内容动态变化 */
  566. min-height: 55rem;
  567. /* 设置最小高度,确保图片显示 */
  568. margin: 0 auto;
  569. }
  570. .class03 {
  571. background-image: url('@/assets/img/AiEmotion/bk03.png');
  572. /* 使用导入的背景图片 */
  573. background-size: 100% 100%;
  574. /* 确保背景图片完整显示 */
  575. background-repeat: no-repeat;
  576. /* 防止背景图片重复 */
  577. width: 95%;
  578. /* 设置容器宽度 */
  579. height: auto;
  580. /* 高度根据内容动态变化 */
  581. min-height: 70rem;
  582. /* 设置最小高度,确保图片显示 */
  583. margin: 0 auto;
  584. }
  585. .class00{
  586. background-size: 100% 100%;
  587. /* 确保背景图片完整显示 */
  588. background-repeat: no-repeat;
  589. /* 防止背景图片重复 */
  590. width: 95%;
  591. /* 设置容器宽度 */
  592. height: auto;
  593. /* 高度根据内容动态变化 */
  594. min-height: 55rem;
  595. /* 设置最小高度,确保图片显示 */
  596. margin: 0 auto;
  597. }
  598. .span02 {
  599. font-size: 1.5rem;
  600. color: white;
  601. float: right;
  602. }
  603. .span01 {
  604. background-image: url('@/assets/img/AiEmotion/bk01.png');
  605. /* 使用导入的背景图片 */
  606. background-size: cover;
  607. /* 背景图片覆盖整个容器 */
  608. background-repeat: no-repeat;
  609. /* 防止背景图片重复 */
  610. display: inline-block;
  611. /* 确保容器是块级元素 */
  612. padding: 10px;
  613. /* 添加内边距以显示内容 */
  614. color: #fff;
  615. /* 设置文字颜色以确保可读性 */
  616. border-radius: 5px;
  617. /* 添加圆角 */
  618. min-height: 3rem;
  619. min-width: 30rem;
  620. font-size: 1.5rem;
  621. /* 增加字体大小以便更清晰显示股票名称 */
  622. text-align: center;
  623. /* 文字居中 */
  624. }
  625. .class01 {
  626. width: 90%;
  627. /* 固定容器宽度 */
  628. min-height: 100px;
  629. /* 设置最小高度,确保初始显示 */
  630. height: auto;
  631. /* 高度根据内容动态变化 */
  632. padding: 40px;
  633. /* 添加内边距,确保内容与边界有间距 */
  634. box-sizing: border-box;
  635. /* 包括内边距在宽度和高度计算中 */
  636. background-color: #5e81a7;
  637. margin: 0 auto;
  638. /* 居中容器 */
  639. margin-bottom: 10rem;
  640. }
  641. .ai-emotion-container {
  642. display: flex;
  643. flex-direction: column;
  644. align-items: center;
  645. justify-content: center;
  646. padding: 20px;
  647. position: relative;
  648. }
  649. .user-input-display {
  650. margin-top: 20px;
  651. display: flex;
  652. flex-direction: column;
  653. width: 100%;
  654. }
  655. .message-container {
  656. display: flex;
  657. margin-bottom: 10px;
  658. }
  659. .user-message {
  660. background-color: #007bff;
  661. color: #fff;
  662. padding: 10px 15px;
  663. border-radius: 15px;
  664. max-width: 60%;
  665. text-align: left;
  666. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  667. align-self: flex-end;
  668. }
  669. .ai-message {
  670. background-color: #f1f1f1;
  671. color: #333;
  672. padding: 10px 15px;
  673. border-radius: 15px;
  674. max-width: 60%;
  675. text-align: left;
  676. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  677. align-self: flex-start;
  678. }
  679. .input-container {
  680. display: flex;
  681. align-items: center;
  682. gap: 10px;
  683. }
  684. .fixed-bottom {
  685. position: fixed;
  686. bottom: 100px;
  687. left: 0;
  688. width: 100%;
  689. background-color: #f8f9fa;
  690. padding: 10px 20px;
  691. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  692. }
  693. .input-box {
  694. padding: 10px;
  695. font-size: 16px;
  696. border: 1px solid #ccc;
  697. border-radius: 5px;
  698. width: calc(100% - 120px);
  699. }
  700. .send-button {
  701. padding: 10px 20px;
  702. font-size: 16px;
  703. color: #fff;
  704. background-color: #007bff;
  705. border: none;
  706. border-radius: 5px;
  707. cursor: pointer;
  708. }
  709. .send-button:hover {
  710. background-color: #0056b3;
  711. }
  712. </style>