feat(app跳转方法文件): 更新页面跳转方法
This commit is contained in:
parent
32e6982f85
commit
38e01b656e
@ -60,7 +60,8 @@ export function closePage() {
|
|||||||
*/
|
*/
|
||||||
export function gotoPrivateChat(userId) {
|
export function gotoPrivateChat(userId) {
|
||||||
try {
|
try {
|
||||||
window.FlutterPageControl.postMessage(`private_chat:${userId}`)
|
// 使用注入的方法
|
||||||
|
window.app.gotoPrivateChat(userId)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('前往私聊失败:', error)
|
console.error('前往私聊失败:', error)
|
||||||
}
|
}
|
||||||
@ -71,7 +72,8 @@ export function gotoPrivateChat(userId) {
|
|||||||
*/
|
*/
|
||||||
export function viewUserInfo(userId) {
|
export function viewUserInfo(userId) {
|
||||||
try {
|
try {
|
||||||
window.FlutterPageControl.postMessage(`view_user_info:${userId}`)
|
// 使用注入的方法
|
||||||
|
window.app.viewUserInfo(userId)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('查看个人页面失败:', error)
|
console.error('查看个人页面失败:', error)
|
||||||
}
|
}
|
||||||
@ -82,7 +84,8 @@ export function viewUserInfo(userId) {
|
|||||||
*/
|
*/
|
||||||
export function gotoRoom(roomId) {
|
export function gotoRoom(roomId) {
|
||||||
try {
|
try {
|
||||||
window.FlutterPageControl.postMessage(`go_to_room:${roomId}`)
|
// 使用注入的方法
|
||||||
|
window.app.gotoRoom(roomId)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('前往房间失败:', error)
|
console.error('前往房间失败:', error)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user