"use strict";const e=require("../vendor.js");require("./request.js");const o=require("../store/useWeAppAuthStore.js"),n=require("../store/useWorkStore.js"),i=o.useWeAppAuthStore(),l=n.useWorkStore();exports.getIsHouseExist=o=>{var n,t,u,s,d,r,a;return(null==(n=null==i?void 0:i.data)?void 0:n.user)?!(null==(t=null==i?void 0:i.data)?void 0:t.selected_house)&&(null==(u=null==i?void 0:i.data)?void 0:u.house_occupant)?(l.selectedHouse+=1,e.index.switchTab({url:"/pages/index/index"}),!1):!(null==o?void 0:o.is_bind_house)||((null==(s=null==i?void 0:i.data)?void 0:s.house_occupant)||(null==(d=null==i?void 0:i.data)?void 0:d.house_register)?(console.log("已绑定房屋",null==i?void 0:i.data),!(!(null==(r=null==i?void 0:i.data)?void 0:r.house_occupant)&&(null==(a=null==i?void 0:i.data)?void 0:a.house_register))||(e.index.showModal({title:"提示",cancelText:"继续绑定",content:"有房屋还在审核中！",confirmText:"去查看",confirmColor:"#0082FA",success:function(o){o.confirm?(e.index.navigateTo({url:"/INDEX/owner_audit_list/index?type=1"}),console.log("用户点击确定")):o.cancel&&(e.index.navigateTo({url:"/INDEX/binding/index"}),console.log("用户点击取消"))}}),!1)):(e.index.showModal({title:"提示",content:"未绑定房屋，请先绑定房屋！",confirmText:"去绑定",confirmColor:"#0082FA",success:function(o){o.confirm?(e.index.navigateTo({url:"/INDEX/binding/index"}),console.log("用户点击确定")):o.cancel&&console.log("用户点击取消")}}),!1)):(e.index.navigateTo({url:"/pages/login"}),!1)};
