bannerJumpPage.js 1.08 KB
// packageIndex/pages/bannerJumpPage/bannerJumpPagoptions.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    infoData: {},
    titleList: ['商品', '图文介绍', '视频介绍']
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    let {
      titleList
    } = this.data
    if (options && options.title) {
      wx.setNavigationBarTitle({
        title: options.title
      })
    } else {
      wx.setNavigationBarTitle({
        title: titleList[options.bannerType - 1]
      })
    }
    this.setData({
      infoData: options || {}
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  }
})