// packageE/memberasset/memberasset.js
Component({
  properties: {
    datas: {
      type: null,
    },
    component_id: {
      type: null,
    },
    member_item: {
      type: null,
    },
  },
  // 私有数据，可用于模板渲染
  data: {
    name_of_withdrawal: "",
  },
  lifetimes: {
    // 生命周期函数，可以为函数，或一个在methods段中定义的方法名
    attached() {
      this.customizeIncome();
    },
    moved() {},
    detached() {},
  },

  // 生命周期函数，可以为函数，或一个在methods段中定义的方法名
  attached() {},
  // 此处attached的声明会被lifetimes字段中的声明覆盖
  ready() {},

  pageLifetimes: {
    // 组件所在页面的生命周期函数
    show() {},
    hide() {},
    resize() {},
  },
  methods: {
    //自定义提现收入语言
    customizeIncome() {
      try {
        var value = wx.getStorageSync("mailLanguage");
        if (value) {
          let mailLanguage = JSON.parse(value);
          // Do something with return value
          this.setData({
            name_of_withdrawal: mailLanguage.income.name_of_withdrawal,
          });
        }
      } catch (e) {
        // Do something when catch error
      }
    },
    Integral_love: function () {
      wx.navigateTo({
        url: "/packageB/member/Integral_love/Integral_love",
      });
    },
    //跳到爱心兑换值
    golove_index: function () {
      //love_index
      wx.navigateTo({
        url: "/packageB/member/love/Love_index/Love_index",
      });
    },
    gobalance: function () {
      //balance
      wx.navigateTo({
        url: "/packageA/member/balance/balance/balance",
      });
    },
    gointegral_v2: function () {
      //integral_v2
      wx.navigateTo({
        url: "/packageB/member/integral/integral",
      });
    },
    goextension: function () {
      //extension
      wx.navigateTo({
        url: "/packageG/pages/member/extension/extension",
      });
    },
    CardIndexPage(){
      wx.navigateTo({
        url: "/packageB/member/CardIndex/CardIndex",
      });
    },
  },
});
