收藏
回答

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
回答关注问题邀请回答
收藏

5 个回答

登录 后发表内容
问题标签