Browse Source

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

dev
宋杰 1 month ago
parent
commit
fb56281410
  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. 6
      src/views/DeepNineModel.vue
  6. 32
      src/views/Selectmodel.vue
  7. 18
      src/views/deepNine.vue
  8. 13
      src/views/homePage.vue

1
src/store/chat.js

@ -18,6 +18,7 @@ export const useChatStore = defineStore("chat", {
emotionInput:false, emotionInput:false,
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>

6
src/views/DeepNineModel.vue

@ -316,4 +316,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: 80%;
}
}
</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);

13
src/views/homePage.vue

@ -2685,7 +2685,7 @@ 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;
} }
@ -2972,7 +2972,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 +3039,7 @@ body {
.tokenRuleDialogContent { .tokenRuleDialogContent {
width: 80vw; width: 80vw;
padding: 15px 20px; padding: 15px 20px;
max-height: 80vh;
max-height: 85vh;
} }
.tokenRuleDialogTitle { .tokenRuleDialogTitle {
@ -3225,6 +3225,13 @@ 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