"use strict"; const common_vendor = require("../../common/vendor.js"); const api_index = require("../../api/index.js"); if (!Array) { const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar"); const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); (_easycom_wd_navbar2 + _easycom_z_paging2)(); } const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js"; const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; if (!Math) { (_easycom_wd_navbar + _easycom_z_paging)(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "prefecture", setup(__props) { const active = common_vendor.ref(1); const categoryId = common_vendor.ref(""); const paging = common_vendor.ref(null); const dataList = common_vendor.ref([]); const noticeCateList = common_vendor.ref([]); common_vendor.onLoad(() => { api_index.api.noticeCatePage().then((res) => { noticeCateList.value = res.list; }); }); const queryList = (pageNo, pageSize) => { api_index.api.goodsPage({ pageNo, pageSize, type: active.value, categoryId: categoryId.value, recommended: 1 }).then((res) => { paging.value.complete(res.list); }).catch((res) => { paging.value.complete(false); }); }; const toGoods = (e) => { common_vendor.index.navigateTo({ url: `/pages/goods/goods?id=${e}` }); }; const back = () => { common_vendor.index.navigateBack(); }; return (_ctx, _cache) => { return { a: common_vendor.o(back), b: common_vendor.p({ title: "进货专区", safeAreaInsetTop: true, ["left-arrow"]: true }), c: common_vendor.f(dataList.value, (item, index, i0) => { return { a: item.cover, b: common_vendor.t(item.name), c: common_vendor.t(item.specs), d: common_vendor.t(item.currentPrice), e: common_vendor.o(($event) => toGoods(item.id), index), f: index }; }), d: common_vendor.sr(paging, "a9cb5680-1", { "k": "paging" }), e: common_vendor.o(queryList), f: common_vendor.o(($event) => dataList.value = $event), g: common_vendor.p({ ["use-page-scroll"]: true, modelValue: dataList.value }) }; }; } }); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a9cb5680"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/goods/prefecture.js.map