"use strict"; const common_vendor = require("../../../common/vendor.js"); const common_libraries_apiLoading = require("../../../common/libraries/apiLoading.js"); const gen_Apis = require("../../../gen/Apis.js"); require("../../../common/libraries/request.js"); const common_store_useWeAppAuthStore = require("../../../common/store/useWeAppAuthStore.js"); require("../../../common/store/useWorkStore.js"); if (!Array) { const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button"); const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons"); const _easycom_hs_popup_custom2 = common_vendor.resolveComponent("hs-popup-custom"); (_easycom_hs_button2 + _easycom_uni_icons2 + _easycom_hs_popup_custom2)(); } const _easycom_hs_button = () => "../../../components/hs-button/hs-button.js"; const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js"; const _easycom_hs_popup_custom = () => "../../../components/hs-popup-custom/hs-popup-custom.js"; if (!Math) { (_easycom_hs_button + _easycom_uni_icons + _easycom_hs_popup_custom)(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "ModalServer", setup(__props) { const auth = common_store_useWeAppAuthStore.useWeAppAuthStore(); const show_bangding_house = common_vendor.ref(false); const show_review_house = common_vendor.ref(false); const hadnleNewBindingHouse = (url) => { common_vendor.index.navigateTo({ url: url || "" }); }; const handleClosePopup = () => { show_bangding_house.value = false; show_review_house.value = false; }; common_vendor.onHide(() => { handleClosePopup(); }); const handleSelectResidentialRelation = () => { common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Archive.HouseRegisters.GetOwnerIsAudit, {}).then((res) => { if (res == null ? void 0 : res.data) { show_review_house.value = true; } console.log(res); }); }; common_vendor.watch( () => { var _a; return (_a = auth == null ? void 0 : auth.data) == null ? void 0 : _a.is_house_exist; }, () => { var _a, _b, _c, _d; if (((_a = auth == null ? void 0 : auth.data) == null ? void 0 : _a.user) && !((_b = auth == null ? void 0 : auth.data) == null ? void 0 : _b.house_occupant) && !((_c = auth == null ? void 0 : auth.data) == null ? void 0 : _c.house_register)) { show_bangding_house.value = true; } console.log((_d = auth == null ? void 0 : auth.data) == null ? void 0 : _d.house_occupant, "house_occupant2"); }, { deep: true } ); common_vendor.watch( () => { var _a; return (_a = auth == null ? void 0 : auth.data) == null ? void 0 : _a.user; }, () => { var _a, _b; if (((_a = auth == null ? void 0 : auth.data) == null ? void 0 : _a.user) && ((_b = auth == null ? void 0 : auth.data) == null ? void 0 : _b.selected_house)) ; }, { deep: true } ); common_vendor.onShow(async () => { var _a, _b, _c; await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched); if (((_b = auth == null ? void 0 : auth.data) == null ? void 0 : _b.user) && ((_c = auth == null ? void 0 : auth.data) == null ? void 0 : _c.selected_house)) { handleSelectResidentialRelation(); } }); return (_ctx, _cache) => { return { a: common_vendor.o(($event) => hadnleNewBindingHouse("/INDEX/binding/index")), b: common_vendor.p({ label: "前往入住登记", size: "md", type: "primary" }), c: common_vendor.o(handleClosePopup), d: common_vendor.p({ type: "close", size: "35", color: "#fff" }), e: common_vendor.o(handleClosePopup), f: common_vendor.p({ show: show_bangding_house.value, mode: "center", title: "入住登记提醒" }), g: common_vendor.o(($event) => hadnleNewBindingHouse("/INDEX/owner_audit_list/index")), h: common_vendor.p({ label: "前往审核", size: "md", type: "primary" }), i: common_vendor.o(handleClosePopup), j: common_vendor.p({ type: "close", size: "35", color: "#fff" }), k: common_vendor.o(handleClosePopup), l: common_vendor.p({ show: show_review_house.value, mode: "center", title: "住户审核通知" }) }; }; } }); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2231cc67"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/pages/index/components/ModalServer.vue"]]); wx.createComponent(Component);