feat(app跳转方法文件): 更新页面跳转方法

This commit is contained in:
hzj 2025-10-27 10:28:44 +08:00
parent 32e6982f85
commit 38e01b656e

View File

@ -60,7 +60,8 @@ export function closePage() {
*/
export function gotoPrivateChat(userId) {
try {
window.FlutterPageControl.postMessage(`private_chat:${userId}`)
// 使用注入的方法
window.app.gotoPrivateChat(userId)
} catch (error) {
console.error('前往私聊失败:', error)
}
@ -71,7 +72,8 @@ export function gotoPrivateChat(userId) {
*/
export function viewUserInfo(userId) {
try {
window.FlutterPageControl.postMessage(`view_user_info:${userId}`)
// 使用注入的方法
window.app.viewUserInfo(userId)
} catch (error) {
console.error('查看个人页面失败:', error)
}
@ -82,7 +84,8 @@ export function viewUserInfo(userId) {
*/
export function gotoRoom(roomId) {
try {
window.FlutterPageControl.postMessage(`go_to_room:${roomId}`)
// 使用注入的方法
window.app.gotoRoom(roomId)
} catch (error) {
console.error('前往房间失败:', error)
}