test: 测试app页面跳转方法

This commit is contained in:
hzj 2025-10-27 10:53:54 +08:00
parent 14eeb193fe
commit bc2b2c1229

View File

@ -61,6 +61,8 @@ export function closePage() {
export function gotoPrivateChat(userId) {
try {
if (window.app && window.app.gotoPrivateChat) {
console.log('使用gotoPrivateChat')
console.log(`user:${userId}`)
// 使用注入的方法
window.app.gotoPrivateChat(userId)
} else if (window.FlutterPageControl) {
@ -78,6 +80,9 @@ export function gotoPrivateChat(userId) {
export function viewUserInfo(userId) {
try {
if (window.app && window.app.viewUserInfo) {
console.log('使用viewUserInfo')
console.log(`user:${userId}`)
// 使用注入的方法
window.app.viewUserInfo(userId)
} else if (window.FlutterPageControl) {
@ -95,6 +100,9 @@ export function viewUserInfo(userId) {
export function gotoRoom(roomId) {
try {
if (window.app && window.app.gotoRoom) {
console.log('使用gotoRoom')
console.log(`room:${roomId}`)
// 使用注入的方法
window.app.gotoRoom(roomId)
} else if (window.FlutterPageControl) {