var app = getApp();
var $ = require('../../../js/util.js');
Page({
  data:{
    param:{},
    list:[],
    order_id:'',
    type:14,
    hasMore: true,//是否显示
  },
  onLoad: function (options) {//接收上个页面传的参数
     if (options){
      this.setData({
        order_id:options.order_id,
      });
     }else{
       app.HCerror('提示','参数错误'); return;
     }
     
    app.HCsetNavigationBarTitle('支付结果');
     
     
   
  },
  onReady: function () {
    var self = this;
    app.getUserInfo(function (ret) {
      self.getIndex();
    });
  },
  getIndex:function(){
    var self = this;
    var action = 'c=Order&a=order_success';
    app.showLoading('加载中...');
    // console.log(self.data);
    app.ajaxRequest(action, 'POST', self.data, function (ret) {
      if (ret.status == 1) {
        self.setData({
          list: ret.data,
        });
      } else {
        app.HCerror('提示', ret.msg); return;
      }
    }, true);
  },
  look_order:function(event){
    
      app.HCswitchTab('../../userinfo/index/index');
    
    
  },
  
  go_buy:function(){
    app.HCswitchTab('../../index/index');
  }  
})