收藏
回答

wx-open-launch-weapp在小程序中不显示?

流程是,在小程序A中使用webview打开静态页面,这个静态页面经测试在微信和外部浏览器中可以正常打开显示,显示跳转小程序B的按钮

而在这个小程序A中并不能显示跳转按钮,也无法跳转

代码如下

 <div class="page full">
      <div id="public-web-container" class="hidden">
        <p class="">正在打开 “xxx”...</p> <!-- replace -->
        <a id="public-web-jump-button" href="javascript:" class="weui-btn weui-btn_primary weui-btn_loading" onclick="openWeapp()">
          <span id="public-web-jump-button-loading" class="weui-primary-loading weui-primary-loading_transparent"><i class="weui-primary-loading__dot"></i></span>
          打开小程序
        </a>
      </div>
      <div id="wechat-web-container" class="hidden">
        <p class="">点击以下按钮打开 “xxx”</p> <!-- replace -->
        <!-- 跳转小程序的开放标签。文档 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html -->
        <wx-open-launch-weapp id="launch-btn" username="xxxxxxx" path="pages/index/index"> <!-- replace -->
          <template>
            <button style="width: 200px; height: 45px; text-align: center; font-size: 17px; display: block; margin: 0 auto; padding: 8px 24px; border: none; border-radius: 4px; background-color: #07c160; color:#fff;">打开小程序</button>
          </template>
        </wx-open-launch-weapp>
      </div>
回答关注问题邀请回答
收藏

5 个回答

  • 晴空
    晴空
    2022-07-26

    请问你解决这个问题了吗?

    2022-07-26
    有用
    回复
  • LDS
    LDS
    2022-02-28

    解决了嘛 大佬

    2022-02-28
    有用
    回复
  • dreamhunter
    dreamhunter
    2021-06-02

    小程序内webview跳转用的是

    wx.miniProgram.navigateTo

    https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html

    2021-06-02
    有用
    回复 1
    • 轰冬尼?
      轰冬尼?
      2021-06-02
      从小程序A已经跳转到静态页面了,就是静态页面没有显示跳转小程序B的按钮
      2021-06-02
      回复
  • 比昂
    比昂
    2021-06-01

    这路径必须是.html

    2021-06-01
    有用
    回复 2
    • 轰冬尼?
      轰冬尼?
      2021-06-02
      关键是这个按钮就没显示,还没到跳转那步
      2021-06-02
      回复
    • 轰冬尼?
      轰冬尼?
      2021-06-02
      而且这个页面在外部浏览器和微信中打开都是可以正常跳转的
      2021-06-02
      回复
  • 轰冬尼?
    轰冬尼?
    2021-06-01
     wx.config({
                // debug: true, // 调试时可开启
                appId'xxxxxxx'// <!-- replace -->
                timestamp0// 必填,填任意数字即可
                nonceStr'nonceStr'// 必填,填任意非空字符串即可
                signature'signature'// 必填,填任意非空字符串即可
                jsApiList: ['chooseImage'], // 必填,随意一个接口即可 
                openTagList:['wx-open-launch-weapp'], // 填入打开小程序的开放标签名
              })
    
    2021-06-01
    有用
    回复
登录 后发表内容