问题修复

This commit is contained in:
2025-12-05 11:10:50 +08:00
parent 885ef57c93
commit a4473cf0e5
3 changed files with 307 additions and 85 deletions

View File

@@ -174,7 +174,7 @@
import {
onReady,
onReachBottom,
onLoad,
onLoad,onShow,
onPageScroll,
} from "@dcloudio/uni-app";
import {
@@ -243,7 +243,6 @@ chatStore.onReceiveMsg = (msg) => {
scrollView.intoView = "msg-0";
});
};
chatStore.connectSocket();
const msg = ref("");
const shopInfo = uni.getStorageSync("shopInfo");
@@ -477,6 +476,18 @@ onLoad((opt) => {
// #endif
});
onMounted(() => {
chatStore.connectSocket();
// 确保状态监听已初始化
if (!chatStore._listenersInitialized) {
chatStore.initStateListeners();
chatStore._listenersInitialized = true;
}
});
onShow(() => {
});
function toMore() {
go.to("PAGES_CHAT_GROUP_INFO", {
group_id: groupInfo.value.id,