"use strict";
const common_vendor = require("../../../common/vendor.js");
const api_request = require("../../../api/request.js");
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const products = common_vendor.ref();
    const cookie = common_vendor.wx$1.getStorageSync("cookie");
    common_vendor.ref([null, null]);
    common_vendor.onMounted(() => {
      getProducts();
    });
    const getProducts = async () => {
      const res = await common_vendor.index.request({
        url: api_request.baseUrl + "/goods/service/list/card",
        method: "GET",
        header: {
          cookie
        }
      });
      console.log(res.data.data);
      if (res.data.code === 1) {
        products.value = res.data.data;
      }
    };
    const jump_detail = (item, index) => {
      common_vendor.index.navigateTo({
        url: "../productmain/productmain?info=" + JSON.stringify(item.id)
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(products.value, (item, index, i0) => {
          return {
            a: item.goodImg,
            b: common_vendor.t(item.name),
            c: common_vendor.t(item.price),
            d: index,
            e: common_vendor.o(($event) => jump_detail(item), index)
          };
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6d033fba"], ["__file", "D:/微信小程序/课设整合/匠承非遗小程序端/jiangchengfeiyi-xiaochengxu/pages/workshop/index/index.vue"]]);
wx.createPage(MiniProgramPage);
