Compare commits
2 Commits
749a178987
...
b5141dc2d1
| Author | SHA1 | Date | |
|---|---|---|---|
| b5141dc2d1 | |||
| 2f917eed82 |
@@ -36,11 +36,11 @@
|
||||
@scrolltolower="handleScrollToLower"
|
||||
>
|
||||
<!-- welcome栏 -->
|
||||
<ChatTopWelcome ref="welcomeRef" :mainPageDataModel="mainPageDataModel" />
|
||||
<!-- <ChatTopWelcome ref="welcomeRef" :mainPageDataModel="mainPageDataModel" />
|
||||
<NoticeMessage
|
||||
v-if="notitceConent"
|
||||
:noticeContent="notitceConent"
|
||||
></NoticeMessage>
|
||||
></NoticeMessage> -->
|
||||
|
||||
<view
|
||||
class="area-msg-list-content"
|
||||
@@ -873,6 +873,11 @@ const sendMessage = async (message, isInstruct = false) => {
|
||||
|
||||
await checkToken();
|
||||
|
||||
/// 切换到对话tab
|
||||
if (tabIndex.value !== 1) {
|
||||
tabIndex.value = 1;
|
||||
}
|
||||
|
||||
// 检查WebSocket连接状态,如果未连接,尝试重新连接
|
||||
if (!isWsConnected()) {
|
||||
console.log("WebSocket未连接,尝试重新连接...");
|
||||
|
||||
@@ -23,7 +23,6 @@ import { onMounted, ref } from "vue";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE, SWITCH_TO_COMPANION_TAB } from "@/constant/constant";
|
||||
import { navigateTo } from "@/router";
|
||||
import { getAccessToken } from "@/constant/token";
|
||||
import { checkToken } from "@/hooks/useGoLogin";
|
||||
|
||||
import FindTabs from "./components/FindTabs/index.vue";
|
||||
import CardSwiper from "./components/CardSwiper/index.vue";
|
||||
@@ -122,8 +121,6 @@ const handleQuickQuestionClick = (item) => {
|
||||
};
|
||||
|
||||
const handleClick = async (item) => {
|
||||
await checkToken();
|
||||
|
||||
console.log(`执行点击事件: ${item.jumpType},参数:${JSON.stringify(item.jumpContent)}`);
|
||||
/// 商品
|
||||
if (item.jumpType === JumpType.commodity) {
|
||||
@@ -133,7 +130,6 @@ const handleClick = async (item) => {
|
||||
}
|
||||
/// 提示词
|
||||
else if (item.jumpType === JumpType.prompt) {
|
||||
uni.$emit(SWITCH_TO_COMPANION_TAB); /// 切换到伴游tab
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item.jumpContent);
|
||||
}
|
||||
/// 链接
|
||||
@@ -145,7 +141,6 @@ const handleClick = async (item) => {
|
||||
}
|
||||
/// 组件指令
|
||||
else if (item.jumpType === JumpType.command) {
|
||||
uni.$emit(SWITCH_TO_COMPANION_TAB); /// 切换到伴游tab
|
||||
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, { type: item.jumpContent, title: item.jumpDesc });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user