收藏
回答

wx-open-launch-app 标签里面的内容不显示,怎么处理?

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>启动APP</title>
        <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">
    </head>
    <body>
        <div id='wola' class="mobile-page-download">
            <wx-open-launch-app id="launch-btn" appid="wxea5b413296e9ae45">
                <template>
                    <style>.btn { padding: 12px }</style>
                    <button class="btn">App内查看</button>
                </template>
            </wx-open-launch-app>
        </div>
    </body>
    <script src="/js/jquery.min.js"></script>
    <script src="/js/xiaozhu.js"></script>
    <script  src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <script>
        $(function(){
            $.get(`${shareUrl}wechat/jsconf?type=weixin`, function(result){
                wx.config({
                    debug: true, 
                    appId: result.content.appId, 
                    timestamp: result.content.timestamp, 
                    nonceStr: result.content.nonceStr, 
                    signature:result.content.signature,
                    jsApiList:result.content.jsApiList,
                    openTagList: ['wx-open-launch-app'] 
                });
            });
            wx.ready(function () {
                alert('ready');
            });
            wx.error(function (res) {
                alert(`error:${JSON.stringify(res)}`);
            });
            var btn = document.getElementById('launch-btn');
            btn.addEventListener('launch', function (e) {
                console.log('success');
            });
            btn.addEventListener('error', function (e) {
                alert(`fail:${JSON.stringify(e.detail)}`);
            });
        }); 
      </script>
</html>

为了查问题,采用了最原始的开发方式写了个demo  wx-open-launch-app 标签里面的内容为啥不显示?
接入方式完全按照https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html
希望官方解答,谢谢!
最后一次编辑于  2020-05-28
回答关注问题邀请回答
收藏

6 个回答

  • 🦌🐎🐕🐈🦮🐒
    🦌🐎🐕🐈🦮🐒
    2021-06-01

    显示出来了吗,我也遇到了这个问题 ,config:ok了,但是开放标签显示不出来跟没有一样,也不报错

    2021-06-01
    有用
    回复 2
    • A__郭郭
      A__郭郭
      2021-06-11
      解决了吗
      2021-06-11
      回复
    • 宅
      2021-08-03
      麻烦问下,你这个问题解决了不?template里面的东西显示不出来,清缓存之后会显示一次,> <
      2021-08-03
      回复
  • L
    L
    2020-09-18

    开发者工具上可以显示wx-open-launch-app吗


    2020-09-18
    有用
    回复
  • sheldon.wong
    sheldon.wong
    2020-07-13

    别费劲了,像我一样做成一个透明的按钮盖在UI上就行,在wx-open-launch-app 内设置个高度,不然透明按钮高度会为0


    2020-07-13
    有用
    回复
  • 这位无趣的网友
    这位无趣的网友
    2020-06-14

    原生写法的话,9成是自己写法的问题,我也遇见过https://developers.weixin.qq.com/community/develop/doc/000a82ad030278cf7e5aad52151000?jumpto=comment&commentid=000666bbf4c9e041967a353dd5b4

    2020-06-14
    有用
    回复
  • 极学者@陈序员
    极学者@陈序员
    2020-06-08

    我也是遇到这问题 郁闷

    2020-06-08
    有用
    回复 1
    • 宅
      2021-08-03
      麻烦问下,你这个问题解决了不?template里面的东西显示不出来,清缓存之后会显示一次,> <
      2021-08-03
      回复
  • 琦
    2020-05-28

    微信APP(7.0.12)版本,手机系统(IOS 13.4.1)版本都符合条件;

    2020-05-28
    有用
    回复 17
    • 疯狂的小辣椒
      疯狂的小辣椒
      2020-05-28
      你好,能否提供下可复现问题的链接
      2020-05-28
      回复
    • 琦
      2020-05-28回复疯狂的小辣椒
      没在线上,我想了解一下 wx-open-launch-app 机制,它是不是一些列的操作都成功以后才能显示出来呢?
      2020-05-28
      2
      回复
    • 疯狂的小辣椒
      疯狂的小辣椒
      2020-05-28回复
      确认一下jsApiList是不是空的,以及看看wx.error有没有什么报错
      2020-05-28
      回复
    • 琦
      2020-05-28回复疯狂的小辣椒
      jsApiList不是空的,wx.error 没有报错,执行了 wx.ready
      2020-05-28
      回复
    • 琦
      2020-05-28回复疯狂的小辣椒
      我用代理模拟了js安全域名,和这个有关系吗?
      2020-05-28
      回复
    查看更多(12)
登录 后发表内容
问题标签