index.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. require("../../store/index.js");
  4. const store_modules_system = require("../../store/modules/system.js");
  5. if (!Array) {
  6. const _easycom_up_search2 = common_vendor.resolveComponent("up-search");
  7. const _easycom_up_tabs2 = common_vendor.resolveComponent("up-tabs");
  8. const _easycom_up_sticky2 = common_vendor.resolveComponent("up-sticky");
  9. const _easycom_custom_layout2 = common_vendor.resolveComponent("custom-layout");
  10. (_easycom_up_search2 + _easycom_up_tabs2 + _easycom_up_sticky2 + _easycom_custom_layout2)();
  11. }
  12. const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
  13. const _easycom_up_tabs = () => "../../uni_modules/uview-plus/components/u-tabs/u-tabs.js";
  14. const _easycom_up_sticky = () => "../../uni_modules/uview-plus/components/u-sticky/u-sticky.js";
  15. const _easycom_custom_layout = () => "../../components/custom-layout/custom-layout.js";
  16. if (!Math) {
  17. (_easycom_up_search + _easycom_up_tabs + _easycom_up_sticky + _easycom_custom_layout)();
  18. }
  19. const _sfc_main = {
  20. __name: "index",
  21. setup(__props) {
  22. const store = store_modules_system.useSystemStore();
  23. const {
  24. bgColor
  25. } = common_vendor.storeToRefs(store);
  26. const searchValue = common_vendor.ref("卡皮巴拉");
  27. const tabs = common_vendor.ref([
  28. {
  29. state: -1,
  30. name: "热门新款"
  31. },
  32. {
  33. state: 1,
  34. name: "简约"
  35. },
  36. {
  37. state: 2,
  38. name: "卡通"
  39. },
  40. {
  41. state: 3,
  42. name: "复古"
  43. },
  44. {
  45. state: 4,
  46. name: "运动"
  47. },
  48. {
  49. state: 5,
  50. name: "艺术"
  51. },
  52. {
  53. state: 6,
  54. name: "节日"
  55. }
  56. ]);
  57. common_vendor.ref(-1);
  58. const dataList = common_vendor.ref([{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
  59. const num = common_vendor.ref(1);
  60. const layout = common_vendor.ref();
  61. const onQueryList = (event) => {
  62. const {
  63. pageNo,
  64. pageSize
  65. } = event;
  66. if (pageNo > 1) {
  67. if (num.value < 2) {
  68. num.value++;
  69. layout.value.complete(dataList.value);
  70. } else {
  71. layout.value.complete([]);
  72. }
  73. } else {
  74. num.value = 2;
  75. layout.value.complete(dataList.value);
  76. }
  77. };
  78. common_vendor.onMounted(() => {
  79. });
  80. return (_ctx, _cache) => {
  81. return {
  82. a: common_vendor.o(($event) => searchValue.value = $event),
  83. b: common_vendor.p({
  84. placeholder: "卡皮巴拉",
  85. showAction: false,
  86. borderColor: "rgba(0, 224, 176, 1)",
  87. modelValue: searchValue.value
  88. }),
  89. c: common_vendor.o(_ctx.click),
  90. d: common_vendor.p({
  91. list: tabs.value
  92. }),
  93. e: common_vendor.p({
  94. ["offset-top"]: "0",
  95. ["customNav-height"]: "0",
  96. ["bg-color"]: common_vendor.unref(bgColor)
  97. }),
  98. f: common_vendor.f(dataList.value, (item, index, i0) => {
  99. return {
  100. a: index
  101. };
  102. }),
  103. g: common_vendor.sr(layout, "380f8012-0", {
  104. "k": "layout"
  105. }),
  106. h: common_vendor.o(onQueryList),
  107. i: common_vendor.o(($event) => dataList.value = $event),
  108. j: common_vendor.p({
  109. showBottom: true,
  110. back: {
  111. show: false,
  112. logoShow: true
  113. },
  114. modelValue: dataList.value
  115. })
  116. };
  117. };
  118. }
  119. };
  120. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-380f8012"]]);
  121. wx.createPage(MiniProgramPage);