1.已经发布的小程序。(未发布不可获取)

2.通过该小程序获取access_token。(access_token获取规则参照:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/access-token/auth.getAccessToken.html

3.post请求接口 取得 openlink

 

 

POST /wxa/generatescheme?access_token=生成的access_token HTTP/1.1
Host: api.weixin.qq.com
Content-Type: application/json
Content-Length: 41

{"jump_wxa":{"path":"pages/index/index"}}

 

响应内容

{
    "errcode": 0,
    "errmsg": "ok",
    "openlink": "weixin://dl/business/?t=ABCDEFG"
}

具体参数参照:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-scheme/urlscheme.generate.html

4.编写页面跳转openlink的链接,需要注意的是必须有点击事件才能打开urlscheme.

 

 

相关文章:

  • 2021-12-09
  • 2021-12-19
  • 2022-12-23
  • 2022-02-07
  • 2021-10-09
  • 2022-12-23
  • 2021-08-08
  • 2022-02-07
猜你喜欢
  • 2021-12-05
  • 2021-12-22
  • 2021-12-22
  • 2021-12-24
  • 2021-12-12
  • 2021-05-21
  • 2021-08-20
相关资源
相似解决方案