微信小程序通过URL传参和接收参数

传参数:

<navigator url='/pages/details/details?type=top100'>Go Go Go</navigator>

接收参数:

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let type = options.type;
    console.log(type)  // top100
  },

微信小程序里面URL传参,是不是很简单呢?

猜你喜欢

转载自blog.csdn.net/joyvonlee/article/details/88629321