import{_ as t,z as a,l as o,s,G as i,q as n,o as e,c,w as r,j as d,g as p,i as u,t as l,r as g,y as h,A as f}from"./index-22d2df30.js";a("userInfo");const _=o(s);const m=t({data:()=>({contact:{},group_id:0}),onLoad(t){this.group_id=t.group_id?t.group_id:"",this.getGroupInfo()},methods:{getGroupInfo(){this.$api.msgApi.groupInfo({group_id:this.group_id}).then((t=>{let a=t.data;this.contact=a}))},applyGroup(){if(0==this.contact.setting.invite)return i({title:"该群聊已经关闭加群申请",icon:"none"});this.$api.msgApi.joinGroup({group_id:this.group_id,inviteUid:this.contact.inviteUid}).then((t=>{0==t.code&&(this.contact.is_group=1,_.appendContacts(this.contact),this.openChat())}))},openChat(){n({url:"/pages/message/chat?id="+this.group_id})}}},[["render",function(t,a,o,s,i,n){const _=g("cu-custom"),m=h,x=d,C=f;return e(),c(x,null,{default:r((()=>[p(_,{bgColor:"bg-gradual-green",isBack:!0},{backText:r((()=>[])),content:r((()=>[u("群信息")])),_:1}),p(x,{align:"center",class:"groupInfo"},{default:r((()=>[p(m,{src:i.contact.avatar,mode:"widthFix",style:{width:"120px",height:"120px","border-radius":"12rpx"}},null,8,["src"]),p(x,{class:"f-14 mt-10"},{default:r((()=>[u(l(i.contact.name)+" ("+l(i.contact.groupUserCount)+") ",1)])),_:1})])),_:1}),i.contact.isJoin?(e(),c(x,{key:1,class:"padding flex flex-direction mt-10"},{default:r((()=>[p(C,{class:"cu-btn bg-green lg",onClick:n.openChat},{default:r((()=>[u(" 进入聊天 ")])),_:1},8,["onClick"])])),_:1})):(e(),c(x,{key:0,class:"padding flex flex-direction mt-10"},{default:r((()=>[p(C,{class:"cu-btn bg-green lg",onClick:n.applyGroup},{default:r((()=>[u(" 加入群聊 ")])),_:1},8,["onClick"])])),_:1}))])),_:1})}],["__scopeId","data-v-802f94e3"]]);export{m as default};