"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: common_vendor.wx$1.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: common_vendor.t(item.name),
            c: common_vendor.t(item.intro),
            d: common_vendor.t(item.price),
            e: index,
            f: common_vendor.o(($event) => goToText(index), index)
          };
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d97852c0"], ["__file", "D:/微信小程序/课设整合/匠承非遗小程序端/jiangchengfeiyi-xiaochengxu/pages/booking/CostumeDisplay/CostumeDisplay.vue"]]);
wx.createPage(MiniProgramPage);
