56 lines
1.9 KiB
JavaScript
56 lines
1.9 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const hooks_useNav = require("../../hooks/useNav.js");
|
|
const api_api = require("../../api/api.js");
|
|
if (!Array) {
|
|
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
|
|
_easycom_up_swiper2();
|
|
}
|
|
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
|
|
if (!Math) {
|
|
_easycom_up_swiper();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "shop",
|
|
setup(__props) {
|
|
let shop = common_vendor.ref({});
|
|
const { nav, navTo } = hooks_useNav.useNav();
|
|
const headerBg = common_vendor.ref(false);
|
|
common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
|
common_vendor.ref(["/static/图层 979.png"]);
|
|
common_vendor.onLoad(async (options) => {
|
|
let _res = await api_api.shopInfo({
|
|
id: options.id
|
|
});
|
|
shop.value = _res;
|
|
});
|
|
common_vendor.onPageScroll((e) => {
|
|
if (e.scrollTop > common_vendor.index.getSystemInfoSync().statusBarHeight + 44) {
|
|
headerBg.value = true;
|
|
} else {
|
|
headerBg.value = false;
|
|
}
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.p({
|
|
list: JSON.parse(common_vendor.unref(shop).picture),
|
|
height: "759rpx"
|
|
}),
|
|
b: common_vendor.t(common_vendor.unref(shop).salePrice),
|
|
c: common_vendor.t(common_vendor.unref(shop).goodsName),
|
|
d: common_vendor.f(JSON.parse(common_vendor.unref(shop).details), (item, index, i0) => {
|
|
return {
|
|
a: item,
|
|
b: index
|
|
};
|
|
}),
|
|
e: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/shop/affirm?id=${common_vendor.unref(shop).id}`, true))
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2a6aaf81"]]);
|
|
_sfc_main.__runtimeHooks = 1;
|
|
my.createPage(MiniProgramPage);
|