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

39 lines
2.5 KiB
JavaScript

"use strict";
const common_vendor = require("../../../common/vendor.js");
const pages_index_method = require("../method.js");
const pages_index_model = require("../model.js");
const common_libraries_naviHelper = require("../../../common/libraries/naviHelper.js");
require("../../../common/libraries/apiLoading.js");
require("../../../gen/Apis.js");
require("../../../common/libraries/request.js");
require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/store/useWorkStore.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "PageBanner",
setup(__props) {
const capsuleRect = common_vendor.ref({});
common_vendor.onShow(() => {
capsuleRect.value = common_vendor.index.getMenuButtonBoundingClientRect();
pages_index_method.method.getBanner();
});
return (_ctx, _cache) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
return common_vendor.e({
a: ((_b = (_a = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _a.bannerData) == null ? void 0 : _b.value) && ((_f = (_e = (_d = (_c = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _c.bannerData) == null ? void 0 : _d.value) == null ? void 0 : _e.banners) == null ? void 0 : _f.length)
}, ((_h = (_g = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _g.bannerData) == null ? void 0 : _h.value) && ((_l = (_k = (_j = (_i = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _i.bannerData) == null ? void 0 : _j.value) == null ? void 0 : _k.banners) == null ? void 0 : _l.length) ? {
b: common_vendor.f((_o = (_n = (_m = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _m.bannerData) == null ? void 0 : _n.value) == null ? void 0 : _o.banners, (i, index, i0) => {
var _a2;
return {
a: (_a2 = i == null ? void 0 : i.source[0]) == null ? void 0 : _a2.url,
b: common_vendor.o(($event) => common_vendor.unref(common_libraries_naviHelper.gotoEventToPage)(i), `banner_${index}`),
c: `banner_${index}`
};
}),
c: common_vendor.s(`padding-top:${capsuleRect.value.top + capsuleRect.value.height + 10}px;`)
} : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5f35f898"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/pages/index/components/PageBanner.vue"]]);
wx.createComponent(Component);