"use strict";
const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = {
  data() {
    return {
      navH: common_vendor.inject("navHeight"),
      memberInfo: null,
      //会员信息
      privilegeList: ["高效选股工具", "股票基金明星榜单", "定期专属晨报、股票动态", "独家产业研报", "个股产业分析", "股票、基金基础指标", "7x24 财经直播"]
    };
  },
  onLoad() {
    this.getMemberStatus();
  },
  methods: {
    /**
     * 点击加入vip
     */
    clickJoinVip() {
      if (!this.memberInfo.is_member) {
        common_vendor.index.showModal({
          content: "请点击下方按钮复制链接并在浏览器中打开以完成会员购买流程",
          showCancel: false,
          confirmText: "复制",
          success(res) {
            if (res.confirm)
              ;
          }
        });
      }
    },
    /**
     * 获取会员状态
     */
    getMemberStatus() {
      request_api.membershipStatus().then((res) => {
        if (res.code == 200) {
          this.memberInfo = res.data;
        } else
          common_vendor.index.showToast({
            title: res.message,
            icon: "none"
          });
      }).catch((error) => {
      });
    }
  }
};
if (!Array) {
  const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
  _easycom_navBar2();
}
const _easycom_navBar = () => "../../components/navBar/navBar.js";
if (!Math) {
  _easycom_navBar();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return common_vendor.e({
    a: common_vendor.p({
      leftText: "会员中心"
    }),
    b: common_assets._imports_0,
    c: $data.memberInfo
  }, $data.memberInfo ? common_vendor.e({
    d: $data.memberInfo.is_member
  }, $data.memberInfo.is_member ? {
    e: common_assets._imports_1$7
  } : {
    f: common_assets._imports_2$8
  }, {
    g: $data.memberInfo.is_member
  }, $data.memberInfo.is_member ? {
    h: common_vendor.t($data.memberInfo.member_expire_date)
  } : {}, {
    i: $data.memberInfo.is_member
  }, $data.memberInfo.is_member ? {
    j: common_assets._imports_3$6
  } : {
    k: common_assets._imports_4$4
  }, {
    l: $data.memberInfo.is_member
  }, $data.memberInfo.is_member ? {
    m: common_assets._imports_5$3
  } : {
    n: common_assets._imports_6$1
  }, {
    o: common_vendor.f($data.privilegeList, (item, index, i0) => {
      return common_vendor.e({
        a: common_vendor.t(item),
        b: index == 0 || index == 1 || index == 2
      }, index == 0 || index == 1 || index == 2 ? {
        c: common_assets._imports_7$1
      } : {}, {
        d: index == 3 || index == 4
      }, index == 3 || index == 4 ? common_vendor.e({
        e: index == 3
      }, index == 3 ? {} : {}, {
        f: index == 4
      }, index == 4 ? {} : {}) : {}, {
        g: index == 5 || index == 6
      }, index == 5 || index == 6 ? {
        h: common_assets._imports_8$1
      } : {}, {
        i: index
      });
    }),
    p: common_assets._imports_8$1,
    q: common_vendor.n("privilegeList " + ($data.memberInfo.is_member ? "vip" : "")),
    r: common_vendor.s("margin-top:" + $data.navH + "px;")
  }) : {}, {
    s: $data.memberInfo
  }, $data.memberInfo ? {
    t: common_vendor.t($data.memberInfo.is_member ? "您已是年度VIP" : "立即加入年度VIP"),
    v: common_vendor.o(($event) => $options.clickJoinVip())
  } : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pagesMine/vipMeal/vipMeal.js.map
