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.

279 lines
14 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
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 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 {
  143. imgUrl,
  144. tmplIds
  145. } = config_site_config.obj;
  146. const counterStore = store_index.userStore();
  147. console.log(counterStore.token);
  148. const show = common_vendor.ref(false);
  149. let params = common_vendor.ref({
  150. pageNo: 1,
  151. pageSize: 20
  152. });
  153. let noticeList = common_vendor.ref([]);
  154. async function getNoticeListFn() {
  155. const {
  156. data: res
  157. } = await config_api.getNoticeList(params);
  158. noticeList.value = res.list;
  159. }
  160. const myHouse = common_vendor.ref([]);
  161. async function getHousesFn() {
  162. if (!counterStore.token)
  163. return true;
  164. const {
  165. data: res
  166. } = await config_api.getHouses();
  167. if (!res.length) {
  168. show.value = true;
  169. return;
  170. }
  171. myHouse.value = res;
  172. counterStore.upDateUseInfo("myHouse", res);
  173. }
  174. function goSever(url) {
  175. if (!myHouse.value)
  176. return;
  177. goHome(url);
  178. }
  179. async function goHome(url) {
  180. if (show.value)
  181. show.value = false;
  182. let token = counterStore.token;
  183. if (token) {
  184. const openId = counterStore.loginInfo.openId;
  185. common_vendor.index.requestSubscribeMessage({
  186. tmplIds,
  187. async success(res) {
  188. let acceptArr = [];
  189. tmplIds.forEach((item) => {
  190. if (res[item] == "accept") {
  191. acceptArr.push(item);
  192. }
  193. });
  194. console.log("订阅成功: ", acceptArr);
  195. if (!acceptArr.length)
  196. return;
  197. await config_api.appletSubscribe({ openId, templateIds: acceptArr });
  198. },
  199. fail(err) {
  200. console.log("订阅失败:", err);
  201. },
  202. complete() {
  203. common_vendor.index.$u.route({
  204. url
  205. });
  206. }
  207. });
  208. } else {
  209. common_vendor.index.$u.route({
  210. url: "/pages/subPage/login/login"
  211. });
  212. }
  213. }
  214. common_vendor.onPullDownRefresh(async () => {
  215. await getNoticeListFn();
  216. await getHousesFn();
  217. common_vendor.index.stopPullDownRefresh();
  218. });
  219. common_vendor.onShow(() => {
  220. getNoticeListFn();
  221. getHousesFn();
  222. });
  223. return (_ctx, _cache) => {
  224. return common_vendor.e({
  225. a: common_vendor.p({
  226. leftText: " ",
  227. title: "事务通",
  228. safeAreaInsetTop: false,
  229. autoBack: false,
  230. fixed: false
  231. }),
  232. b: common_vendor.unref(imgUrl) + "homebanner.png",
  233. c: common_vendor.o(($event) => goHome("/pages/subPage/authentication/authentication")),
  234. d: !common_vendor.unref(counterStore).token
  235. }, !common_vendor.unref(counterStore).token ? {
  236. e: common_vendor.p({
  237. name: "arrow-right"
  238. }),
  239. f: common_vendor.unref(imgUrl) + "homebanner3.png",
  240. g: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/login/login"))
  241. } : {}, {
  242. h: myHouse.value.length
  243. }, myHouse.value.length ? {
  244. i: common_vendor.f(myHouse.value, (item, index, i0) => {
  245. return {
  246. a: common_vendor.t(item.roomAddress),
  247. b: common_vendor.t(item.roomSize),
  248. c: index
  249. };
  250. }),
  251. j: common_vendor.unref(imgUrl) + "homebanner3.png"
  252. } : {}, {
  253. k: common_vendor.unref(imgUrl) + "homebanner2.png",
  254. l: common_vendor.o(($event) => goSever("/pages/subPage/ballots/ballotsList/ballotsList")),
  255. m: common_assets._imports_0,
  256. n: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/notice/notice")),
  257. o: common_vendor.p({
  258. list: common_vendor.unref(noticeList)
  259. }),
  260. p: common_vendor.o(($event) => goHome("/pages/subPage/authentication/authentication")),
  261. q: common_vendor.p({
  262. text: "点击认证业主"
  263. }),
  264. r: common_vendor.o(($event) => show.value = false),
  265. s: common_vendor.p({
  266. show: show.value,
  267. mode: "center",
  268. round: 10,
  269. customStyle: {
  270. width: "90%"
  271. },
  272. closeable: true
  273. })
  274. });
  275. };
  276. }
  277. };
  278. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-184b8d5d"], ["__file", "D:/work/xinjiangMiniProgram/pages/tabbar/index/index.vue"]]);
  279. wx.createPage(MiniProgramPage);