var app = getApp();
var $ = require('../../../js/util.js');
Page({
  data: {
    
  },
  onLoad: function (options) {//接收上个页面传的参数
    app.HCsetNavigationBarTitle('退款审核');
    var self=this;
    if (options.invite_key) {
      app.globalData.invite_key = options.invite_key;
    }
  },
  onReady: function () {
    var self = this;
    app.getUserInfo(function (ret) {
      self.setData({
        user: ret
      });
      if (self.data.user != '') {
        self.setData({
          param: {
            page: self.data.page,
            type: self.data.type,
            ordertype: self.data.ordertype
          }
        });
        self.getData();
      }
    });
  },
  //加载数据
  getData: function (callback) {
    var self = this;
    app.showLoading('加载中...');
    var action = 'c=Member&a=myorder_list';
    app.ajaxRequest(action, 'GET', $.ObjectToStr(self.data.param), function (ret) {
      if (ret.status == 1) {
        $.init_page_list(self, ret.data);
      } else if (ret.status == 2) {
        $.init_page_empty_list(self, ret.msg);
      }
    }, true);
  },
});