feat(wip): 收發消息

This commit is contained in:
CrescentLeaf
2025-09-21 02:18:15 +08:00
parent ee79e3eefa
commit 082817d6cd
2 changed files with 33 additions and 4 deletions

View File

@@ -37,7 +37,26 @@ export default function ChatFragment({ target, ...props }: Args) {
setChatInfo(re.data as Chat)
}, [target])
console.log(tabItemSelected)
let page = 0
async function loadMore() {
const re = await Client.invoke("Chat.getMessageHistory", {
token: data.access_token,
target,
page,
})
if (checkApiSuccessOrSncakbar(re, "拉取歷史記錄失敗")) return
page++
setMessagesList(messagesList.concat())
}
React.useEffect(() => {
return () => {
}
})
return (
<div style={{
width: '100%',