index.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. "use strict";
  2. const common_vendor = require("../common/vendor.js");
  3. if (!Array) {
  4. const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
  5. const _component_vie = common_vendor.resolveComponent("vie");
  6. const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
  7. const _easycom_up_grid_item2 = common_vendor.resolveComponent("up-grid-item");
  8. const _easycom_up_grid2 = common_vendor.resolveComponent("up-grid");
  9. const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
  10. const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
  11. (_easycom_up_input2 + _component_vie + _easycom_up_swiper2 + _easycom_up_grid_item2 + _easycom_up_grid2 + _easycom_up_toast2 + _easycom_up_button2)();
  12. }
  13. const _easycom_up_input = () => "../node-modules/uview-plus/components/u-input/u-input.js";
  14. const _easycom_up_swiper = () => "../node-modules/uview-plus/components/u-swiper/u-swiper.js";
  15. const _easycom_up_grid_item = () => "../node-modules/uview-plus/components/u-grid-item/u-grid-item.js";
  16. const _easycom_up_grid = () => "../node-modules/uview-plus/components/u-grid/u-grid.js";
  17. const _easycom_up_toast = () => "../node-modules/uview-plus/components/u-toast/u-toast.js";
  18. const _easycom_up_button = () => "../node-modules/uview-plus/components/u-button/u-button.js";
  19. if (!Math) {
  20. (_easycom_up_input + _easycom_up_swiper + _easycom_up_grid_item + _easycom_up_grid + _easycom_up_toast + _easycom_up_button)();
  21. }
  22. const _sfc_main = {
  23. __name: "index",
  24. setup(__props) {
  25. const value = common_vendor.ref("");
  26. const uToastRef = common_vendor.ref(null);
  27. const list3 = common_vendor.ref([
  28. "/static/img/68c51cda626f732e5a6a782e245ac255.jpeg",
  29. "/static/img/78f89f319f760ba84a5b86916612a99d.jpeg",
  30. "/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg"
  31. ]);
  32. const serviceList = common_vendor.ref([
  33. {
  34. icon: "/static/img/统一知识平台-营运@1x.png",
  35. name: "家庭辅导"
  36. },
  37. {
  38. icon: "/static/img/编组.png",
  39. name: "陪伴陪聊"
  40. },
  41. {
  42. icon: "/static/img/清空.png",
  43. name: "家庭助理"
  44. },
  45. {
  46. icon: "/static/img/报事报修@6x.png",
  47. name: "家庭助手"
  48. },
  49. {
  50. icon: "/static/img/报事报修@6x.png",
  51. name: "家庭清洁"
  52. },
  53. {
  54. icon: "/static/img/构建.png",
  55. name: "健康管理"
  56. }
  57. ]);
  58. const handleGridClick = (index) => {
  59. if (uToastRef.value) {
  60. uToastRef.value.success(`点击了:${serviceList.value[index].name}`);
  61. }
  62. };
  63. const list = common_vendor.ref([
  64. {
  65. name: "王五",
  66. category: "保洁",
  67. title: "北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘",
  68. score: "4.5",
  69. image: "/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg"
  70. },
  71. {
  72. name: "赵四",
  73. category: "医疗",
  74. title: "望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘、望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘",
  75. score: "1.1",
  76. image: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg",
  77. img: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg"
  78. },
  79. {
  80. name: "王五",
  81. category: "保洁",
  82. title: "北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘",
  83. score: "4.5",
  84. image: "/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg"
  85. },
  86. {
  87. name: "赵四",
  88. category: "医疗",
  89. title: "望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘、望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘",
  90. score: "1.1",
  91. image: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg",
  92. img: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg"
  93. },
  94. {
  95. name: "王五",
  96. category: "保洁",
  97. title: "北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘",
  98. score: "4.5",
  99. image: "/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg"
  100. },
  101. {
  102. name: "赵四",
  103. category: "医疗",
  104. title: "望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘、望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘",
  105. score: "1.1",
  106. image: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg",
  107. img: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg"
  108. },
  109. {
  110. name: "王五",
  111. category: "保洁",
  112. title: "北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘北国风光,千里冰封,万里雪飘",
  113. score: "4.5",
  114. image: "/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg"
  115. },
  116. {
  117. name: "赵四",
  118. category: "医疗",
  119. title: "望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘、望长城内外,惟余莽莽北国风光,千里冰封,万里雪飘",
  120. score: "1.1",
  121. image: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg",
  122. img: "http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg"
  123. }
  124. ]);
  125. const inputStyle = {
  126. //input輸入框樣式設置
  127. borderRadius: "140rpx",
  128. border: "1rpx solid #ccc",
  129. height: "70rpx",
  130. paddingLeft: "30rpx",
  131. width: "600rpx"
  132. };
  133. const goToDetail = () => {
  134. console.log(111, "跳轉成功");
  135. common_vendor.index.navigateTo({
  136. url: "/pages/search/index"
  137. // 可以帶參數
  138. });
  139. };
  140. return (_ctx, _cache) => {
  141. return {
  142. a: common_vendor.o(goToDetail),
  143. b: common_vendor.o(($event) => value.value = $event),
  144. c: common_vendor.p({
  145. placeholder: "请输入内容",
  146. prefixIcon: "search",
  147. customStyle: inputStyle,
  148. modelValue: value.value
  149. }),
  150. d: common_vendor.p({
  151. list: list3.value,
  152. indicator: true,
  153. indicatorMode: "line",
  154. circular: true
  155. }),
  156. e: common_vendor.f(serviceList.value, (item, index, i0) => {
  157. return {
  158. a: item.icon,
  159. b: common_vendor.t(item.name),
  160. c: index,
  161. d: "02281a80-4-" + i0 + ",02281a80-3"
  162. };
  163. }),
  164. f: common_vendor.p({
  165. ["custom-style"]: {
  166. padding: "20rpx"
  167. }
  168. }),
  169. g: common_vendor.o(handleGridClick),
  170. h: common_vendor.p({
  171. border: false,
  172. col: "4"
  173. }),
  174. i: common_vendor.sr(uToastRef, "02281a80-5", {
  175. "k": "uToastRef"
  176. }),
  177. j: common_vendor.f(list.value, (item, index, i0) => {
  178. return {
  179. a: item.image,
  180. b: common_vendor.t(item.name),
  181. c: common_vendor.t(item.category),
  182. d: common_vendor.t(item.title),
  183. e: common_vendor.t(item.score),
  184. f: "02281a80-6-" + i0,
  185. g: index
  186. };
  187. }),
  188. k: common_vendor.p({
  189. type: "error",
  190. text: "购买",
  191. size: "mini",
  192. ["custom-style"]: "\r\n width: 120rpx;\r\n height: 50rpx;\r\n font-size: 24rpx;\r\n border-radius: 25rpx;\r\n margin-left: 40rpx;\r\n "
  193. })
  194. };
  195. };
  196. }
  197. };
  198. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-02281a80"], ["__file", "C:/Users/Administrator/Desktop/srcaaa/pages/index.vue"]]);
  199. wx.createPage(MiniProgramPage);