"use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); const api_index = require("../../api/index.js"); const hooks_useNav = require("../../hooks/useNav.js"); if (!Array) { const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar"); const _easycom_wd_swiper2 = common_vendor.resolveComponent("wd-swiper"); const _easycom_mp_html2 = common_vendor.resolveComponent("mp-html"); (_easycom_wd_navbar2 + _easycom_wd_swiper2 + _easycom_mp_html2)(); } const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js"; const _easycom_wd_swiper = () => "../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.js"; const _easycom_mp_html = () => "../../uni_modules/mp-html/components/mp-html/mp-html.js"; if (!Math) { (_easycom_wd_navbar + _easycom_wd_swiper + _easycom_mp_html)(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "goods", setup(__props) { const { navTo } = hooks_useNav.useNav(); const current = common_vendor.ref(0); common_vendor.ref(["https://wot-ui.cn/assets/redpanda.jpg", "https://wot-ui.cn/assets/capybara.jpg"]); const goods = common_vendor.ref({}); common_vendor.onLoad((options) => { api_index.api.goodsInfo({ id: options.id }).then((res) => { goods.value = res; }); }); const toConfirm = () => { navTo(`/pages/order/confirm?id=${goods.value.id}`, true); }; const back = () => { common_vendor.index.navigateBack(); }; return (_ctx, _cache) => { return { a: common_vendor.o(back), b: common_vendor.p({ fixed: true, bordered: false, ["left-arrow"]: true, ["custom-style"]: "background-color: transparent !important;", safeAreaInsetTop: true }), c: common_vendor.w(({ current: current2, total }, s0, i0) => { return { a: common_vendor.t(current2 + 1), b: common_vendor.t(total), c: i0, d: s0 }; }, { name: "indicator", path: "c", vueId: "7e2880f6-1" }), d: common_vendor.t(goods.value.sales), e: common_vendor.o(($event) => current.value = $event), f: common_vendor.p({ height: "750rpx", list: goods.value.images, autoplay: true, current: current.value }), g: common_vendor.t(goods.value.name), h: common_vendor.t(goods.value.stock), i: common_vendor.t(goods.value.specs), j: common_vendor.t(goods.value.currentPrice), k: common_vendor.p({ content: goods.value.detail }), l: common_assets._imports_0$4, m: common_assets._imports_1$2, n: common_vendor.o(toConfirm) }; }; } }); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7e2880f6"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/goods/goods.js.map