部分代码:
let url = 'snssdk1128://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.openURL(url, function(res) {
console.log('打开了吗', res);
uni.showToast({
title: res.message,
icon: 'none'
})
});
// #endif
//manifest.json配置
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
]
},
/* ios打包配置 */
"ios" : {
"UIBackgroundModes" : [ "audio" ],
"urlschemewhitelist" : [ "baidumap", "iosamap", "snssdk1128", "snssdk32" ]
},
/* SDK配置 */
"sdkConfigs" : {
"speech" : {
"ifly" : {}
},
"ad" : {},
"maps" : {
"amap" : {
"appkey_ios" : "ad02ce0ef0f1d0f7ccd5a65e31c2d495",
"appkey_android" : "ad02ce0ef0f1d0f7ccd5a65e31c2d495"
}
},
"geolocation" : {
"system" : {
"__platform__" : [ "ios", "android" ]
}
},
"share" : {}
},
"orientation" : [ "portrait-primary" ]
}
业精于勤荒于嬉 (作者)
openURL不行吗?你说的那个我这里不适用0.0, 而且我打开高德导航到某个地方都可以。就跳抖音直播间不行
2022-08-24 10:12
业精于勤荒于嬉 (作者)
还是用的你说的 launchApplication 这个,openUrl一直报 此功能不支持。
2022-08-24 10:34
DCloud_iOS_WZT
回复 2***@qq.com: 跳转不能光配白名单,还要配urlSchemes
2022-08-25 12:15