2025-12-15 18:19:04 +08:00

71 lines
2.7 KiB
JavaScript

"use strict";
const common_vendor = require("../../../common/vendor.js");
const gen_Enums = require("../../../gen/Enums.js");
if (!Array) {
const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
_easycom_hs_enum_tag2();
}
const _easycom_hs_enum_tag = () => "../../../components/hs-enum-tag/hs-enum-tag.js";
if (!Math) {
_easycom_hs_enum_tag();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "ConvenienceServices",
props: ["data"],
emits: ["change"],
setup(__props, { emit }) {
const props = __props;
const tabList = common_vendor.ref([]);
common_vendor.ref([]);
const current = common_vendor.ref("PropertyExclusive");
const handleSwitchType = (type) => {
current.value = type;
emit("change", type);
console.log("切换", type);
};
const handleCopyPhone = (phone) => {
if (phone) {
common_vendor.index.makePhoneCall({
phoneNumber: phone
//仅为示例,并非真实的电话号码
});
}
};
common_vendor.onMounted(() => {
tabList.value = Object.values(gen_Enums.ConvenienceServicesTypeEnum);
});
return (_ctx, _cache) => {
return {
a: common_vendor.f(tabList.value, (i, index, i0) => {
return {
a: "e03f33cf-0-" + i0,
b: common_vendor.p({
value: i == null ? void 0 : i.value,
Enums: common_vendor.unref(gen_Enums.ConvenienceServicesTypeEnum)
}),
c: `items_${index}`,
d: common_vendor.n(`type_select_item ${current.value === (i == null ? void 0 : i.value) ? "type_select_item_active" : ""}`),
e: common_vendor.o(($event) => handleSwitchType(i == null ? void 0 : i.value), `items_${index}`)
};
}),
b: common_vendor.f(props == null ? void 0 : props.data, (i, index, i0) => {
return {
a: common_vendor.t(i == null ? void 0 : i.name),
b: common_vendor.f(i == null ? void 0 : i.content, (k, idx, i1) => {
return {
a: common_vendor.t(k == null ? void 0 : k.name),
b: common_vendor.t(k == null ? void 0 : k.phone),
c: common_vendor.o(($event) => handleCopyPhone(k == null ? void 0 : k.phone), `list_${index}_${idx}`),
d: `list_${index}_${idx}`
};
}),
c: `list_${index}`
};
})
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e03f33cf"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/pages/index/components/ConvenienceServices.vue"]]);
wx.createComponent(Component);