Browse Source

Merge branch 'milestone-20250924-接入大财神工作流'

master
宋杰 5 days ago
parent
commit
6d23362577
  1. 1
      src/store/chat.js
  2. 1
      src/store/deepNine.js
  3. 6
      src/views/AIchat.vue
  4. 6
      src/views/DBQBmodel.vue
  5. 10
      src/views/DeepNineModel.vue
  6. 32
      src/views/Selectmodel.vue
  7. 18
      src/views/deepNine.vue
  8. 56
      src/views/homePage.vue

1
src/store/chat.js

@ -23,6 +23,7 @@ export const useChatStore = defineStore("chat", {
firstAPICall:false, firstAPICall:false,
dbqbScrollToTop:true, dbqbScrollToTop:true,
allowTyping:false,
}), }),
actions: { actions: {
async getUserCount() { async getUserCount() {

1
src/store/deepNine.js

@ -23,6 +23,7 @@ export const useDeepNineStore = defineStore("deepNine", {
firstAPICall:false, firstAPICall:false,
dbqbScrollToTop:true, dbqbScrollToTop:true,
allowTyping:false,
}), }),
actions: { actions: {
async getUserCount() { async getUserCount() {

6
src/views/AIchat.vue

@ -949,7 +949,9 @@ const processTypingQueue = async () => {
while (typingQueue.value.length > 0) { while (typingQueue.value.length > 0) {
const task = typingQueue.value.shift(); const task = typingQueue.value.shift();
await createTypingEffect(task.message, task.content, task.speed);
if (chatStore.allowTyping) {
await createTypingEffect(task.message, task.content, task.speed);
}
} }
isTypingInProgress.value = false; isTypingInProgress.value = false;
@ -1144,6 +1146,7 @@ watch(
// , // ,
try { try {
chatStore.allowTyping = true;
// //
const result = await dbqbFirstAPI(params1); const result = await dbqbFirstAPI(params1);
codeData.value = result.data; codeData.value = result.data;
@ -2576,6 +2579,7 @@ watch(
// 3. // 3.
typingQueue.value = []; typingQueue.value = [];
isTypingInProgress.value = false; isTypingInProgress.value = false;
chatStore.allowTyping = false;
// 4. // 4.
chatStore.isLoading = false; chatStore.isLoading = false;

6
src/views/DBQBmodel.vue

@ -306,4 +306,10 @@ const closeNoPermissionDialog = () => {
/* margin-top: 20px; */ /* margin-top: 20px; */
} }
} }
@media screen and (min-width: 375px) and (max-width: 400px) {
.top-icon {
margin-top: 2%;
width: 90%;
}
}
</style> </style>

10
src/views/DeepNineModel.vue

@ -316,4 +316,14 @@ const closeNoPermissionDialog = () => {
/* margin-top: 20px; */ /* margin-top: 20px; */
} }
} }
@media screen and (max-width: 400px){
.top-icon {
margin-top: -2%;
width: 80%;
}
.bottom-icon{
gap: 1rem;
bottom: 5vh;
}
}
</style> </style>

32
src/views/Selectmodel.vue

@ -127,14 +127,26 @@ const calculatePaths = () => {
const isMobile = window.innerWidth <= 768; const isMobile = window.innerWidth <= 768;
// 线 // 线
const curveOffset = isMobile ? containerWidth * 0.15 : containerWidth * 0.1;
// PC使使线
const curveOffset = isMobile ? containerWidth * 0.15 : containerWidth * 0.25;
//
const leftControlX = topLeft.x - curveOffset; //
const leftControlY = (topLeft.y + bottom.y) / 2;
const rightControlX = topRight.x + curveOffset; //
const rightControlY = (topRight.y + bottom.y) / 2;
//
if (isMobile) {
//
var leftControlX = topLeft.x - curveOffset;
var leftControlY = (topLeft.y + bottom.y) / 2;
var rightControlX = topRight.x + curveOffset;
var rightControlY = (topRight.y + bottom.y) / 2;
} else {
// PC使
// 线
var leftControlX = topLeft.x;
var leftControlY = bottom.y;
var rightControlX = topRight.x;
var rightControlY = bottom.y;
}
// //
pathData.leftPath = `M ${topLeft.x} ${topLeft.y} Q ${leftControlX} ${leftControlY} ${bottom.x} ${bottom.y}`; pathData.leftPath = `M ${topLeft.x} ${topLeft.y} Q ${leftControlX} ${leftControlY} ${bottom.x} ${bottom.y}`;
@ -246,8 +258,8 @@ const goToDeepNineModel = () => {
stroke: #409eff; stroke: #409eff;
stroke-width: 2; stroke-width: 2;
fill: none; fill: none;
stroke-dasharray: 5, 5;
animation: dash 1s linear infinite;
stroke-dasharray: none;
animation: none;
} }
@keyframes dash { @keyframes dash {
@ -421,7 +433,7 @@ const goToDeepNineModel = () => {
} }
.buttons-container { .buttons-container {
margin-top: 18rem;
margin-top: 15rem;
position: relative; position: relative;
width: 100%; width: 100%;
} }

18
src/views/deepNine.vue

@ -256,7 +256,8 @@ const toggleVoiceForUser = (index) => {
!chatStore.messages[index].audioArray[0] || !chatStore.messages[index].audioArray[0] ||
!chatStore.messages[index].audioArray[1] || !chatStore.messages[index].audioArray[1] ||
!chatStore.messages[index].audioArray[2] || !chatStore.messages[index].audioArray[2] ||
!chatStore.messages[index].audioArray[3]
!chatStore.messages[index].audioArray[3] ||
!chatStore.messages[index].audioArray[4]
) { ) {
return; return;
} }
@ -300,6 +301,10 @@ const toggleVoiceForUser = (index) => {
audioPreloadStatus.four.loaded = true; audioPreloadStatus.four.loaded = true;
audioPreloadStatus.four.url = chatStore.messages[index].audioArray[3]; audioPreloadStatus.four.url = chatStore.messages[index].audioArray[3];
} }
if (chatStore.messages[index].audioArray[4]) {
audioPreloadStatus.five.loaded = true;
audioPreloadStatus.five.url = chatStore.messages[index].audioArray[4];
}
chatStore.currentUserIndex = index; chatStore.currentUserIndex = index;
audioQueue.value = []; audioQueue.value = [];
isPlayingAudio.value = false; isPlayingAudio.value = false;
@ -311,6 +316,7 @@ const toggleVoiceForUser = (index) => {
addToAudioQueue(chatStore.messages[index].audioArray[1], "API2-第二个"); addToAudioQueue(chatStore.messages[index].audioArray[1], "API2-第二个");
addToAudioQueue(chatStore.messages[index].audioArray[2], "API3-第三个"); addToAudioQueue(chatStore.messages[index].audioArray[2], "API3-第三个");
addToAudioQueue(chatStore.messages[index].audioArray[3], "API4-第四个"); addToAudioQueue(chatStore.messages[index].audioArray[3], "API4-第四个");
addToAudioQueue(chatStore.messages[index].audioArray[4], "API5-第五个");
if (!audioStore.isVoiceEnabled) { if (!audioStore.isVoiceEnabled) {
audioStore.toggleVoice(); audioStore.toggleVoice();
@ -870,7 +876,9 @@ const processTypingQueue = async () => {
while (typingQueue.value.length > 0) { while (typingQueue.value.length > 0) {
const task = typingQueue.value.shift(); const task = typingQueue.value.shift();
await createTypingEffect(task.message, task.content, task.speed);
if (chatStore.allowTyping) {
await createTypingEffect(task.message, task.content, task.speed);
}
} }
isTypingInProgress.value = false; isTypingInProgress.value = false;
@ -1065,6 +1073,7 @@ watch(
// , // ,
try { try {
chatStore.allowTyping = true;
// //
const result = await deepNineFirstAPI(params1); const result = await deepNineFirstAPI(params1);
codeData.value = result.data; codeData.value = result.data;
@ -1122,7 +1131,7 @@ watch(
console.log(AIcontent, "AIcontent"); console.log(AIcontent, "AIcontent");
if (result.code == 406) { if (result.code == 406) {
AIcontent.value = `<p>尊敬的用户您好,您当前的“深度九大模型专属Token”数量为0,无法进行股票查询,可联系客服团队进行充值,感谢您的理解与支持</p>`;
AIcontent.value = `<p>尊敬的用户您好,您当前的“深度九大模型专属Token”余额不足,无法进行股票查询,可联系客服团队进行充值,感谢您的理解与支持</p>`;
} }
const aiMsg = { const aiMsg = {
@ -1956,6 +1965,7 @@ watch(
// 3. // 3.
typingQueue.value = []; typingQueue.value = [];
isTypingInProgress.value = false; isTypingInProgress.value = false;
chatStore.allowTyping = false;
// 4. // 4.
homepageChatStore.isLoading = false; homepageChatStore.isLoading = false;
@ -2181,7 +2191,7 @@ watch(
content: "该内容由AI生成,请注意甄别", content: "该内容由AI生成,请注意甄别",
end: true, end: true,
}); });
} catch (e) { } catch (e) {
ElMessage.error("历史数据获取出错!"); ElMessage.error("历史数据获取出错!");
console.error("e", e); console.error("e", e);

56
src/views/homePage.vue

@ -45,9 +45,9 @@ import back from "../assets/img/Feedback/back.png";
import HistoryRecord from "./components/HistoryRecord.vue"; import HistoryRecord from "./components/HistoryRecord.vue";
// import VConsole from "vconsole";
import VConsole from "vconsole";
// const vConsole = new VConsole();
const vConsole = new VConsole();
const isMobile = ref(null); const isMobile = ref(null);
@ -455,7 +455,7 @@ const handleHistorySelect = (stockData) => {
console.log("接收到历史记录数据:", stockData); console.log("接收到历史记录数据:", stockData);
// //
if (activeTab.value === 'AiEmotion') {
if (activeTab.value === "AiEmotion") {
// addStock // addStock
nextTick(() => { nextTick(() => {
if (aiEmotionRef.value && aiEmotionRef.value.addStock) { if (aiEmotionRef.value && aiEmotionRef.value.addStock) {
@ -1016,7 +1016,7 @@ const throttledHeightListener = _.throttle(heightListener, 500, {
// // window.open(rechargeUrl) // // window.open(rechargeUrl)
// }; // };
const adjustFooterPosition = (height) => {
const adjustFooterPosition = async (height) => {
const html = document.querySelector("html"); const html = document.querySelector("html");
const body = document.querySelector("body"); const body = document.querySelector("body");
@ -1026,7 +1026,7 @@ const adjustFooterPosition = (height) => {
console.log("window.visualViewport", window.visualViewport.height); console.log("window.visualViewport", window.visualViewport.height);
const homePage = document.querySelector(".homepage"); const homePage = document.querySelector(".homepage");
homePage.style.height = `${height}px`;
// homePage.style.height = `${height}px`;
// homePage.style.height = `460px`; // homePage.style.height = `460px`;
html.scrollTop = 0; html.scrollTop = 0;
@ -1038,6 +1038,8 @@ const adjustFooterPosition = (height) => {
html.scrollTop = 0; html.scrollTop = 0;
} }
await nextTick();
html.scrollTop = 0;
setTimeout(() => { setTimeout(() => {
// //
html.style.overflow = "hidden"; html.style.overflow = "hidden";
@ -1077,17 +1079,6 @@ const onBlur = function () {
}, 200); }, 200);
}; };
// window.addEventListener("resize", () => {
// // iOS
// const isIOS = /iPhone|iPad|iPod|ios/i.test(navigator.userAgent);
// console.log("iOS:", isIOS);
// if (!isIOS) {
// console.log("");
// const homePage = document.querySelector(".homepage");
// homePage.style.height = `${window.innerHeight}px`;
// }
// });
let touchmoveHandlerRef = null; let touchmoveHandlerRef = null;
const touchmoveHandler = (e) => { const touchmoveHandler = (e) => {
if (!dataStore.isFeedback) { if (!dataStore.isFeedback) {
@ -2676,7 +2667,7 @@ body {
display: flex; display: flex;
width: 100%; width: 100%;
margin-bottom: 30px; margin-bottom: 30px;
flex-wrap: wrap;
justify-content: center;
gap: 20px; gap: 20px;
} }
@ -2685,8 +2676,10 @@ body {
background-color: #f8f8f8; background-color: #f8f8f8;
border-radius: 5px; border-radius: 5px;
padding: 10px 20px; padding: 10px 20px;
/* width: 40%; */
width: 40%;
white-space: nowrap; white-space: nowrap;
align-items: center;
justify-content: center;
} }
.changeImg { .changeImg {
@ -2744,7 +2737,7 @@ body {
.changeLevelContent { .changeLevelContent {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 15px;
gap: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
@ -2814,6 +2807,7 @@ body {
padding: 10px; padding: 10px;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
margin: 0 auto;
} }
.changeBtn:hover { .changeBtn:hover {
@ -2972,7 +2966,7 @@ body {
max-width: 500px; max-width: 500px;
width: 70vw; width: 70vw;
max-height: 70vh; max-height: 70vh;
overflow-y: auto;
/* overflow-y: auto; */
box-sizing: border-box; box-sizing: border-box;
} }
@ -3039,7 +3033,7 @@ body {
.tokenRuleDialogContent { .tokenRuleDialogContent {
width: 80vw; width: 80vw;
padding: 15px 20px; padding: 15px 20px;
max-height: 80vh;
max-height: 85vh;
} }
.tokenRuleDialogTitle { .tokenRuleDialogTitle {
@ -3123,10 +3117,17 @@ body {
} }
.changeLevelItems { .changeLevelItems {
flex: 0 0 calc(33% - 20px);
flex: 0 0 calc(33% - 30px);
/* margin-right: auto; */ /* margin-right: auto; */
font-size: 0.7rem;
min-width: 0px;
} }
/* .changeLevelItems {
} */
.changeLevelTitle { .changeLevelTitle {
align-items: center; align-items: center;
display: flex; display: flex;
@ -3153,10 +3154,7 @@ body {
font-size: 0.5rem; font-size: 0.5rem;
} */ } */
.changeLevelItems {
font-size: 0.7rem;
min-width: 0px;
}
.changeLevelItemToken { .changeLevelItemToken {
white-space: nowrap; white-space: nowrap;
@ -3225,6 +3223,12 @@ body {
font-size: 1rem; font-size: 1rem;
} }
} }
@media (min-width: 320px) and (max-width: 375px) {
.tokenRuleDialog {
bottom: 10%;
}
}
</style> </style>
<style> <style>

Loading…
Cancel
Save