// packageB/member/integralDetail/integralDetail.js
const app = getApp();
Page({
  data: {
    logId: '',
    detailInfo: {},
    integral: '积分',
  },

  onLoad: function (options) {
    if (options.id) {
      this.setData({
        logId: options.id
      });
    }
    this.getData();
    try {
      const value = wx.getStorageSync('integral');
      if (value) {
        this.setData({
          integral: value
        });
        // Do something with return value
      }
    } catch (e) {
      // Do something when catch error
    }
  },

  onShow: function () {

  },
  getData () {
    let urlStr = app.getNetAddresss("finance.point-info.detail");
    wx.showLoading({title: 'loading'});
    app._getNetWork({
      url: urlStr,
      data: {
        log_id: this.data.logId
      },
      success: (respone) => {
        wx.hideLoading();
        console.log(respone);
        if (respone.data && respone.data.result === 1) {
          this.setData({
            detailInfo: respone.data.data
          });
        }
      },
      fail () {
        wx.hideLoading();
      }
    });
  }
});