const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    datum: [],  //头部信息
    headurl: [],    //个人头像
    authenticationnum: [],    //认证信息
    wxauthentication: [],     //我的微信
    memberstatus:'', //会员状态

  

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onShow: function (options) {

    var that =this;
    // getApp().showLoading();   //提示加载中

              //  头部信息
    let datum_url = 'my/personaldata/datum';
    let datum_data = {
            };
    app.postRequest(datum_url, datum_data, function (res) {
            if (res.code == 201) {
              // console.log(res.data);
              that.setData({
                datum: res.data
              })
            }
      })


    //  个人头像
    let headurl_url = 'my/images/headurl';
    let headurl_data = {
    };
    app.postRequest(headurl_url, headurl_data, function (res) {
      if (res.code == 201) {
        // console.log(res.data);
        that.setData({
          headurl: res.data
        })
      }
    })

    //  认证信息
    let authenticationnum_url = 'my/authentication/authenticationnum';
    let authenticationnum_data = {
    };
    app.postRequest(authenticationnum_url, authenticationnum_data, function (res) {
      if (res.code == 201) {
        // console.log(res.data);
        that.setData({
          authenticationnum: res.data
        })
      }
    })


    //  我的微信
    let wxauthentication_url = 'my/wxqrcode/wxauthentication';
    let wxauthentication_data = {
    };
    app.postRequest(wxauthentication_url, wxauthentication_data, function (res) {
        // console.log(res.data);
        that.setData({
          wxauthentication: res.data
        })
   
    })


    //  会员状态
    let memberstatus_url = 'pay/recharge/memberstatus';
    let memberstatus_data = {
    };
    app.postRequest(memberstatus_url, memberstatus_data, function (res) {
      if (res.code == 201) {
        // console.log(res.data);
        that.setData({
          memberstatus: res.data.msg
        })
      }
    })


  },



})