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