page.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const sheep_api_promotion_diy = require("../../sheep/api/promotion/diy.js");
  4. require("../../sheep/request/index.js");
  5. require("../../sheep/config/index.js");
  6. require("../../sheep/store/index.js");
  7. require("../../sheep/store/app.js");
  8. require("../../sheep/platform/index.js");
  9. require("../../sheep/platform/provider/wechat/index.js");
  10. require("../../sheep/platform/provider/wechat/miniProgram.js");
  11. require("../../sheep/api/member/auth.js");
  12. require("../../sheep/api/member/social.js");
  13. require("../../sheep/api/member/user.js");
  14. require("../../sheep/platform/provider/apple/index.js");
  15. require("../../sheep/platform/share.js");
  16. require("../../sheep/router/index.js");
  17. require("../../sheep/hooks/useModal.js");
  18. require("../../sheep/helper/index.js");
  19. require("../../sheep/helper/test.js");
  20. require("../../sheep/helper/digit.js");
  21. require("../../sheep/index.js");
  22. require("../../sheep/api/index.js");
  23. require("../../sheep/api/distri/score.js");
  24. require("../../sheep/api/distri/share.js");
  25. require("../../sheep/api/distri/team.js");
  26. require("../../sheep/api/infra/file.js");
  27. require("../../sheep/api/member/address.js");
  28. require("../../sheep/api/member/point.js");
  29. require("../../sheep/api/member/signin.js");
  30. require("../../sheep/api/migration/app.js");
  31. require("../../sheep/api/migration/chat.js");
  32. require("../../sheep/api/migration/index.js");
  33. require("../../sheep/api/migration/third.js");
  34. require("../../sheep/api/pay/channel.js");
  35. require("../../sheep/api/pay/order.js");
  36. require("../../sheep/api/pay/wallet.js");
  37. require("../../sheep/api/product/category.js");
  38. require("../../sheep/api/product/comment.js");
  39. require("../../sheep/api/product/favorite.js");
  40. require("../../sheep/api/product/history.js");
  41. require("../../sheep/api/product/spu.js");
  42. require("../../sheep/api/promotion/activity.js");
  43. require("../../sheep/api/promotion/article.js");
  44. require("../../sheep/api/promotion/bargain.js");
  45. require("../../sheep/api/promotion/combination.js");
  46. require("../../sheep/api/promotion/coupon.js");
  47. require("../../sheep/api/promotion/rewardActivity.js");
  48. require("../../sheep/api/promotion/seckill.js");
  49. require("../../sheep/api/system/area.js");
  50. require("../../sheep/api/system/voice.js");
  51. require("../../sheep/api/trade/afterSale.js");
  52. require("../../sheep/api/trade/brokerage.js");
  53. require("../../sheep/api/trade/cart.js");
  54. require("../../sheep/api/trade/config.js");
  55. require("../../sheep/api/trade/delivery.js");
  56. require("../../sheep/api/trade/order.js");
  57. require("../../sheep/url/index.js");
  58. require("../../sheep/config/zIndex.js");
  59. require("../../sheep/helper/throttle.js");
  60. require("../../sheep/platform/pay.js");
  61. require("../../sheep/store/user.js");
  62. require("../../sheep/store/cart.js");
  63. require("../../sheep/store/sys.js");
  64. require("../../sheep/store/modal.js");
  65. if (!Array) {
  66. const _easycom_s_block_item2 = common_vendor.resolveComponent("s-block-item");
  67. const _easycom_s_block2 = common_vendor.resolveComponent("s-block");
  68. const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout");
  69. (_easycom_s_block_item2 + _easycom_s_block2 + _easycom_s_layout2)();
  70. }
  71. const _easycom_s_block_item = () => "../../sheep/components/s-block-item/s-block-item.js";
  72. const _easycom_s_block = () => "../../sheep/components/s-block/s-block.js";
  73. const _easycom_s_layout = () => "../../sheep/components/s-layout/s-layout.js";
  74. if (!Math) {
  75. (_easycom_s_block_item + _easycom_s_block + _easycom_s_layout)();
  76. }
  77. const _sfc_main = {
  78. __name: "page",
  79. setup(__props) {
  80. const state = common_vendor.reactive({
  81. name: "",
  82. components: [],
  83. navigationBar: {},
  84. page: {}
  85. });
  86. common_vendor.onLoad(async (options) => {
  87. var _a, _b, _c;
  88. let id = options.id;
  89. if (options.scene) {
  90. const sceneParams = decodeURIComponent(options.scene).split("=");
  91. id = sceneParams[1];
  92. }
  93. const { code, data } = await sheep_api_promotion_diy.DiyApi.getDiyPage(id);
  94. if (code === 0) {
  95. state.name = data.name;
  96. state.components = (_a = data.property) == null ? void 0 : _a.components;
  97. state.navigationBar = (_b = data.property) == null ? void 0 : _b.navigationBar;
  98. state.page = (_c = data.property) == null ? void 0 : _c.page;
  99. }
  100. });
  101. common_vendor.onPageScroll(() => {
  102. });
  103. return (_ctx, _cache) => {
  104. return {
  105. a: common_vendor.f(state.components, (item, index, i0) => {
  106. return {
  107. a: "14db8168-2-" + i0 + "," + ("14db8168-1-" + i0),
  108. b: common_vendor.p({
  109. type: item.id,
  110. data: item.property,
  111. styles: item.property.style
  112. }),
  113. c: index,
  114. d: "14db8168-1-" + i0 + ",14db8168-0",
  115. e: common_vendor.p({
  116. styles: item.property.style
  117. })
  118. };
  119. }),
  120. b: common_vendor.p({
  121. title: state.name,
  122. navbar: "custom",
  123. bgStyle: state.page,
  124. navbarStyle: state.navigationBar,
  125. onShareAppMessage: true,
  126. showLeftButton: true
  127. })
  128. };
  129. };
  130. }
  131. };
  132. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/zx/mall-front-app/pages/index/page.vue"]]);
  133. _sfc_main.__runtimeHooks = 3;
  134. wx.createPage(MiniProgramPage);