收藏
回答

如何进入体验版?这样好像不对

 <wx-open-launch-weapp id="launch-btn"

                       appid="wxf643b9a074d3b35b"

                       path="pages/home/home?env-version=trial">

     <script type="text/wxtag-template">

         <style>.btn { padding: 12px }</style>

         <button class="btn">打开小程序</button>

     </script>

 </wx-open-launch-weapp>

 <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>

回答关注问题邀请回答
收藏

2 个回答

  • Hlxuan.
    Hlxuan.
    06-04

    试下:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#21

     <wx-open-launch-weapp id="launch-btn"
    
                           appid="wxf643b9a074d3b35b"
    
                           path="pages/home/home" env-version="trial">
    
         <script type="text/wxtag-template">
    
             <style>.btn { padding: 12px }</style>
    
             <button class="btn">打开小程序</button>
    
         </script>
    
     </wx-open-launch-weapp>
    

    06-04
    有用 1
    回复
  • 智能回答 智能回答 本次回答由AI生成
    06-04
    有用
登录 后发表内容