收藏
回答

新需求怎么转发的时候带上个人信息

转发的时候带上转发者的用户ID,当别人注册的时候作为参数传给后台,这样就可以统计谁分享了多少了

回答关注问题邀请回答
收藏

1 个回答

  • _
    _
    2019-03-12


    pages/index/index?userID=1 这样不就可以了?

    注册的页面获取这个ID  在注册的时候在传给后台接口就可以统计了


    2019-03-12
    有用
    回复 2
    • 2019-03-12

      onShareAppMessage: function(res) {

      const title = "找场馆";

      const imageUrl = this.data.url

      var path = 'pages/findLoc/nIndex/nIndex';

      if (wx.getStorageSync("user_id")) {

      const fronUser = wx.getStorageSync("user_id");

      path = path + '?fronUser=' + fronUser;

      }

      call.myPageShare(res, title, path, imageUrl)

      }

      我的path已经带了,但是我用另外一个手机测试,打开这个分享的时候,没有获取到这个options.fronUser

      2019-03-12
      回复
    • _
      _
      2019-03-12回复

      获取不到 肯定是你那个if不成立啊  没有带参数就转发出去了

      2019-03-12
      回复
登录 后发表内容