为何“静态网站 H5 跳小程序”无法成功打开小程序?
发布于 5 年前 作者 zding 6551 次浏览 来自 官方Issues

https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/staticstorage/jump-miniprogram.html

依据此文档,制作的一个小程序无法正常打开小程序。

<html>
  <head>
    <meta charset="utf-8">
    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  </head>
  <body>
    <script>
      wx.config({
        debug: false, // 调试时可开启
        appId: 'wxd947200f82267e58',
        timestamp: 1609430400, // 必填,填任意数字即可
        nonceStr: 'nonceStr', // 必填,填任意非空字符串即可,随便填写的
        signature: 'signature', // 必填,填任意非空字符串即可,随便填写的
        jsApiList: ["openTagList","onMenushareTimeline","onMenuShareAppMessage","onShareQQ","onMenuShareQZone","hideOptionMenu"],
        openTagList:['wx-open-launch-weapp'], // 填入打开小程序的开放标签名
      });
    </script>

    <h1>Hello World</h1>

    <!-- 跳转小程序的开放标签。文档 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html -->
    <wx-open-launch-weapp id="weapp" weappid="wxd947200f82267e58" path="pages/index/index">
      <template>
        <button style="width: 200px; height: 45px; line-height: 45px; text-align: center; font-size: 17px; border-radius: 22.5px; color:cornflowerblue;">打开小程序</button>
      </template>
    </wx-open-launch-weapp>

  </body>
</html>

2 回复

以上具体的问题在哪里呢?查看过此文档,按照文档操作也不行。点击拉起小程序无反应。

<html>
  <head>
    <meta charset="utf-8">
    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  </head>
  <body>
    <script>
      wx.config({
        debug: true, // 调试时可开启
        appId: 'wxd947200f82267e58',
        timestamp: 1603526393, // 必填,填任意数字即可
        nonceStr: 'Wm3WZYTPz0wzccnW', // 必填,填任意非空字符串即可
        signature: '553a67aeac5a67081afa96032ea073affa27bb0a', // 必填,填任意非空字符串即可
        jsApiList: ["openTagList"],
        openTagList:['wx-open-launch-weapp'], // 填入打开小程序的开放标签名
      })
    </script>

    <h1>Hello World No.2</h1>

    <!-- 跳转小程序的开放标签。文档 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html -->
    <wx-open-launch-weapp id="weapp" weappid="wxd947200f82267e58" path="pages/wjxqList/wjxqList?activityId=31221299">
      <template>
        <button style="width: 200px; height: 45px; line-height: 45px; text-align: center; font-size: 17px; border-radius: 22.5px; color:cornflowerblue;">拉起小程序</button>
      </template>
    </wx-open-launch-weapp>

  </body>
</html>
回到顶部