// 引入
<wx-open-launch-app
ref={refBtn}
id="launch-btn"
appid="wx44c3c35a987b82ff"
>
<script type="text/wxtag-template">
<style>{btnStyle}</style>
<button className="shareButton">打开App,和客户聊聊吧222</button>
</script>
</wx-open-launch-app>
// 监听
refBtn.current?.addEventListener('ready', e => {
console.log('btn-ready', e);
console.log(e?.detail);
});
refBtn.current?.addEventListener('error', e => {
console.log('fail', e);
console.log(e?.detail);
});
另外通过将链接转成二维码后扫码可以打开app,这是啥逻辑