// pages/inviteCircleMember/inviteCircleMember.js
var app = getApp();
import Notify from '../../dist/notify/notify';
Page({

  /**
   * 页面的初始数据
   */
  data: {
    circleId: 0,
    inviteUserName:'',

    circleDat: null
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      circleId: options.circleId,
      inviteUserName: options.inviteUserName
    })
    this.circleinfo()
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

  //获取圈子信息
  circleinfo() {
    var that = this;
    var config = wx.getStorageSync('config');
    wx: wx.request({
      url: app.url + 'ajax_get_circle_info.php',
      data: {
        unionId: config.unionId,
        circleId: that.data.circleId
      },
      header: { 'content-type': 'application/json' },
      method: 'GET',
      dataType: 'json',
      success: function (res) {
        console.log(res)
        if (res.statusCode == 200) {
          if (res.data.status == "OK") {
            that.setData({
              circleDat: res.data.result.circleDat,
            })
          }
        }
      },
      fail: function (res) { },
      complete: function (res) { },
    })
  },
})