From f608faac363368b5964719038a9d49e944260cc3 Mon Sep 17 00:00:00 2001 From: HelloZeroNick <2835103520@qq.com> Date: Tue, 21 Jul 2026 13:31:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(ohos):=20=E6=B3=A8=E5=86=8C=20bilibili=20U?= =?UTF-8?q?RI=20Scheme=20=E6=94=AF=E6=8C=81=E4=BB=8E=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E5=94=A4=E8=B5=B7=20PiliPlus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 ohos/entry/src/main/module.json5 中为 EntryAbility 添加两个新 skill: 1. bilibili:// 自定义 scheme — 处理 bilibili://video/BVxxx 等链接 2. HTTP/HTTPS 域名 — 处理 https://www.bilibili.com、b23.tv 等 URL Flutter 侧 PiliScheme.routePush() 已通过 app_links_ohos 插件 自动接收 want.uri 并分发到对应页面(视频、直播、番剧、空间等)。 无需修改 Flutter 代码。 --- ohos/entry/src/main/module.json5 | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/ohos/entry/src/main/module.json5 b/ohos/entry/src/main/module.json5 index 667b28f6a5..db6d846340 100644 --- a/ohos/entry/src/main/module.json5 +++ b/ohos/entry/src/main/module.json5 @@ -27,6 +27,45 @@ entities: ["entity.system.home"], actions: ["action.system.home"], }, + { + actions: ["ohos.want.action.viewData"], + entities: ["entity.system.default"], + uris: [ + { + scheme: "bilibili", + }, + ], + }, + { + actions: ["ohos.want.action.viewData"], + entities: ["entity.system.default"], + uris: [ + { + scheme: "https", + host: "bilibili.com", + }, + { + scheme: "https", + host: "www.bilibili.com", + }, + { + scheme: "https", + host: "b23.tv", + }, + { + scheme: "http", + host: "bilibili.com", + }, + { + scheme: "http", + host: "www.bilibili.com", + }, + { + scheme: "http", + host: "b23.tv", + }, + ], + }, ], }, ],