收藏
回答

<wx-open-launch-weapp>点击无反应?

微信公众号的测试号内的网页进行调用小程序,点击什么反应都没有。公众号关联了小程序,js安全域名也配置了,小程序没有正式发布,wx.config是正常,不知道怎么回事


代码片段

   
 <wx-open-launch-weapp id="launch-btn" @launch="handleLaunchFn" @error="handleErrorFn"
            username="gh_xxxxxxx" path="/pages/xxx/index.html">
                <template>
                    <button>打开小程序</button>
                </template>
            </wx-open-launch-weapp>




handleLaunchFn (e) {
            alert(e)
        },
        handleErrorFn(e){
            alert('fail', e.detail);
        },
        initWx () {
            wxConfig({url: location.href.split('#')[0]}).success(data => {
                wx.config({
                    debugfalse,
                    appId: data.appId,
                    timestamp: data.timestamp,
                    nonceStr: data.nonceStr,
                    signature: data.signature,
                    jsApiList: [
                        'checkJsApi',
                        'onMenuShareAppMessage',
                        'onMenuShareQQ'
                    ],
                    openTagList: ['wx-open-launch-weapp']
                });
                wx.ready(() => {
                    let btn = document.getElementById('launch-btn');
                    btn.addEventListener('launch'function (e{
                    });
                    btn.addEventListener('error'function (e{
                        console.log('fail', e.detail);
                    });
                });
                wx.error(function (res{
                    console.log(res)
                });
            });
        }
最后一次编辑于  2020-10-23
回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员-Jahozheng
    社区技术运营专员-Jahozheng
    2020-10-23

    你好,请参考用例https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html

    2020-10-23
    有用
    回复 4
    • KK
      KK
      2020-10-26
      未发布正式版的小程序是不是不能用wx-open-launch-weapp跳转?
      2020-10-26
      回复
    • 社区技术运营专员-Jahozheng
      社区技术运营专员-Jahozheng
      2020-10-26回复KK
      你好,用例里面有详细说明
      2020-10-26
      回复
    • 阳
      2021-06-11
      我碰到,ios系统15.0, 微信版本:8.0.6 wx-open-launch-weapp 标签点击没有反。但是 ios系统13.3,微信版本:8.0.6标签点击可以唤起小程序。请问这是什么原因?
      2021-06-11
      回复
    • 古月
      古月
      2021-09-23
      我现在这边也是无法点击,切换成正式环境是可以打开小程序的,测试环境不行,打开的都是已发布的小程序,安全域名也是设置了
      2021-09-23
      回复
  • running
    running
    2021-01-22

    请求有加openTagList,但是没有返回,点击无反应。另一个项目同样的代码,有返回,也可以点击。请问这是什么原因???

    2021-01-22
    有用
    回复 1
    • 谢雨
      谢雨
      2021-01-26
      看一下引入的jweixin的版本,需要1.6.0以上才会加载openTagList
      2021-01-26
      回复
登录 后发表内容
问题标签