|
|
@ -3,6 +3,7 @@ |
|
|
|
import { ref, computed, onMounted, watch, nextTick } from "vue"; |
|
|
|
import { setHeight } from "../utils/setHeight"; |
|
|
|
import { getUserCountAPI } from "../api/AIxiaocaishen"; |
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
import AIchat from "./AIchat.vue"; |
|
|
|
import AIfind from "./AIfind.vue"; |
|
|
|
import { useAppBridge } from '../assets/js/useAppBridge.js' |
|
|
@ -117,6 +118,10 @@ const updateMessage = (title) => { |
|
|
|
// console.log("updateMessage 的值:", title); |
|
|
|
}; |
|
|
|
const sendMessage = async () => { |
|
|
|
if (localStorage.getItem('localToken') == null||localStorage.getItem('localToken') == '') { |
|
|
|
ElMessage.error('请先登录'); |
|
|
|
return ; |
|
|
|
} |
|
|
|
isScrolling.value = false; |
|
|
|
// 调用 ensureAIchat 确保跳转到 AIchat 页面 |
|
|
|
ensureAIchat(); |
|
|
@ -343,8 +348,7 @@ onMounted(async () => { |
|
|
|
<img :src="getCountAll" class="action-btn" /> |
|
|
|
<div class="count-number">{{ UserCount }}次</div> |
|
|
|
</div> |
|
|
|
<img :src="announcementBtn" class="announcement-btn action-btn" |
|
|
|
@click="showAnnouncement" /> |
|
|
|
<img :src="announcementBtn" class="announcement-btn action-btn" @click="showAnnouncement" /> |
|
|
|
</div> |
|
|
|
</el-header> |
|
|
|
<!-- 主体部分:小人 问题轮询图 对话内容 --> |
|
|
@ -369,17 +373,13 @@ onMounted(async () => { |
|
|
|
<!-- 第一行按钮 --> |
|
|
|
<div class="footer-first-line"> |
|
|
|
<div class="left-group"> |
|
|
|
<img v-if="isThinking" :src="thinkActive" @click="toggleThink" |
|
|
|
class="action-btn" /> |
|
|
|
<img v-else :src="thinkNoActive" @click="toggleThink" |
|
|
|
class="action-btn" /> |
|
|
|
<img v-if="isThinking" :src="thinkActive" @click="toggleThink" class="action-btn" /> |
|
|
|
<img v-else :src="thinkNoActive" @click="toggleThink" class="action-btn" /> |
|
|
|
<img :src="languageBtn" @click="changeLanguage" class="action-btn" /> |
|
|
|
<img v-if="isVoice" :src="voice" @click="toggleVoice" class="action-btn" /> |
|
|
|
<img v-else :src="voiceNoActive" @click="toggleVoice" |
|
|
|
class="action-btn" /> |
|
|
|
<img v-else :src="voiceNoActive" @click="toggleVoice" class="action-btn" /> |
|
|
|
</div> |
|
|
|
<img v-if="!chatStore.isLoading" :src="sendBtn" @click="sendMessage" |
|
|
|
class="action-btn send-btn" /> |
|
|
|
<img v-if="!chatStore.isLoading" :src="sendBtn" @click="sendMessage" class="action-btn send-btn" /> |
|
|
|
<div v-else> |
|
|
|
<el-icon class="is-loading"> |
|
|
|
<Loading /> |
|
|
|