You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

255 lines
13 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. "use strict";
  2. const common_vendor = require("../../../common/vendor.js");
  3. const common_assets = require("../../../common/assets.js");
  4. const config_site_config = require("../../../config/site.config.js");
  5. const store_index = require("../../../store/index.js");
  6. const config_api = require("../../../config/api.js");
  7. require("../../../uni_modules/uview-plus/index.js");
  8. require("../../../uni_modules/uview-plus/libs/mixin/mixin.js");
  9. require("../../../uni_modules/uview-plus/libs/vue.js");
  10. require("../../../uni_modules/uview-plus/libs/function/index.js");
  11. require("../../../uni_modules/uview-plus/libs/function/test.js");
  12. require("../../../uni_modules/uview-plus/libs/function/digit.js");
  13. require("../../../uni_modules/uview-plus/libs/config/config.js");
  14. require("../../../uni_modules/uview-plus/libs/util/route.js");
  15. require("../../../uni_modules/uview-plus/libs/mixin/mpMixin.js");
  16. require("../../../uni_modules/uview-plus/libs/luch-request/core/Request.js");
  17. require("../../../uni_modules/uview-plus/libs/luch-request/core/dispatchRequest.js");
  18. require("../../../uni_modules/uview-plus/libs/luch-request/adapters/index.js");
  19. require("../../../uni_modules/uview-plus/libs/luch-request/helpers/buildURL.js");
  20. require("../../../uni_modules/uview-plus/libs/luch-request/utils.js");
  21. require("../../../uni_modules/uview-plus/libs/luch-request/core/buildFullPath.js");
  22. require("../../../uni_modules/uview-plus/libs/luch-request/helpers/isAbsoluteURL.js");
  23. require("../../../uni_modules/uview-plus/libs/luch-request/helpers/combineURLs.js");
  24. require("../../../uni_modules/uview-plus/libs/luch-request/core/settle.js");
  25. require("../../../uni_modules/uview-plus/libs/luch-request/core/InterceptorManager.js");
  26. require("../../../uni_modules/uview-plus/libs/luch-request/core/mergeConfig.js");
  27. require("../../../uni_modules/uview-plus/libs/luch-request/core/defaults.js");
  28. require("../../../uni_modules/uview-plus/libs/luch-request/utils/clone.js");
  29. require("../../../uni_modules/uview-plus/libs/function/colorGradient.js");
  30. require("../../../uni_modules/uview-plus/libs/function/debounce.js");
  31. require("../../../uni_modules/uview-plus/libs/function/throttle.js");
  32. require("../../../uni_modules/uview-plus/libs/config/props.js");
  33. require("../../../uni_modules/uview-plus/libs/config/props/actionSheet.js");
  34. require("../../../uni_modules/uview-plus/libs/config/props/album.js");
  35. require("../../../uni_modules/uview-plus/libs/config/props/alert.js");
  36. require("../../../uni_modules/uview-plus/libs/config/props/avatar.js");
  37. require("../../../uni_modules/uview-plus/libs/config/props/avatarGroup.js");
  38. require("../../../uni_modules/uview-plus/libs/config/props/backtop.js");
  39. require("../../../uni_modules/uview-plus/libs/config/props/badge.js");
  40. require("../../../uni_modules/uview-plus/libs/config/props/button.js");
  41. require("../../../uni_modules/uview-plus/libs/config/props/calendar.js");
  42. require("../../../uni_modules/uview-plus/libs/config/props/carKeyboard.js");
  43. require("../../../uni_modules/uview-plus/libs/config/props/cell.js");
  44. require("../../../uni_modules/uview-plus/libs/config/props/cellGroup.js");
  45. require("../../../uni_modules/uview-plus/libs/config/props/checkbox.js");
  46. require("../../../uni_modules/uview-plus/libs/config/props/checkboxGroup.js");
  47. require("../../../uni_modules/uview-plus/libs/config/props/circleProgress.js");
  48. require("../../../uni_modules/uview-plus/libs/config/props/code.js");
  49. require("../../../uni_modules/uview-plus/libs/config/props/codeInput.js");
  50. require("../../../uni_modules/uview-plus/libs/config/props/col.js");
  51. require("../../../uni_modules/uview-plus/libs/config/props/collapse.js");
  52. require("../../../uni_modules/uview-plus/libs/config/props/collapseItem.js");
  53. require("../../../uni_modules/uview-plus/libs/config/props/columnNotice.js");
  54. require("../../../uni_modules/uview-plus/libs/config/props/countDown.js");
  55. require("../../../uni_modules/uview-plus/libs/config/props/countTo.js");
  56. require("../../../uni_modules/uview-plus/libs/config/props/datetimePicker.js");
  57. require("../../../uni_modules/uview-plus/libs/config/props/divider.js");
  58. require("../../../uni_modules/uview-plus/libs/config/props/empty.js");
  59. require("../../../uni_modules/uview-plus/libs/config/props/form.js");
  60. require("../../../uni_modules/uview-plus/libs/config/props/formItem.js");
  61. require("../../../uni_modules/uview-plus/libs/config/props/gap.js");
  62. require("../../../uni_modules/uview-plus/libs/config/props/grid.js");
  63. require("../../../uni_modules/uview-plus/libs/config/props/gridItem.js");
  64. require("../../../uni_modules/uview-plus/libs/config/props/icon.js");
  65. require("../../../uni_modules/uview-plus/libs/config/props/image.js");
  66. require("../../../uni_modules/uview-plus/libs/config/props/indexAnchor.js");
  67. require("../../../uni_modules/uview-plus/libs/config/props/indexList.js");
  68. require("../../../uni_modules/uview-plus/libs/config/props/input.js");
  69. require("../../../uni_modules/uview-plus/libs/config/props/keyboard.js");
  70. require("../../../uni_modules/uview-plus/libs/config/props/line.js");
  71. require("../../../uni_modules/uview-plus/libs/config/props/lineProgress.js");
  72. require("../../../uni_modules/uview-plus/libs/config/props/link.js");
  73. require("../../../uni_modules/uview-plus/libs/config/props/list.js");
  74. require("../../../uni_modules/uview-plus/libs/config/props/listItem.js");
  75. require("../../../uni_modules/uview-plus/libs/config/props/loadingIcon.js");
  76. require("../../../uni_modules/uview-plus/libs/config/props/loadingPage.js");
  77. require("../../../uni_modules/uview-plus/libs/config/props/loadmore.js");
  78. require("../../../uni_modules/uview-plus/libs/config/props/modal.js");
  79. require("../../../uni_modules/uview-plus/libs/config/props/navbar.js");
  80. require("../../../uni_modules/uview-plus/libs/config/color.js");
  81. require("../../../uni_modules/uview-plus/libs/config/props/noNetwork.js");
  82. require("../../../uni_modules/uview-plus/libs/config/props/noticeBar.js");
  83. require("../../../uni_modules/uview-plus/libs/config/props/notify.js");
  84. require("../../../uni_modules/uview-plus/libs/config/props/numberBox.js");
  85. require("../../../uni_modules/uview-plus/libs/config/props/numberKeyboard.js");
  86. require("../../../uni_modules/uview-plus/libs/config/props/overlay.js");
  87. require("../../../uni_modules/uview-plus/libs/config/props/parse.js");
  88. require("../../../uni_modules/uview-plus/libs/config/props/picker.js");
  89. require("../../../uni_modules/uview-plus/libs/config/props/popup.js");
  90. require("../../../uni_modules/uview-plus/libs/config/props/radio.js");
  91. require("../../../uni_modules/uview-plus/libs/config/props/radioGroup.js");
  92. require("../../../uni_modules/uview-plus/libs/config/props/rate.js");
  93. require("../../../uni_modules/uview-plus/libs/config/props/readMore.js");
  94. require("../../../uni_modules/uview-plus/libs/config/props/row.js");
  95. require("../../../uni_modules/uview-plus/libs/config/props/rowNotice.js");
  96. require("../../../uni_modules/uview-plus/libs/config/props/scrollList.js");
  97. require("../../../uni_modules/uview-plus/libs/config/props/search.js");
  98. require("../../../uni_modules/uview-plus/libs/config/props/section.js");
  99. require("../../../uni_modules/uview-plus/libs/config/props/skeleton.js");
  100. require("../../../uni_modules/uview-plus/libs/config/props/slider.js");
  101. require("../../../uni_modules/uview-plus/libs/config/props/statusBar.js");
  102. require("../../../uni_modules/uview-plus/libs/config/props/steps.js");
  103. require("../../../uni_modules/uview-plus/libs/config/props/stepsItem.js");
  104. require("../../../uni_modules/uview-plus/libs/config/props/sticky.js");
  105. require("../../../uni_modules/uview-plus/libs/config/props/subsection.js");
  106. require("../../../uni_modules/uview-plus/libs/config/props/swipeAction.js");
  107. require("../../../uni_modules/uview-plus/libs/config/props/swipeActionItem.js");
  108. require("../../../uni_modules/uview-plus/libs/config/props/swiper.js");
  109. require("../../../uni_modules/uview-plus/libs/config/props/swipterIndicator.js");
  110. require("../../../uni_modules/uview-plus/libs/config/props/switch.js");
  111. require("../../../uni_modules/uview-plus/libs/config/props/tabbar.js");
  112. require("../../../uni_modules/uview-plus/libs/config/props/tabbarItem.js");
  113. require("../../../uni_modules/uview-plus/libs/config/props/tabs.js");
  114. require("../../../uni_modules/uview-plus/libs/config/props/tag.js");
  115. require("../../../uni_modules/uview-plus/libs/config/props/text.js");
  116. require("../../../uni_modules/uview-plus/libs/config/props/textarea.js");
  117. require("../../../uni_modules/uview-plus/libs/config/props/toast.js");
  118. require("../../../uni_modules/uview-plus/libs/config/props/toolbar.js");
  119. require("../../../uni_modules/uview-plus/libs/config/props/tooltip.js");
  120. require("../../../uni_modules/uview-plus/libs/config/props/transition.js");
  121. require("../../../uni_modules/uview-plus/libs/config/props/upload.js");
  122. require("../../../uni_modules/uview-plus/libs/config/zIndex.js");
  123. require("../../../uni_modules/uview-plus/libs/function/platform.js");
  124. if (!Array) {
  125. const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
  126. const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  127. const _easycom_oneBtn2 = common_vendor.resolveComponent("oneBtn");
  128. const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup");
  129. (_easycom_up_navbar2 + _easycom_u_icon2 + _easycom_oneBtn2 + _easycom_up_popup2)();
  130. }
  131. const _easycom_up_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
  132. const _easycom_u_icon = () => "../../../uni_modules/uview-plus/components/u-icon/u-icon.js";
  133. const _easycom_oneBtn = () => "../../../components/oneBtn/oneBtn.js";
  134. const _easycom_up_popup = () => "../../../uni_modules/uview-plus/components/u-popup/u-popup.js";
  135. if (!Math) {
  136. (_easycom_up_navbar + _easycom_u_icon + notice + _easycom_oneBtn + _easycom_up_popup)();
  137. }
  138. const notice = () => "./comp/notice.js";
  139. const _sfc_main = {
  140. __name: "index",
  141. setup(__props) {
  142. const { imgUrl } = config_site_config.obj;
  143. const counterStore = store_index.userStore();
  144. console.log(counterStore.token);
  145. const show = common_vendor.ref(false);
  146. function authentication() {
  147. show.value = false;
  148. common_vendor.index.$u.route({
  149. url: "/pages/subPage/authentication/authentication"
  150. });
  151. }
  152. let params = common_vendor.ref({
  153. pageNo: 1,
  154. pageSize: 20
  155. });
  156. let noticeList = common_vendor.ref([]);
  157. async function getNoticeListFn() {
  158. const { data: res } = await config_api.getNoticeList(params);
  159. noticeList.value = res.list;
  160. }
  161. const myHouse = common_vendor.ref([]);
  162. async function getHousesFn() {
  163. if (!counterStore.token)
  164. return true;
  165. const { data: res } = await config_api.getHouses();
  166. myHouse.value = res;
  167. counterStore.upDateUseInfo("name", res.userName);
  168. }
  169. function goHome(url) {
  170. common_vendor.index.requestSubscribeMessage({
  171. tmplIds: ["OH_1gceM-m3EXRKOtjl_Hb1ymyC5zw8_Ag6LaFXV4Do", "AjD_oLafmKGO8X3YvDGl1qmITq_Q6bSFMDeygJNAIes"],
  172. success(res) {
  173. console.log("订阅成功: ", res);
  174. },
  175. fail(err) {
  176. console.log("订阅失败:", err);
  177. }
  178. });
  179. let token = counterStore.token;
  180. if (token) {
  181. common_vendor.index.$u.route({
  182. url
  183. });
  184. } else {
  185. common_vendor.index.$u.route({
  186. url: "/pages/subPage/login/login"
  187. });
  188. }
  189. }
  190. common_vendor.onPullDownRefresh(async () => {
  191. await getNoticeListFn();
  192. await getHousesFn();
  193. common_vendor.index.stopPullDownRefresh();
  194. });
  195. common_vendor.onShow(() => {
  196. getNoticeListFn();
  197. getHousesFn();
  198. });
  199. return (_ctx, _cache) => {
  200. return common_vendor.e({
  201. a: common_vendor.p({
  202. leftText: " ",
  203. title: "事务通",
  204. safeAreaInsetTop: false,
  205. autoBack: false,
  206. fixed: false
  207. }),
  208. b: common_vendor.unref(imgUrl) + "homebanner.png",
  209. c: common_vendor.o(($event) => goHome("/pages/subPage/authentication/authentication")),
  210. d: !common_vendor.unref(counterStore).token
  211. }, !common_vendor.unref(counterStore).token ? {
  212. e: common_vendor.p({
  213. name: "arrow-right"
  214. }),
  215. f: common_vendor.unref(imgUrl) + "homebanner3.png",
  216. g: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/login/login"))
  217. } : {}, {
  218. h: myHouse.value.length
  219. }, myHouse.value.length ? {
  220. i: common_vendor.f(myHouse.value, (item, index, i0) => {
  221. return {
  222. a: common_vendor.t(item.roomAddress),
  223. b: common_vendor.t(item.roomSize),
  224. c: index
  225. };
  226. }),
  227. j: common_vendor.unref(imgUrl) + "homebanner3.png"
  228. } : {}, {
  229. k: common_vendor.unref(imgUrl) + "homebanner2.png",
  230. l: common_vendor.o(($event) => goHome("/pages/subPage/ballots/ballotsList/ballotsList")),
  231. m: common_assets._imports_0,
  232. n: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/notice/notice")),
  233. o: common_vendor.p({
  234. list: common_vendor.unref(noticeList)
  235. }),
  236. p: common_vendor.o(authentication),
  237. q: common_vendor.p({
  238. text: "点击认证业主"
  239. }),
  240. r: common_vendor.o(($event) => show.value = false),
  241. s: common_vendor.p({
  242. show: show.value,
  243. mode: "center",
  244. round: 10,
  245. customStyle: {
  246. width: "90%"
  247. },
  248. closeable: true
  249. })
  250. });
  251. };
  252. }
  253. };
  254. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-184b8d5d"], ["__file", "D:/work/xinjiangMiniProgram/pages/tabbar/index/index.vue"]]);
  255. wx.createPage(MiniProgramPage);