"use strict";
const common_vendor = require("../../../common/vendor.js");
const api_request = require("../../../api/request.js");
const _sfc_main = {
  __name: "CostumeDisplay",
  setup(__props) {
    const list = common_vendor.ref([{}]);
    const label = common_vendor.ref([{}]);
    common_vendor.onMounted(() => {
      getLabel();
    });
    common_vendor.onLoad((options) => {
      list.value = JSON.parse(options.info);
      console.log(list.value, "id");
    });
    const getLabel = async () => {
      const res = await common_vendor.index.request({
        url: api_request.baseUrl + "/clothesInfo/list/label",
        method: "POST",
        header: {
          cookie: wx.getAccountInfoSync("cookie")
        },
        data: {
          id: list.value
        }
      });
      console.log(res);
      if (res.data.code === 1) {
        label.value = res.data.data;
      } else {
        uin.showtoast({
          icon: "error",
          title: "获取失败"
        });
      }
    };
    const goToText = (index) => {
      common_vendor.index.navigateTo({
        url: "/pages/booking/CostumeDetails/CostumeDetails?info=" + JSON.stringify(label.value[index].id)
      });
      console.log(label.value[index].id);
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(label.value, (item, index, i0) => {
          return {
            a: item.image,
            b: item.image,
            c: common_vendor.t(item.name),
            d: common_vendor.t(item.intro),
            e: common_vendor.t(item.price),
            f: index,
            g: common_vendor.o(($event) => goToText(index))
          };
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d97852c0"], ["__file", "D:/jiangchengfeiyi-xiaochengxu/pages/booking/CostumeDisplay/CostumeDisplay.vue"]]);
my.createPage(MiniProgramPage);