pages-message-group-info.d8bcccc7.js 1.8 KB

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