var app = getApp();
var $ = require('../../../js/util.js');
Page({
  data: {
    list: [],
    page: 1,//当前页码
    param: {},
    is_show:0,
    //公共提示
    hasMore: false,//无更多数据提示
    dataNull: true//未获取到数据提示
  },
  onLoad: function (options) {
    var self = this;
    if (options.invite_key) {
      app.globalData.invite_key = options.invite_key;
    }
    if (options.id) {
      self.setData({
        param: {
          id: options.id,
        },
      });
    }
  },
  onReady: function () {
    var self = this;
    self.getData();
  },
  getData: function (callback) {
    var self = this;
    app.showLoading('加载中...');
    var action = 'c=Member&a=comment_list';
    app.ajaxRequest(action, 'GET', $.ObjectToStr(self.data.param), function (ret) {
      //console.log(ret);
      if (ret.status == 1) {
        self.setData({
          list:ret.data.dp_list,
          is_show:1,
        });
      } else {
        app.HCerror('提示', ret.msg, false); return;
      }
    }, true)
  },
  LookBigimg: function (event) {
    var imgsrc = event.currentTarget.dataset.item;
    app.HCpreviewImage(imgsrc);
  }
})