uniapp 打开 外部app某个页面
配置 manifest.json -> urlschemewhitelist 白名单
/* ios打包配置 */
"ios" : {
"UIBackgroundModes" : [ "audio" ],
"urlschemewhitelist" : [ "baidumap", "iosamap", "snssdk1128", "snssdk32" ]
},
1 launchApplication
let url = 'snssdk112 8://lynxview?surl=https://lf-dy-sourcecdn-tos.bytegecko.com/obj/byte-gurd-source/1325/gecko/resource/alliance_lynx_live_room_middle_page/app/template.js&fallback_url=https://alliance.jinritemai.com/lynx/pages/live-room-middle-page/app/template/index.html&hide_nav_bar=1&dynamic=2&live_room_schema=snssdk1128://webcast_room?room_id=7130368027991739166&enter_method=cps_open_deeplink&enter_from_merge=cps_open_deeplink&ecom_live_params=%7B%22cps_track%22%3A%22Cj0InqLk-8ICEOgIGihkeV8xMDcwOTg1ODU0Mjg4MTU5NzA1NjRfOTA3Nl8xMjE3MDQwNjIzIgUxXzFfMUgAEgwInpaAkpf-ifpiEAE%22%7D'
// #ifdef APP-PLUS
plus.runtime.launchApplication({ action: url }, function(res) {
console.log('打开了吗', res);
uni.showToast({
title: res.message,
icon: 'none'
})
});
// #endif
// #ifdef H5
window.open(d.deeplink);
// #endif
2 openURL
// #ifdef APP-PLUS
plus.runtime.openURL(url, function(res) {
console.log('打开了吗', res);
uni.showToast({
title: res.message,
icon: 'none'
})
});
// #endif
// #ifdef H5
window.open(d.deeplink);
// #endif
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构