wx-open-launch-app 标签里面的内容不显示,怎么办?
发布于 6 年前 作者 xuechao 3358 次浏览 来自 问答

 <div style=“width:100%;height:100px;position:fixed”>

        <wx-open-launch-app id=“launch-btn” appid=“wx1e01dbf98bb007f3” extinfo=“id=1&userid=1&type=goods”>

       <template >

      <style>

        .btn {

          width: 200px;

          height: 45px;

          line-height: 45px;

          text-align: center;

          font-size: 17px;

          border-radius: 22.5px;

          color: #fff;

        }

      </style>

      <div class=“btn”>启动APP</div>

    </template>

        </wx-open-launch-app>

        </div>

<script>

    var btn = document.getElementById(‘launch-btn’);

    btn.addEventListener(‘launch’, function (e) {

        console.log(‘success’);

    });

    btn.addEventListener(‘error’, function (e) {

        console.log(‘fail’, e.detail);

    });

</script>

回到顶部