问题解决了吗 我这边安卓正常跳转 ios报 launch:fail 安装了要跳转的app universal link再浏览器也可以正常唤醒 ,找不到问题啊。。。。。。。
wx-open-launch-app唤醒launch:fail?wx-open-launch-app唤醒launch:fail 检查了各种参数都是正常的。 现在在开发者工具上成功的,在ios真机上面没有弹框,点击直接提示launch:fail 代码如下 const WechatOpenApp = (props: any) => { const launchBtn = useRef<HTMLButtonElement>(null!); useEffect(() => { if (!IS_WECHAT) { return; } const ready = () => { console.log('wx ready'); }; const launch = (e: any) => { console.log('wx launch', e); }; const error = (e: any) => { console.log('wx error', e); Toast.show({ content: '微信唤醒服务失败,错误信息:' + e.detail.errMsg, }); }; const ref_ = launchBtn.current; ref_.addEventListener('ready', ready); ref_.addEventListener('launch', launch); ref_.addEventListener('error', error); return () => { ref_.removeEventListener('ready', ready); ref_.removeEventListener('launch', launch); ref_.removeEventListener('error', error); }; }, []); const style = { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }; return IS_WECHAT ? ( <wx-open-launch-app ref={launchBtn} id="launch-btn" appid={WECHAT_OPEN_APP_ID} extinfo={encodeURIComponent(window.location.href)} style={style} > <script type="text/wxtag-template"> <button ></button> </script> </wx-open-launch-app> ) : null; };
2022-07-25