// packageH/signPage/signIndex/signIndex.js
const app = getApp();

Page({
  data: {
    Member: {}
  },

  onLoad: function (options) {

  },
  onShow: function () {
    this._getData();
  },

  _getData () {
    let requestUrl = app.getNetAddresss('plugin.shop-esign.frontend.member.get-info');
    let that = this;
    app._getNetWork({
      url: requestUrl,
      success (resdata) {
        let res = resdata.data;
        if (res.result === 1) {
          that.setData({
            Member: res.data
          });
        } else {
          app.tips(res.msg);
        }
      },
      fail (err) {
        console.log(err, "-----------");
      }
    });
  },


  // 页面跳转
  toSign () {
    if (this.data.Member.status === 1) {
      wx.navigateTo({
        url: '/packageH/signIndexPlu/signCompany/signCompany',
      });
    } else {
      wx.navigateTo({
        url: '/packageH/signIndexPlu/personBank/personBank',
      });
    }
  },

  toLists () {
    wx.navigateTo({
      url: '/packageH/signIndexPlu/contractList/contractList',
    });
  },

  toGoodList () {
    wx.navigateTo({
      url: '/packageB/member/category/search_v2/search_v2',
    });
  },

});
