|
@ -32,7 +32,7 @@ import msgBtn from "../assets/img/homePage/tail/msg.png"; |
|
|
import feedbackBtn from "../assets/img/Feedback/feedbackBtn.png"; |
|
|
import feedbackBtn from "../assets/img/Feedback/feedbackBtn.png"; |
|
|
import AiEmotion from "./AiEmotion.vue"; |
|
|
import AiEmotion from "./AiEmotion.vue"; |
|
|
|
|
|
|
|
|
import VConsole from 'vconsole'; |
|
|
|
|
|
|
|
|
import VConsole from "vconsole"; |
|
|
|
|
|
|
|
|
const vConsole = new VConsole(); |
|
|
const vConsole = new VConsole(); |
|
|
|
|
|
|
|
@ -48,7 +48,7 @@ const emotionAudioStore = useEmotionAudioStore(); |
|
|
const audioStore = useAudioStore(); |
|
|
const audioStore = useAudioStore(); |
|
|
// 根据当前页面类型获取对应的音频store |
|
|
// 根据当前页面类型获取对应的音频store |
|
|
const getCurrentAudioStore = () => { |
|
|
const getCurrentAudioStore = () => { |
|
|
return activeTab.value === 'AiEmotion' ? emotionAudioStore : audioStore; |
|
|
|
|
|
|
|
|
return activeTab.value === "AiEmotion" ? emotionAudioStore : audioStore; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const isVoice = computed(() => { |
|
|
const isVoice = computed(() => { |
|
@ -616,20 +616,56 @@ onMounted(async () => { |
|
|
alt="夺宝奇兵大模型" |
|
|
alt="夺宝奇兵大模型" |
|
|
/> |
|
|
/> |
|
|
<!-- AI情绪大模型按钮 --> |
|
|
<!-- AI情绪大模型按钮 --> |
|
|
<img :src="activeTab === 'AiEmotion' ? emotionButton01 : emotionButton02 |
|
|
|
|
|
" @click="setActiveTab('AiEmotion', 1)" class="action-btn model-btn" alt="AI情绪大模型" /> |
|
|
|
|
|
<img v-if="getCurrentAudioStore().isVoiceEnabled && !getCurrentAudioStore().isPlaying" :src="voice" @click="toggleVoice" class="action-btn" /> |
|
|
|
|
|
<img v-else-if="getCurrentAudioStore().isVoiceEnabled && getCurrentAudioStore().isPlaying" :src="voice" @click="toggleVoice" class="action-btn" style="opacity: 0.7; animation: pulse 1.5s infinite;" /> |
|
|
|
|
|
<img v-else :src="voiceNoActive" @click="toggleVoice" class="action-btn" /> |
|
|
|
|
|
|
|
|
<img |
|
|
|
|
|
:src=" |
|
|
|
|
|
activeTab === 'AiEmotion' ? emotionButton01 : emotionButton02 |
|
|
|
|
|
" |
|
|
|
|
|
@click="setActiveTab('AiEmotion', 1)" |
|
|
|
|
|
class="action-btn model-btn" |
|
|
|
|
|
alt="AI情绪大模型" |
|
|
|
|
|
/> |
|
|
|
|
|
<img |
|
|
|
|
|
v-if=" |
|
|
|
|
|
getCurrentAudioStore().isVoiceEnabled && |
|
|
|
|
|
!getCurrentAudioStore().isPlaying |
|
|
|
|
|
" |
|
|
|
|
|
:src="voice" |
|
|
|
|
|
@click="toggleVoice" |
|
|
|
|
|
class="action-btn" |
|
|
|
|
|
/> |
|
|
|
|
|
<img |
|
|
|
|
|
v-else-if=" |
|
|
|
|
|
getCurrentAudioStore().isVoiceEnabled && |
|
|
|
|
|
getCurrentAudioStore().isPlaying |
|
|
|
|
|
" |
|
|
|
|
|
:src="voice" |
|
|
|
|
|
@click="toggleVoice" |
|
|
|
|
|
class="action-btn" |
|
|
|
|
|
style="opacity: 0.7; animation: pulse 1.5s infinite" |
|
|
|
|
|
/> |
|
|
|
|
|
<img |
|
|
|
|
|
v-else |
|
|
|
|
|
:src="voiceNoActive" |
|
|
|
|
|
@click="toggleVoice" |
|
|
|
|
|
class="action-btn" |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 第二行输入框 --> |
|
|
<!-- 第二行输入框 --> |
|
|
<div class="footer-second-line"> |
|
|
<div class="footer-second-line"> |
|
|
<img :src="msgBtn" class="msg-icon" /> |
|
|
<img :src="msgBtn" class="msg-icon" /> |
|
|
<el-input type="textarea" v-model="message" @focus="onFocus" @blur="onBlur" |
|
|
|
|
|
:autosize="{ minRows: 1, maxRows: 4 }" placeholder="请输入股票名称或股票代码..." class="msg-input" |
|
|
|
|
|
@keydown.enter.exact.prevent="isLoading ? null : sendMessage()" resize="none"> |
|
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
type="textarea" |
|
|
|
|
|
v-model="message" |
|
|
|
|
|
@focus="onFocus" |
|
|
|
|
|
@blur="onBlur" |
|
|
|
|
|
:autosize="{ minRows: 1, maxRows: 4 }" |
|
|
|
|
|
placeholder="请输入股票名称或股票代码..." |
|
|
|
|
|
class="msg-input" |
|
|
|
|
|
@keydown.enter.exact.prevent="isLoading ? null : sendMessage()" |
|
|
|
|
|
resize="none" |
|
|
|
|
|
> |
|
|
</el-input> |
|
|
</el-input> |
|
|
<img |
|
|
<img |
|
|
v-if="!chatStore.isLoading" |
|
|
v-if="!chatStore.isLoading" |
|
@ -1055,6 +1091,12 @@ body { |
|
|
max-height: 100px !important; |
|
|
max-height: 100px !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.msg-input:deep(.el-textarea__inner::placeholder) { |
|
|
|
|
|
white-space: nowrap !important; |
|
|
|
|
|
overflow: hidden !important; |
|
|
|
|
|
text-overflow: ellipsis !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.msg-input { |
|
|
.msg-input { |
|
|
min-height: 34px; |
|
|
min-height: 34px; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|