index.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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_up_image2 = common_vendor.resolveComponent("up-image");
  10. const _easycom_custom_layout2 = common_vendor.resolveComponent("custom-layout");
  11. (_easycom_up_search2 + _easycom_up_tabs2 + _easycom_up_sticky2 + _easycom_up_image2 + _easycom_custom_layout2)();
  12. }
  13. const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
  14. const _easycom_up_tabs = () => "../../uni_modules/uview-plus/components/u-tabs/u-tabs.js";
  15. const _easycom_up_sticky = () => "../../uni_modules/uview-plus/components/u-sticky/u-sticky.js";
  16. const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
  17. const _easycom_custom_layout = () => "../../components/custom-layout/custom-layout.js";
  18. if (!Math) {
  19. (_easycom_up_search + _easycom_up_tabs + _easycom_up_sticky + _easycom_up_image + _easycom_custom_layout)();
  20. }
  21. const ceshiimage = "https://img.js.design/assets/img/66f77cb0c6ebda7a2a394736.png#846fab95fed56db08fcbc92025765a68";
  22. const ceshiicon = "https://img.js.design/assets/img/66f7f501b50663ba27c0adc7.png#5e31df675fe6a23fe7219d6fe07b48b4";
  23. const _sfc_main = {
  24. __name: "index",
  25. setup(__props) {
  26. const store = store_modules_system.useSystemStore();
  27. const {
  28. bgColor
  29. } = common_vendor.storeToRefs(store);
  30. const searchValue = common_vendor.ref("卡皮巴拉");
  31. const tabs = common_vendor.ref([
  32. {
  33. state: -1,
  34. name: "热门"
  35. },
  36. {
  37. state: 1,
  38. name: "爱情"
  39. },
  40. {
  41. state: 2,
  42. name: "生日"
  43. },
  44. {
  45. state: 3,
  46. name: "友谊"
  47. },
  48. {
  49. state: 4,
  50. name: "手帐"
  51. },
  52. {
  53. state: 5,
  54. name: "宝宝"
  55. },
  56. {
  57. state: 6,
  58. name: "婚礼"
  59. },
  60. {
  61. state: 7,
  62. name: "校园"
  63. }
  64. ]);
  65. common_vendor.ref(-1);
  66. const dataList = common_vendor.ref([{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
  67. const num = common_vendor.ref(1);
  68. const layout = common_vendor.ref();
  69. const onQueryList = (event) => {
  70. const {
  71. pageNo,
  72. pageSize
  73. } = event;
  74. if (pageNo > 1) {
  75. if (num.value < 2) {
  76. num.value++;
  77. layout.value.complete(dataList.value);
  78. } else {
  79. layout.value.complete([]);
  80. }
  81. } else {
  82. num.value = 2;
  83. layout.value.complete(dataList.value);
  84. }
  85. };
  86. common_vendor.onPageScroll((e) => {
  87. common_vendor.index.$emit("onPageScroll", e.scrollTop);
  88. });
  89. common_vendor.onMounted(() => {
  90. });
  91. return (_ctx, _cache) => {
  92. return {
  93. a: common_vendor.o(($event) => searchValue.value = $event),
  94. b: common_vendor.p({
  95. placeholder: "卡皮巴拉",
  96. showAction: false,
  97. borderColor: "rgba(0, 224, 176, 1)",
  98. modelValue: searchValue.value
  99. }),
  100. c: common_vendor.o(_ctx.click),
  101. d: common_vendor.p({
  102. list: tabs.value
  103. }),
  104. e: common_vendor.p({
  105. ["offset-top"]: "0",
  106. ["customNav-height"]: "0",
  107. ["bg-color"]: common_vendor.unref(bgColor)
  108. }),
  109. f: common_vendor.f(10, (item, index, i0) => {
  110. return {
  111. a: "8d87f12a-4-" + i0 + ",8d87f12a-0",
  112. b: common_vendor.f(3, (items, indexs, i1) => {
  113. return {
  114. a: "8d87f12a-5-" + i0 + "-" + i1 + ",8d87f12a-0",
  115. b: indexs
  116. };
  117. }),
  118. c: index
  119. };
  120. }),
  121. g: common_vendor.p({
  122. ["show-loading"]: true,
  123. src: ceshiimage,
  124. radius: "20rpx",
  125. width: "161.95rpx",
  126. height: "155.87rpx"
  127. }),
  128. h: common_vendor.p({
  129. ["show-loading"]: true,
  130. src: ceshiicon,
  131. radius: "20rpx",
  132. width: "114rpx",
  133. height: "106rpx"
  134. }),
  135. i: common_vendor.sr(layout, "8d87f12a-0", {
  136. "k": "layout"
  137. }),
  138. j: common_vendor.o(onQueryList),
  139. k: common_vendor.o(($event) => dataList.value = $event),
  140. l: common_vendor.p({
  141. showBottom: true,
  142. back: {
  143. show: false,
  144. logoShow: true
  145. },
  146. modelValue: dataList.value
  147. })
  148. };
  149. };
  150. }
  151. };
  152. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8d87f12a"]]);
  153. _sfc_main.__runtimeHooks = 1;
  154. wx.createPage(MiniProgramPage);