my_integral.js 1.5 KB
const a = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    jifen: 0,
    time: '',
    list: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    this.getListFun()
  },

  // 获取积分列表
  getListFun() {
    let t = this;
    let u = a.interface.jifenlist;
    a.post(u, {}).then((r) => {
      if (r.code == 200) {
        t.setData({
          jifen: r.msg.jifen==null?0: r.msg.jifen,
          time: r.msg.start + "日到" + r.msg.end + '日',
          list: r.msg.res
        })
      }
    }).catch((er) => {})
  },

  // 进入订单详情
  //查看订单详情
  look_detail(e) {
    console.log(6666)
    let id=e.currentTarget.dataset.id;
    if(id!=null){
      wx.navigateTo({
        url: '/pages/order/order_detail/order_detail?id=' + e.currentTarget.dataset.id + '&type=' + e.currentTarget.dataset.type,
      })
    }
   
  },

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

  },

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

  },

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

  },

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

  },

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

  },

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

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function() {

  }
})