"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"),
      eventId: "",
      //事件id
      contentTop: "",
      categoryList: ["背景", "推演", "实际", "相关股票", "相关概念"],
      selectCategory: 0,
      stockCategoryList: [
        {
          title: "全部股票",
          bgColor: "#C00000",
          color: "white"
        },
        {
          title: "大周期",
          bgColor: "#305496",
          color: "white"
        },
        {
          title: "TMT板块",
          bgColor: "#FFBF00",
          color: "white"
        },
        {
          title: "大金融地产",
          bgColor: "#FFF4D3"
        },
        {
          title: "大消费",
          bgColor: "#CDEEEE"
        },
        {
          title: "公共产业板块",
          bgColor: "#DEEBF7"
        }
      ]
    };
  },
  onLoad() {
    this.contentTop = this.navH + (30 + 74) / 750 * common_vendor.inject("windowWidth");
  },
  methods: {
    /**
     * 点击切换栏目
     */
    clickCategoryItem(index) {
      if (this.selectCategory != index) {
        this.selectCategory = index;
      }
    },
    /**
     * 获取事件详情数据
     */
    getEventDetailsData() {
      request_api.investEventDetails(this.eventId).then((res) => {
      }).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: common_vendor.f($data.categoryList, (item, index, i0) => {
      return common_vendor.e({
        a: common_vendor.t(item),
        b: $data.selectCategory == index
      }, $data.selectCategory == index ? {} : {}, {
        c: common_vendor.n("item relative " + ($data.selectCategory == index ? "select" : "")),
        d: index,
        e: common_vendor.o(($event) => $options.clickCategoryItem(index), index)
      });
    }),
    d: common_vendor.s("top:" + $data.navH + "px;"),
    e: $data.selectCategory == 3
  }, $data.selectCategory == 3 ? {
    f: common_vendor.f($data.stockCategoryList, (item, index, i0) => {
      return {
        a: common_vendor.t(item.title),
        b: common_vendor.s("background-color:" + item.bgColor + ";color:" + item.color + ";"),
        c: index
      };
    })
  } : {}, {
    g: common_vendor.s("top:" + $data.contentTop + "px;")
  });
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/invest/investDetails/investDetails.js.map
