共兩種方案:
1.使用微信云開(kāi)發(fā) 托管靜態(tài)網(wǎng)頁(yè):
微信相關(guān)的瀏覽器可以獲得免鑒權(quán)能力跳轉(zhuǎn)任意小程序,普通瀏覽器只能跳轉(zhuǎn)自己的小程序。
附上微信參考文檔:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/staticstorage/jump-miniprogram.html
2.獲取跳轉(zhuǎn)小程序的Scheme進(jìn)行跳轉(zhuǎn)。分為兩步:
第一步:通過(guò)小程序appId 和secret 獲取token(微信接口):
獲取token例子:
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=&secret=
第二步:調(diào)用獲取跳轉(zhuǎn)小程序scheme的接口(微信接口)
https://api.weixin.qq.com/wxa/generatescheme?access_token=ACCESS_TOKEN