panax

1. jssdk  必须1.60 以上

2. 在wx.config 进行注册

wx.config({
                                debug: false,
                                appId: data.data.appid,
                                timestamp: data.data.timestamp,
                                nonceStr: data.data.noncestr,
                                signature: data.data.signature,
                                jsApiList: [
                                    \'onMenuShareTimeline\',
                                    \'onMenuShareAppMessage\',
                                    \'updateAppMessageShareData\',
                                    \'updateTimelineShareData\'
                                ],
                                openTagList: ["wx-open-launch-weapp"]  // 很重要
                            });

3. 使用 小程序标签 wx-open-launch-weapp

// template

<wx-open-launch-weapp
                                id="launch-btn"
                                username=""                  // 小程序原始id
                                path="pages/family/main"     // 小程序页面路径
                                >
                                <!-- <template>
                                    <style>.btn { padding: 12px }</style>
                                    <button class="btn">打开小程序</button>
                                </template> -->
                                <script type="text/wxtag-template">
                                    <img style="width:250px;height:45px;margin-left:15%;" class="btn" src="https://cdn.dianshihome.com/wechat/song/lookVipMore.png" alt="">
                                </script>
                            </wx-open-launch-weapp>

 

分类:

技术点:

相关文章:

  • 2021-12-12
  • 2021-12-12
  • 2021-09-29
  • 2022-02-13
  • 2022-12-23
  • 2023-03-26
  • 2022-02-24
猜你喜欢
  • 2021-12-15
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-04-04
  • 2022-01-24
相关资源
相似解决方案