onShow: function (option) {
console.log('onShow:', JSON.stringify(option))
// #ifdef APP-PLUS
// ? 在 onShow 时重新检查 plus.runtime.arguments
const argsInOnShow = plus.runtime.arguments
const launcherInOnShow = plus.runtime.launcher
console.log('? [onShow] plus.runtime.arguments:', argsInOnShow)
console.log('? [onShow] plus.runtime.launcher:', launcherInOnShow)
// ? 检查 onShow 参数中是否有 Universal Link 信息
console.log('? [onShow] option.path:', option.path)
console.log('? [onShow] option.query:', JSON.stringify(option.query))
console.log('? [onShow] option.referrerInfo:', JSON.stringify(option.referrerInfo))
// iOS Universal Link 可能通过 option 传递路径
if (option.path && option.path !== 'pages/guide/index' && option.path !== 'pages/index/index') {
console.log('✅ [onShow] 检测到非首页路径:', option.path)
const query = option.query || {}
// 防止重复跳转
if (!this._onShowNavigated) {
this._onShowNavigated = true
setTimeout(() => {
this.navigateToPage('/' + option.path, query)
// 重置标记,允许下次跳转
setTimeout(() => {
this._onShowNavigated = false
}, 2000)
}, 800)
}
}
// #endif
}
PuGaaa (作者)
LSApplicationQueriesSchemes,具体添加到manifest.json哪个字断下
《iOS scheme白名单配置》似乎通篇在介绍 urlschemewhitelist , 但是这个方法似乎是我的APP跳转到其他APP ,但实际上 我的过程是 H5 跳转到自己的APP 为什么还需要设置白名单
我是使用的 云打包, 手动修改自定义基座源码的info.plist 似乎做不到
2025-12-08 19:08