目前市面上所有跳转采用的方式都是通过微信小程序做跳板
非个人的小程序是具备使用 URL Scheme 从外部直接唤醒微信的,在微信开放平台小程序管理中可直接生成 URL Scheme
跳转到小程序并携带参数,可实现显示对应的页面和具体的业务逻辑
H5使用URL Scheme
<html>
<a href="javascript:window.location.href='weixin://'">javascript:window.location.href='weixin://' </a>
<a href="weixin://">weixin:// </a>
<p><a href="weixin://dl/businessWebview/link/?appid=appid&url=baidu.com">test </a></p>
</html>
Flutter web使用URL Scheme
引入url_launcher
#url跳转
url_launcher: ^6.0.20
跳转代码
static void jumpWeb(String url)async {
if (await canLaunch(url)) {
await launch(url);
}
}
URL Scheme使用很简单,但需要能实现具体的功能,还是需要后台配合,通过接口获取参数,实现具体的业务逻辑