var app = getApp();
var $ = require('../../../../js/util.js');
Page({
  data: {
    info:'',
  },
  onLoad: function (options) {//接收上个页面传的参数
    if (options.id) {
      this.setData({
        param: {
          id: options.id
        },
      });
    }
    if (options.invite_key) {
      app.globalData.invite_key = options.invite_key;
    }
  },
  onReady: function () {
    this.getIndex();
  },
  getIndex: function () {
    var self = this;
    var action = 'c=Takeout&a=cont_detial';
    var param = $.ObjectToStr(self.data.param);
    app.showLoading('加载中...');
    app.ajaxRequest(action, 'GET', param, function (ret) {
      if (ret && ret.status == 1) {
        self.setData({
            info:ret.data
        });
        // if(ret.data){
        //     WxParse.wxParse('HCcontent', 'html', ret.data, self);
        // }
      } else {
        app.HCerror('提示', ret.msg, false); return;
      }
    });
  },
})