分享出去的页面是有参数的,为啥接收不到参数?
发布于 6 年前 作者 xiulanshen 14813 次浏览 来自 官方Issues

分享出去的页面是有参数的,为啥接收不到参数?

5 回复

分享的代码是怎么写的?当前页面有参数,分享的代码也需要把参数加上才行

onShareAppMessage: function (res{
    let that = this
    if (res.from === 'button') {
      // 来自页面内转发按钮
      // console.log(res.target)
    }
    let path = '/pages/cart/new?shareKey=' + shareKey
    console.log(path)
    return {
      title'购物车分享',
      path: path,
    }
  }  
onLoadfunction (options{
    console.log('options', options)
}

手机打印会有这个initNativeTransServiceId. ntrans:object componentId :-961943802

shareKey 在哪里定义的 建议你logshareKey看一下

 

参数走丢了

代码怎么写的

回到顶部