Browse Source

Merge branch 'hongxilin/feature-20250628153758-财神优化:字正确性,一致性等' into milestone-20250710-上线前优化

dev
no99 1 day ago
parent
commit
6ca6559ac4
  1. 252
      src/views/AIchat.vue
  2. 934
      src/views/Feedback.vue
  3. 48
      src/views/homePage.vue

252
src/views/AIchat.vue

@ -757,7 +757,7 @@ watch(
const env = import.meta.env.VITE_ENV;
const result20 = await dataListAPI({
token:
'8Csj5VVX1UbIb4C3oxrnbZi0+fEeMx8pywnIlrmTm45Cb/EllzWACLto9J9+fCFsfdgBOvKvyY94FvqlvM0',
"8Csj5VVX1UbIb4C3oxrnbZi0+fEeMx8pywnIlrmTm45Cb/EllzWACLto9J9+fCFsfdgBOvKvyY94FvqlvM0",
// "8nkj4QBV1RPIb4CzoRTnbZi0+fEeMx8pywnIlrmTxdwROKkuwWqAWu9orpkpeXVqL98DPfeonNYpHv+mucA",
market: codeData.value.market,
code: codeData.value.code,
@ -1212,114 +1212,122 @@ watch(
// content: ac1,
// });
//
const LiuSeData = JSON.parse(JSON.stringify(toRaw(HomePage)));
const sz = fnGetData(LiuSeData);
if (sz) {
hasValidData.value = true;
console.log("hasValidData设置为:", hasValidData.value);
if (HomePage) {
const LiuSeData = JSON.parse(JSON.stringify(toRaw(HomePage)));
const sz = fnGetData(LiuSeData);
if (sz) {
hasValidData.value = true;
console.log("hasValidData设置为:", hasValidData.value);
}
// K线
const klineMessageId1 = `kline-${Date.now()}`;
console.log("生成K线消息ID:", klineMessageId1);
addTypingTask(
{
sender: "ai",
class: "content1",
type: "content1",
kline: true,
chartData: sz,
messageId: klineMessageId1,
hasValidData: true,
klineType: 1,
},
"",
50
);
// chatStore.messages.push({
// sender: "ai",
// class: "content1",
// type: "content1",
// kline: true,
// chartData: sz,
// messageId: klineMessageId1,
// hasValidData: true,
// klineType: 1,
// });
// console.log("");
// //
// nextTick(() => {
// console.log("nextTick - ");
// console.log(":", chatStore.messages);
// // K线
// let klineIndex = -1;
// for (let i = 0; i < chatStore.messages.length; i++) {
// if (chatStore.messages[i].messageId === klineMessageId1) {
// klineIndex = i;
// break;
// }
// }
// console.log("K线:", klineIndex);
// if (klineIndex !== -1) {
// const containerId = `kline-container-${klineIndex}`;
// console.log("ID:", containerId);
// // DOM
// setTimeout(() => {
// console.log("DOM");
// KlineCanvsEcharts(containerId);
// }, 100); // DOM
// } else {
// console.warn("K线");
// }
// });
}
// K线
const klineMessageId1 = `kline-${Date.now()}`;
console.log("生成K线消息ID:", klineMessageId1);
addTypingTask(
{
sender: "ai",
class: "content1",
type: "content1",
kline: true,
chartData: sz,
messageId: klineMessageId1,
hasValidData: true,
klineType: 1,
},
"",
50
);
// chatStore.messages.push({
// sender: "ai",
// class: "content1",
// type: "content1",
// kline: true,
// chartData: sz,
// messageId: klineMessageId1,
// hasValidData: true,
// klineType: 1,
// });
// console.log("");
// //
// nextTick(() => {
// console.log("nextTick - ");
// console.log(":", chatStore.messages);
// // K线
// let klineIndex = -1;
// for (let i = 0; i < chatStore.messages.length; i++) {
// if (chatStore.messages[i].messageId === klineMessageId1) {
// klineIndex = i;
// break;
// }
// }
// console.log("K线:", klineIndex);
// if (klineIndex !== -1) {
// const containerId = `kline-container-${klineIndex}`;
// console.log("ID:", containerId);
// // DOM
// setTimeout(() => {
// console.log("DOM");
// KlineCanvsEcharts(containerId);
// }, 100); // DOM
// } else {
// console.warn("K线");
// }
// });
// K线
const AIGoldBullData = JSON.parse(
JSON.stringify(toRaw(AIGoldBull))
);
const HomePageData = JSON.parse(
JSON.stringify(toRaw(HomePage))
);
console.log("处理 K 线数据 - 开始");
console.log("AIGoldBullData", AIGoldBullData);
console.log("HomePageData", HomePageData);
const Kline20 = {
name: HomePageData.StockInformation.Name,
Kline: AIGoldBullData,
};
// K线
console.log("K线数据结构:", Kline20);
console.log("K线数据名称:", Kline20.name);
console.log("K线数据:", Kline20.Kline ? Kline20.Kline : null);
//
hasValidData.value = true;
console.log("hasValidData设置为:", hasValidData.value);
if (
AIGoldBull.DNC &&
AIGoldBull.FCX &&
AIGoldBull.JN &&
AIGoldBull.KLine20 &&
AIGoldBull.QSXH
) {
const AIGoldBullData = JSON.parse(
JSON.stringify(toRaw(AIGoldBull))
);
const HomePageData = JSON.parse(
JSON.stringify(toRaw(HomePage))
);
console.log("处理 K 线数据 - 开始");
console.log("AIGoldBullData", AIGoldBullData);
console.log("HomePageData", HomePageData);
const Kline20 = {
name: HomePageData.StockInformation.Name,
Kline: AIGoldBullData,
};
// K线
console.log("K线数据结构:", Kline20);
console.log("K线数据名称:", Kline20.name);
console.log("K线数据:", Kline20.Kline ? Kline20.Kline : null);
//
hasValidData.value = true;
console.log("hasValidData设置为:", hasValidData.value);
// chatStore.messages.pop();
// chatStore.messages.pop();
// K线
const klineMessageId2 = `kline-${Date.now() + 1}`;
console.log("生成K线消息ID:", klineMessageId2);
// K线
const klineMessageId2 = `kline-${Date.now() + 1}`;
console.log("生成K线消息ID:", klineMessageId2);
// chatStore.messages.push({
// sender: "ai",
// class: "content2",
// type: "content2",
// kline: true,
// chartData: Kline20,
// messageId: klineMessageId2,
// hasValidData: true, // hasValidData
// klineType: 2,
// });
// chatStore.messages.push({
// sender: "ai",
// class: "content2",
// type: "content2",
// kline: true,
// chartData: Kline20,
// messageId: klineMessageId2,
// hasValidData: true, // hasValidData
// klineType: 2,
// });
addTypingTask(
{
@ -1338,27 +1346,27 @@ watch(
50
);
// console.log("K线");
// console.log("K线");
// //
// nextTick(() => {
// console.log("nextTick - ");
// console.log(":", chatStore.messages);
// //
// nextTick(() => {
// console.log("nextTick - ");
// console.log(":", chatStore.messages);
// // K线
// let klineIndex = -1;
// for (let i = 0; i < chatStore.messages.length; i++) {
// if (chatStore.messages[i].messageId === klineMessageId2) {
// klineIndex = i;
// break;
// }
// }
// // K线
// let klineIndex = -1;
// for (let i = 0; i < chatStore.messages.length; i++) {
// if (chatStore.messages[i].messageId === klineMessageId2) {
// klineIndex = i;
// break;
// }
// }
// console.log("K线:", klineIndex);
// console.log("K线:", klineIndex);
// if (klineIndex !== -1) {
// const containerId = `kline-container-${klineIndex}`;
// console.log("ID:", containerId);
// if (klineIndex !== -1) {
// const containerId = `kline-container-${klineIndex}`;
// console.log("ID:", containerId);
// // DOM
// setTimeout(() => {
@ -1585,7 +1593,7 @@ watch(
const ac44 = `${arr[2]},${arr[3]}</p>`;
const ac45 = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【时间维度】</p><p style="display:flex;justify-content:center;">`;
const ac46 = `${result23.data.shijian}</p>`;
const ac47 = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【能量维度】</p><p>`;
const ac47 = `<p style="margin:0;color:#FADC0C;display:flex;justify-content:center;font-size:22px">【能量维度】</p><p style="display:flex;justify-content:center;">`;
const ac48 = `${result23.data.nengliang}</p>`;
// const pc4 = marked(

934
src/views/Feedback.vue
File diff suppressed because it is too large
View File

48
src/views/homePage.vue

@ -1,6 +1,6 @@
<script setup>
//
import { ref, computed, onMounted, watch, nextTick, onUnmounted } from "vue";
import { ref, computed, onMounted, watch, nextTick, onUnmounted, h } from "vue";
import { setHeight } from "../utils/setHeight";
import { getUserCountAPI } from "../api/AIxiaocaishen";
import { ElMessage } from "element-plus";
@ -427,46 +427,32 @@ const goToRecharge = () => {
};
const adjustFooterPosition = (height) => {
console.log("调整底部位置", height);
const footer = document.querySelector(".el-footer");
const main = document.querySelector(".el-main");
const homePage = document.querySelector(".homepage");
const app = document.getElementById("app");
// Footer 60px // Footer
// footer.style.bottom = `${keyboardHeight}px`;
// Main Footer +
homePage.style.height = `${height}px`;
// app.style.height = `${height}px`;
void homePage.offsetHeight;
const html = document.querySelector("html");
const body = document.querySelector("body");
html.style.height = `${height}px`;
body.style.height = `${height}px`;
const isAndroid = /Android/i.test(navigator.userAgent);
if (isAndroid) {
console.log("是安卓设备");
console.log("window.visualViewport", window.visualViewport.height);
const homePage = document.querySelector(".homepage");
homePage.style.height = `${height}px`;
// homePage.style.height = `460px`;
html.scrollTop = 0;
html.scrollTop = 0;
} else {
console.log("非安卓设备");
console.log("调整底部位置", height);
const homePage = document.querySelector(".homepage");
homePage.style.height = `${height}px`;
html.scrollTop = 0;
}
setTimeout(() => {
//
html.style.overflow = "hidden";
body.style.overflow = "hidden";
}, 200);
// console.log(html.offsetHeight, 'html')
// console.log(html.clientHeight, 'html')
// console.log(html.scrollHeight, 'htmlScrollHeight')
// console.log(body.clientHeight, 'body')
// console.log(body.scrollHeight, 'bodyScrollHeight')
// console.log(homePage.offsetHeight, 'homePage')
// console.log(homePage.clientHeight, 'homePageClientHeight')
// console.log(homePage.scrollHeight, 'homePageScrollHeight')
// console.log(window.innerHeight, 'window.innerHeight')
// console.log(window.visualViewport.height, 'window.visualViewport.height')
// console.log(main.offsetHeight, 'main')
// console.log(main.clientHeight, 'mainClientHeight')
// console.log(main.scrollHeight, 'mainScrollHeight')
};
const onFocus = function () {

Loading…
Cancel
Save