Browse Source

情绪大模型使用全权限;止盈线和止损线加入了白色描边;修复夺宝奇兵大模型报错只显示提示的问题,标题字体统一;情绪大模型取消自动滚动;去除解码器第三个网格的显示标签;

dev
宋杰 3 days ago
parent
commit
6aafdc50b7
  1. 7
      src/views/AIchat.vue
  2. 117
      src/views/AiEmotion.vue
  3. 40
      src/views/components/emoEnergyConverter.vue
  4. 14
      src/views/components/emotionDecod.vue

7
src/views/AIchat.vue

@ -791,8 +791,9 @@ watch(
marketList: userStore.aiGoldMarketList,
});
const HomePage = result20.data.HomePage;
const AIGoldBull = result20.data.AIGoldBull;
// 访null
const HomePage = result20.data?.HomePage || null;
const AIGoldBull = result20.data?.AIGoldBull || null;
const isLiuSe = HomePage ? true : false;
const isAIGoldBull =
@ -1787,7 +1788,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:#FADC0C;display:flex;justify-content:center;font-size:22px">【能量维度】</p><p style="display:flex;justify-content:center;">`;
const ac47 = `<p style="margin:0;color:#FADC0C;font-weight:bold;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(

117
src/views/AiEmotion.vue

@ -172,7 +172,8 @@
<!-- 返回顶部按钮 -->
<div class="back-to-top" @click="scrollToTop" v-show="isPageLoaded">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 4L12 20M12 4L6 10M12 4L18 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 4L12 20M12 4L6 10M12 4L18 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" />
</svg>
</div>
</div>
@ -797,18 +798,6 @@ function startTypewriterEffect(conclusion, onComplete) {
for (let i = 0; i <= disclaimerText.length; i++) {
const timer = setTimeout(() => {
displayedTexts.value.disclaimer = disclaimerText.substring(0, i);
//
if (i === disclaimerText.length) {
setTimeout(() => {
scrollToBottom();
//
if (onComplete && typeof onComplete === 'function') {
onComplete();
//
currentOnCompleteCallback.value = null;
}
}, 100);
}
}, totalDelay + i * typeSpeed);
typewriterTimers.value.push(timer);
}
@ -858,9 +847,9 @@ function playAudio(url) {
emotionAudioStore.isPlaying = true;
console.log('开始播放场景应用语音');
//
setTimeout(() => {
scrollToBottom();
}, 100);
// setTimeout(() => {
// scrollToBottom();
// }, 100);
},
onend: () => {
isAudioPlaying.value = false;
@ -964,27 +953,27 @@ async function handleSendMessage(input, onComplete) {
}
// 使
const hasPermission = userStore.brainPerssion || userStore.swordPerssion ||
userStore.pricePerssion || userStore.timePerssion ||
userStore.aibullPerssion || userStore.aiGnbullPerssion ||
userStore.airadarPerssion;
if (!hasPermission) {
const userMessage = reactive({ sender: 'user', text: input });
messages.value.push(userMessage);
const aiMessage = reactive({ sender: 'ai', text: '您当前没有可用权限,请联系客服或购买服务包。' });
messages.value.push(aiMessage);
//
isRotating.value = false;
messages.value = [...previousMessages, ...messages.value];
//
if (onComplete && typeof onComplete === 'function') {
onComplete();
//
currentOnCompleteCallback.value = null;
}
return;
}
// const hasPermission = userStore.brainPerssion || userStore.swordPerssion ||
// userStore.pricePerssion || userStore.timePerssion ||
// userStore.aibullPerssion || userStore.aiGnbullPerssion ||
// userStore.airadarPerssion;
// if (!hasPermission) {
// const userMessage = reactive({ sender: 'user', text: input });
// messages.value.push(userMessage);
// const aiMessage = reactive({ sender: 'ai', text: '' });
// messages.value.push(aiMessage);
// //
// isRotating.value = false;
// messages.value = [...previousMessages, ...messages.value];
// //
// if (onComplete && typeof onComplete === 'function') {
// onComplete();
// //
// currentOnCompleteCallback.value = null;
// }
// return;
// }
const userMessage = reactive({ sender: 'user', text: input });
messages.value.push(userMessage);
@ -996,14 +985,22 @@ async function handleSendMessage(input, onComplete) {
userData: {
token: localStorage.getItem('localToken'),
language: "cn",
brainPrivilegeState: userStore.brainPerssion,
swordPrivilegeState: userStore.swordPerssion,
stockForecastPrivilegeState: userStore.pricePerssion,
spaceForecastPrivilegeState: userStore.timePerssion,
aibullPrivilegeState: userStore.aibullPerssion,
aigoldBullPrivilegeState: userStore.aiGnbullPerssion,
airadarPrivilegeState: userStore.airadarPerssion,
marketList: userStore.aiGoldMarketList,
// brainPrivilegeState: userStore.brainPerssion,
// swordPrivilegeState: userStore.swordPerssion,
// stockForecastPrivilegeState: userStore.pricePerssion,
// spaceForecastPrivilegeState: userStore.timePerssion,
// aibullPrivilegeState: userStore.aibullPerssion,
// aigoldBullPrivilegeState: userStore.aiGnbullPerssion,
// airadarPrivilegeState: userStore.airadarPerssion,
// marketList: userStore.aiGoldMarketList,
brainPrivilegeState: '1',
swordPrivilegeState: '1',
stockForecastPrivilegeState: '1',
spaceForecastPrivilegeState: '1',
aibullPrivilegeState: '1',
aigoldBullPrivilegeState: '1',
airadarPrivilegeState: '1',
marketList: "hk,cn,usa,my,sg,vi,in,gb",
},
};
@ -1521,21 +1518,21 @@ function renderCharts(data) {
});
}
const scrollToBottom = async () => {
//
if (isUserScrolling.value) {
console.log('用户正在手动滚动,跳过自动滚动');
return;
}
const container = userInputDisplayRef.value;
if (!container) return;
await nextTick();
console.log(container.scrollHeight, "container.scrollHeight");
console.log(container.scrollTop, "container.scrollTop");
console.log(container.offsetHeight, "container.offsetHeight");
container.scrollTop = container.scrollHeight - container.offsetHeight;
};
// const scrollToBottom = async () => {
// //
// if (isUserScrolling.value) {
// console.log('');
// return;
// }
// const container = userInputDisplayRef.value;
// if (!container) return;
// await nextTick();
// console.log(container.scrollHeight, "container.scrollHeight");
// console.log(container.scrollTop, "container.scrollTop");
// console.log(container.offsetHeight, "container.offsetHeight");
// container.scrollTop = container.scrollHeight - container.offsetHeight;
// };
//
const handleUserScroll = () => {

40
src/views/components/emoEnergyConverter.vue

@ -524,17 +524,34 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
z: 2
},
{
name: '止盈线描边',
type: 'line',
data: takeProfitData,
symbol: 'none',
lineStyle: {
normal: {
color: '#ffffff', //
width: 6,
type: 'solid'
}
},
z: 1,
silent: true,
showInLegend: false
},
{
name: '止盈线',
type: 'line',
data: takeProfitData,
symbol: 'none',
lineStyle: {
normal: {
color: '#FF0000', //
color: '#FF0000', //
width: 2,
type: 'solid'
}
},
z: 2,
markPoint: {
symbol: 'circle',
symbolSize: 1,
@ -564,6 +581,22 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
}
},
{
name: '止损线描边',
type: 'line',
data: stopLossData,
symbol: 'none',
lineStyle: {
normal: {
color: '#ffffff', //
width: 6,
type: 'solid'
}
},
z: 1,
silent: true,
showInLegend: false
},
{
name: '止损线',
type: 'line',
data: stopLossData,
@ -575,6 +608,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
type: 'solid'
}
},
z: 2,
markPoint: {
symbol: 'circle',
symbolSize: 1,
@ -636,7 +670,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
textBorderWidth: 2,
}
},
offset: [0, -30]
offset: [-25, -40]
}
}
}
@ -676,7 +710,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
textBorderWidth: 2,
}
},
offset: [0, 30]
offset: [-25, 40]
}
}
}

14
src/views/components/emotionDecod.vue

@ -154,6 +154,13 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
gridIndex: 2,
data: dealData.categoryData,
axisLine: { lineStyle: { color: "white" } },
axisPointer: {
show: false,
label: {
show: false,
},
type: "line",
},
},
],
yAxis: [
@ -224,6 +231,13 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
},
axisTick: { show: false }, // 线
axisLabel: { show: false }, //
axisPointer: {
show: false,
label: {
show: false,
},
type: "line",
},
},
],
//

Loading…
Cancel
Save