"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: [
        "事件关联股票深度分析",
        "历史事件智能对比复盘",
        "事件概念关联与挖掘",
        "概念板块个股追踪",
        "概念深深度研报与解读",
        "个股异动实时预警",
        "事件传导链路智能分析",
        "概念演变时间轴追溯",
        "个股全方位深度研究",
        "价小前投研助手无限使用",
        "新功能优先体验权",
        "专属客服一对一服务"
      ]
    };
  },
  onLoad() {
    this.getMemberStatus();
  },
  methods: {
    /**
     * 点击加入vip
     */
    clickJoinVip() {
      if (!this.memberInfo.is_member) {
        common_vendor.index.showModal({
          content: "请点击下方按钮复制链接并在浏览器中打开以完成会员购买流程",
          showCancel: false,
          confirmText: "复制",
          success(res) {
            if (res.confirm) {
              common_vendor.index.setClipboardData({
                data: "https://valuefrontier.cn/home/pages/account/subscription"
              });
            }
          }
        });
      }
    },
    /**
     * 获取会员状态
     */
    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$9
  } : {
    f: common_assets._imports_2$8
  }, {
    g: $data.memberInfo.is_member
  }, $data.memberInfo.is_member ? {
    h: common_vendor.t($data.memberInfo.subscription_type),
    i: common_vendor.t($data.memberInfo.member_expire_date)
  } : {}, {
    j: $data.memberInfo.is_member
  }, $data.memberInfo.is_member ? {
    k: common_assets._imports_3$8
  } : {
    l: common_assets._imports_4$8
  }, {
    m: $data.memberInfo.is_member
  }, $data.memberInfo.is_member ? {
    n: common_assets._imports_5$5
  } : {
    o: common_assets._imports_6
  }, {
    p: common_vendor.f($data.privilegeList, (item, index, i0) => {
      return common_vendor.e({
        a: common_vendor.t(item),
        b: index > 5
      }, index > 5 ? {
        c: common_assets._imports_7$1
      } : {
        d: common_assets._imports_8$2
      }, {
        e: index
      });
    }),
    q: common_assets._imports_8$2,
    r: common_vendor.n("privilegeList " + ($data.memberInfo.is_member ? "vip" : "")),
    s: common_vendor.s("margin-top:" + $data.navH + "px;")
  }) : {}, {
    t: $data.memberInfo
  }, $data.memberInfo ? {
    v: common_vendor.t($data.memberInfo.is_member ? "您已是年度VIP" : "立即加入年度VIP"),
    w: 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
