acdr-ui/dist/dev/mp-weixin/modules/mall/index/index.js

85 lines
2.8 KiB
JavaScript

"use strict";
const common_vendor = require("../../../common/vendor.js");
const sheep_index = require("../../../sheep/index.js");
const sheep_platform_share = require("../../../sheep/platform/share.js");
const sheep_api_member_auth = require("../../../sheep/api/member/auth.js");
if (!Array) {
const _component_layout_default_uni = common_vendor.resolveComponent("layout-default-uni");
_component_layout_default_uni();
}
if (!Math) {
(SBlockItem + SBlock + SLayout)();
}
const SBlockItem = () => "../../../sheep/components/s-block-item/s-block-item.js";
const SBlock = () => "../../../sheep/components/s-block/s-block.js";
const SLayout = () => "../../../sheep/components/s-layout/s-layout.js";
const _sfc_main = {
__name: "index",
setup(__props) {
common_vendor.index.hideTabBar();
const template = common_vendor.computed(() => {
var _a;
return (_a = sheep_index.sheep.$store("app").template) == null ? void 0 : _a.home;
});
common_vendor.onLoad((options) => {
if (options.token && options["refresh-token"]) {
sheep_api_member_auth.AuthUtil.refreshToken(options["refresh-token"]);
}
if (options.scene) {
const sceneParams = decodeURIComponent(options.scene).split("=");
console.log("sceneParams=>", sceneParams);
options[sceneParams[0]] = sceneParams[1];
}
if (options.templateId) {
sheep_index.sheep.$store("app").init(options.templateId);
}
if (options.spm) {
sheep_platform_share.$share.decryptSpm(options.spm);
}
if (options.page) {
sheep_index.sheep.$router.go(decodeURIComponent(options.page));
}
});
common_vendor.onPullDownRefresh(() => {
sheep_index.sheep.$store("app").init();
setTimeout(function() {
common_vendor.index.stopPullDownRefresh();
}, 800);
});
common_vendor.onPageScroll(() => {
});
return (_ctx, _cache) => {
return common_vendor.e({
a: template.value
}, template.value ? {
b: common_vendor.f(template.value.components, (item, index, i0) => {
return {
a: "f48bccd8-3-" + i0 + "," + ("f48bccd8-2-" + i0),
b: common_vendor.p({
data: item.property,
styles: item.property.style,
type: item.id
}),
c: index,
d: "f48bccd8-2-" + i0 + ",f48bccd8-1",
e: common_vendor.p({
styles: item.property.style
})
};
}),
c: common_vendor.p({
bgStyle: template.value.page,
navbarStyle: template.value.navigationBar,
navbar: "custom",
onShareAppMessage: true,
tabbar: "/modules/mall/index/index",
title: "首页"
})
} : {});
};
}
};
_sfc_main.__runtimeHooks = 3;
wx.createPage(_sfc_main);
//# sourceMappingURL=index.js.map