小程序分享(转发)问题

发布于 8 年前作者 nalong4623 次浏览最后编辑 8 年前来自 issues
  • 当前 Bug 的表现(可附上截图)

带参数的url分享=》通过右上角的分享按钮=》页面接收参数    接收不到

带参数的url分享=》通过页面内定义的分享按钮=》页面接收参数    可以接收到

  • 预期表现

带参数的url分享=》通过右上角的分享按钮=》页面能接收到参数

  • 复现路径

pages/login/login

  • 提供一个最简复现 Demo

<button class=‘share’ open-type=“share”>分享</button>

onShareAppMessage: function (ops) {

    var that = this

    return {

        title: ‘周薪薪直聘’,

        path: ‘/pages/login/login?id=123’

    }

}

onLoad: function (options) {

console.log(“id=” + decodeURIComponent(options.id))

},

4 回复
luoming
luoming1 楼6 年前

直接打印options.id获取吧

zouchao
zouchao2 楼6 年前

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

xiongwei
xiongwei3 楼6 年前

去app.js里面的onshow方法里面找一下,打印一下参数看下有没有

yan81
yan814 楼6 年前

没遇到过