Blogger Information
Blog 44
fans 0
comment 0
visits 58710
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
酱茄教你怎么用H5链接打开微信小程序
酱茄
Original
3654 people have browsed it

怎么从浏览器,QQ等场景,用H5链接打开微信小程序?其实简单操作即可实现,看看小编如何实现的,适用于非个人主体。

1、微信小程序后台→工具→微信生成小程序URL Scheme,按需填写,启动query参数可为空;

2、生成后会获得一个类似下面链接

weixin://dl/business/?t=xxxxxxx

3、本地新建一个如index.html文件,把以下代码放到文件中,并把代码中的图片和weixin链接改成自己的即可

实例

<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>打开小程序</title>
  </head>
  <body>
    <p style="text-align: center">
      <img
        src="https://www.jiangqie.com/wp-content/uploads/2020/08/pro-300x300.jpg"
        align="middle"
      />
    </p>
    <p style="text-align: center">微信扫一扫或长按识别</p>
  </body>
  <script>
    location.href = "weixin://dl/business/?t=6dS3q9wOqds";
  </script>

运行实例 »

点击 "运行实例" 按钮查看在线实例

4、把index.html文件上传到网站指定目录中(如xcx),访问链接www.x.com/xcx即可。

注:可手机端QQ,浏览器或微信打开体验:https://www.jiangqie.com/xcx/


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post