chunk-0cf37cea.4ef0ae20.js 26 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0cf37cea"],{"082c":function(t,e,i){"use strict";var s=i("88b5"),n=i.n(s);n.a},"43ad":function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t){return{methods:{focus:function(){this.$refs[t].focus()}}}}},"5fa4":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"chatSet",staticClass:"r-view pub-scroll-box",on:{click:function(t){t.stopPropagation()}}},[i("div",{staticClass:"setting-top"},[i("div",{staticClass:"search-input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTxt,expression:"searchTxt"}],attrs:{type:"text",placeholder:t.$t("group.searchMember")},domProps:{value:t.searchTxt},on:{input:function(e){e.target.composing||(t.searchTxt=e.target.value)}}}),i("i",{staticClass:"el-icon-search"})]),t.isSearch?i("ul",{staticClass:"user-list pub-scroll-box"},[t._l(t.searchList,function(e,s){return[i("li",{key:s,staticClass:"list-item",on:{click:function(i){return t.$showOtherInfo(e.user_id)}}},[t.members[e.user_id]&&t.members[e.user_id].cover_photo?i("img",{staticClass:"avatar",attrs:{src:t.members[e.user_id]&&t.members[e.user_id].cover_photo,alt:""}}):i("div",{staticClass:"user-avatar avatar",class:"avatar_bg"+e.user_id%9,attrs:{title:e.nick_name,"data-name":t.members[e.user_id]&&t.members[e.user_id].nick_name&&t.members[e.user_id].nick_name.slice(0,2).toUpperCase()}}),i("span",{staticClass:"name"},[t._v(t._s(t.members[e.user_id]&&t.members[e.user_id].nick_name&&t.members[e.user_id].nick_name))])])]})],2):i("ul",{ref:"scrollWrap",staticClass:"user-list pub-scroll-box",class:{"height-limit":t.limitHeight}},[t.isAdmin||t.isCreator?i("li",{staticClass:"list-item",on:{click:function(e){return t.$showInvite(2)}}},[t._m(0),i("span",{staticClass:"name"},[t._v(t._s(t.$t("group.add")))])]):t._e(),t.isAdmin||t.isCreator?i("li",{staticClass:"list-item",on:{click:function(e){return t.$showInvite(3)}}},[t._m(1),i("span",{staticClass:"name"},[t._v(t._s(t.$t("group.delete")))])]):t._e(),t._l(t.membersArray,function(e,s){return[i("li",{key:s,staticClass:"list-item",on:{click:function(i){return t.$showOtherInfo(e.user_id)}}},[i("div",{staticClass:"avatar-box"},[t.members[e.user_id]&&t.members[e.user_id].cover_photo?i("img",{staticClass:"avatar",attrs:{src:t.members[e.user_id]&&t.members[e.user_id].cover_photo,alt:""}}):i("div",{staticClass:"user-avatar avatar",class:"avatar_bg"+e.user_id%9,attrs:{title:e.nick_name,"data-name":t.members[e.user_id]&&t.members[e.user_id].nick_name&&t.members[e.user_id].nick_name.slice(0,2).toUpperCase()}}),t.group.creator==e.user_id?i("i",{staticClass:"creator-icon"}):t.adminList.includes(Number(e.user_id))?i("i",{staticClass:"admin-icon el-icon-star-on"}):t._e()]),i("span",{staticClass:"name"},[t._v(t._s(e.nick_name))])])]})],2),t.group.userCounts>6?i("div",{staticClass:"show-all-btn",on:{click:t.handleShowAll}},[t._v("\n "+t._s(t.limitHeight?t.$t("group.showAll"):t.$t("group.hideAll"))+" "),i("i",{class:"el-icon-arrow-"+(t.limitHeight?"down":"up")})]):t._e()]),t.isAdmin||t.isCreator?i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.groupName")))]),t.isEdit?i("input",{directives:[{name:"model",rawName:"v-model",value:t.newGroupName,expression:"newGroupName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-full-input",attrs:{type:"text"},domProps:{value:t.newGroupName},on:{blur:t.handleTitleBlur,input:function(e){e.target.composing||(t.newGroupName=e.target.value)}}}):i("p",{staticClass:"text",on:{click:t.handleTitleFocus}},[t._v(t._s(t.group.groupName)),i("i",{staticClass:"el-icon-edit"})])]):t._e(),t.isAdmin||t.isCreator?i("div",{staticClass:"setting-item ext-avatar"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.setGroupAvatar")))]),i("p",{staticClass:"text cursor",on:{click:function(e){return t.$editGroupAvatar(t.group.coverPhoto)}}},[t.group.coverPhoto?i("img",{staticClass:"team-avatar",attrs:{src:t.group.coverPhoto,alt:""}}):i("span",{staticClass:"no-avatar"},[i("i",{staticClass:"el-icon-plus"})]),i("i",{staticClass:"el-icon-arrow-right team-arrow-icon"})])]):t._e(),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.groupPin")))]),t.isAdmin||t.isCreator?i("p",{staticClass:"text cursor",on:{click:t.handleOpenNotice}},[t._v(t._s(t.group.groupNotice)),i("i",{staticClass:"el-icon-edit"})]):[t.group.groupNotice?i("p",{staticClass:"text notice"},[t._v(t._s(t.group.groupNotice))]):i("p",{staticClass:"text notice"},[t._v(t._s(t.$t("group.noPin")))])]],2),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.groupInviteLink")))]),i("p",{staticClass:"text"},[t.isEditLink?[i("em",{staticClass:"edit-name-path"},[t._v(t._s(t.sharePath))]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.editShareName,expression:"editShareName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text",autofocus:""},domProps:{value:t.editShareName},on:{blur:t.handleLinkBlur,input:function(e){e.target.composing||(t.editShareName=e.target.value)}}})]:[i("a",{staticClass:"invite-link",attrs:{href:"javascript:"},on:{click:function(e){return t.copyLink(t.group.inviteUrl)}}},[t._v(t._s(t.sharePath+t.shareName))]),t.isAdmin||t.isCreator?i("span",{staticClass:"invite-editBtn",on:{click:t.handleLinkFocus}},[i("i",{staticClass:"el-icon-edit"})]):t._e()]],2)]),t.isAdmin||t.isCreator?i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.groupId")))]),i("p",{staticClass:"text"},[t._v("group_id: "+t._s(t.group.groupId))])]):t._e(),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.doNotDisturb")))]),i("p",{staticClass:"text"},[i("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:t.changeMute},model:{value:t.sessionInfo.is_mute,callback:function(e){t.$set(t.sessionInfo,"is_mute",e)},expression:"sessionInfo.is_mute"}})],1)]),i("div",{staticClass:"setting-item"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.topChat")))]),i("p",{staticClass:"text"},[i("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:t.changePin},model:{value:t.sessionInfo.is_pin,callback:function(e){t.$set(t.sessionInfo,"is_pin",e)},expression:"sessionInfo.is_pin"}})],1)]),t.isCreator?i("div",{staticClass:"setting-item cursor",on:{click:t.handleGroudMgr}},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.admin"))),i("i",{staticClass:"el-icon-arrow-right team-arrow-icon"})])]):t._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:t.group.isJoin,expression:"group.isJoin"}],staticClass:"setting-bottom"},[i("button",{staticClass:"delete-btn",on:{click:t.leaveGroup}},[t._v(t._s(t.$t("group.quitGroup")))])]),i("transition",{attrs:{name:"msgbox-fade"}},[t.editNotice?i("div",{staticClass:"pub-wrapper"},[i("div",{staticClass:"pub-mask"}),i("div",{staticClass:"pub-modal notice-modal"},[i("div",{staticClass:"modal-hd"},[i("div",{staticClass:"title"},[t._v(t._s(t.$t("group.groupPin")))]),i("i",{staticClass:"el-icon-close",on:{click:function(e){t.editNotice=!1}}})]),i("div",{staticClass:"modal-bd"},[i("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:t.newNotice,expression:"newNotice"}],attrs:{placeholder:t.$t("group.groupPinInput")},domProps:{value:t.newNotice},on:{input:function(e){e.target.composing||(t.newNotice=e.target.value)}}})]),i("div",{staticClass:"modal-fd"},[i("el-button",{attrs:{type:"primary"},on:{click:t.handleNotice}},[t._v(t._s(t.$t("public.confirm")))])],1)])]):t._e()])],1)},n=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"avatar btn"},[i("i",{staticClass:"el-icon-plus"})])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"avatar btn"},[i("i",{staticClass:"el-icon-minus"})])}],r=(i("948e"),i("3050"),i("68ca")),a=i.n(r),o=(i("3a23"),i("39ab"),i("c843")),c=i.n(o),u=i("6e6d"),h=i("bced");u["default"].component(c.a.name,c.a),u["default"].component(a.a.name,a.a);var l={name:"chatSet",mixins:[h["c"]],watch:{searchTxt:function(t,e){""==t?this.isSearch=!1:(this.isSearch=!0,this.searchUser())}}},d=l,p=(i("082c"),i("17cc")),m=Object(p["a"])(d,s,n,!1,null,"73d3c42c",null);e["default"]=m.exports},"68ca":function(t,e,i){t.exports=function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=99)}({0:function(t,e,i){"use strict";function s(t,e,i,s,n,r,a,o){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),s&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):n&&(c=o?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(u.functional){u._injectStyles=c;var h=u.render;u.render=function(t,e){return c.call(e),h(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}i.d(e,"a",function(){return s})},10:function(t,e){t.exports=i("9fb5")},19:function(t,e){t.exports=i("43ad")},3:function(t,e){t.exports=i("49b0")},99:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-switch",class:{"is-disabled":t.switchDisabled,"is-checked":t.checked},attrs:{role:"switch","aria-checked":t.checked,"aria-disabled":t.switchDisabled},on:{click:t.switchValue}},[i("input",{ref:"input",staticClass:"el-switch__input",attrs:{type:"checkbox",id:t.id,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:t.switchDisabled},on:{change:t.handleChange,keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.switchValue(e):null}}}),t.inactiveIconClass||t.inactiveText?i("span",{class:["el-switch__label","el-switch__label--left",t.checked?"":"is-active"]},[t.inactiveIconClass?i("i",{class:[t.inactiveIconClass]}):t._e(),!t.inactiveIconClass&&t.inactiveText?i("span",{attrs:{"aria-hidden":t.checked}},[t._v(t._s(t.inactiveText))]):t._e()]):t._e(),i("span",{ref:"core",staticClass:"el-switch__core",style:{width:t.coreWidth+"px"}}),t.activeIconClass||t.activeText?i("span",{class:["el-switch__label","el-switch__label--right",t.checked?"is-active":""]},[t.activeIconClass?i("i",{class:[t.activeIconClass]}):t._e(),!t.activeIconClass&&t.activeText?i("span",{attrs:{"aria-hidden":!t.checked}},[t._v(t._s(t.activeText))]):t._e()]):t._e()])},n=[];s._withStripped=!0;var r=i(3),a=i.n(r),o=i(19),c=i.n(o),u=i(10),h=i.n(u),l={name:"ElSwitch",mixins:[c()("input"),h.a,a.a],inject:{elForm:{default:""}},props:{value:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},width:{type:Number,default:40},activeIconClass:{type:String,default:""},inactiveIconClass:{type:String,default:""},activeText:String,inactiveText:String,activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},id:String},data:function(){return{coreWidth:this.width}},created:function(){~[this.activeValue,this.inactiveValue].indexOf(this.value)||this.$emit("input",this.inactiveValue)},computed:{checked:function(){return this.value===this.activeValue},switchDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},watch:{checked:function(){this.$refs.input.checked=this.checked,(this.activeColor||this.inactiveColor)&&this.setBackgroundColor(),this.validateEvent&&this.dispatch("ElFormItem","el.form.change",[this.value])}},methods:{handleChange:function(t){var e=this,i=this.checked?this.inactiveValue:this.activeValue;this.$emit("input",i),this.$emit("change",i),this.$nextTick(function(){e.$refs.input.checked=e.checked})},setBackgroundColor:function(){var t=this.checked?this.activeColor:this.inactiveColor;this.$refs.core.style.borderColor=t,this.$refs.core.style.backgroundColor=t},switchValue:function(){!this.switchDisabled&&this.handleChange()},getMigratingConfig:function(){return{props:{"on-color":"on-color is renamed to active-color.","off-color":"off-color is renamed to inactive-color.","on-text":"on-text is renamed to active-text.","off-text":"off-text is renamed to inactive-text.","on-value":"on-value is renamed to active-value.","off-value":"off-value is renamed to inactive-value.","on-icon-class":"on-icon-class is renamed to active-icon-class.","off-icon-class":"off-icon-class is renamed to inactive-icon-class."}}}},mounted:function(){this.coreWidth=this.width||40,(this.activeColor||this.inactiveColor)&&this.setBackgroundColor(),this.$refs.input.checked=this.checked}},d=l,p=i(0),m=Object(p["a"])(d,s,n,!1,null,null,null);m.options.__file="packages/switch/src/component.vue";var f=m.exports;f.install=function(t){t.component(f.name,f)};e["default"]=f}})},"88b5":function(t,e,i){},"948e":function(t,e,i){},bced:function(t,e,i){"use strict";i.d(e,"c",function(){return f}),i.d(e,"b",function(){return g}),i.d(e,"a",function(){return v});i("7e48"),i("3050");var s=i("a619"),n=i.n(s),r=(i("f91a"),i("0da4"),i("03a8")),a=i.n(r),o=(i("612f"),i("f10e"),i("4453"),i("ee95")),c=i("3f47"),u=i("5975"),h=i("52c1"),l=i("33f8"),d=i("8869"),p=i("c1f9"),m=i.n(p),f={computed:Object(c["a"])({},Object(h["e"])({myId:function(t){return t.userId},group:function(t){return t.group},curGroupId:function(t){return t.curSession},members:function(t){return t.group.members},sessionInfo:function(t){return t.group.sessionInfo},shareName:function(t){return t.group.shareName},adminList:function(t){return t.group.adminList},membersArray:function(t){return t.group.membersArray}}),{isAdmin:function(){return this.members&&this.members[this.myId]&&1==this.members[this.myId].is_admin},isCreator:function(){return this.group.creator==this.myId},isPrivate:function(){return this.$store.getters.isPrivate}}),mounted:function(){var t=this,e=this.$route.params.id;this.changeSessionId(e),this.isPrivate||this.group.groupId||(this.initGroup({userId:this.myId,groupId:e,useCache:!1}),this.getGroupInfo()),document.addEventListener("click",function(){if(t.$refs.chatSet){var e=t.$refs.chatSet.getAttribute("class");e.indexOf("move-left")>-1&&t.$emit("showCharSet",0)}})},data:function(){return{msgPush:!1,msgTop:!1,limitHeight:!0,isEdit:!1,newGroupName:"",newLink:"",newNotice:"",isEditLink:!1,editNotice:!1,editShareName:"",sharePath:"".concat(location.origin,"/s/"),isSearch:!1,searchList:[],searchTxt:"",meechatType:Object(l["o"])()}},methods:Object(c["a"])({},Object(h["d"])(["initGroup","changeSessionId","changeHotGroupStatus","removeSessionListById"]),Object(h["b"])(["updateSessionItem","getGroupInfo"]),{handleTitleBlur:function(){var t=this;this.isEdit=!1,this.newGroupName.length&&u["a"].group.changeTitle({group_id:this.curGroupId,title:this.newGroupName}).then(function(e){e.data;t.updateSessionItem({sessionId:t.curGroupId,data:{name:t.newGroupName}}),t.$store.commit("updateGroup",{key:"groupName",data:t.newGroupName})})},handleTitleFocus:function(){this.isEdit=!0,this.newGroupName=this.group.groupName},handleShowAll:function(){this.limitHeight||(this.$refs.scrollWrap.scrollTop=0),this.limitHeight=!this.limitHeight},handleLinkBlur:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(this.isEditLink=!1,!this.editShareName.match(/^\d{1,}$/)){t.next=4;break}return this.$showTips("分享链接不能是纯数字"),t.abrupt("return");case 4:if(this.editShareName.match(/^(\w|.){1,}$/)){t.next=7;break}return this.$showTips("分享链接只能是英文字母,数字和 . 的组合"),t.abrupt("return");case 7:return t.next=9,Object(l["f"])("分享链接只能被修改一次,确认修改为:".concat(this.sharePath+this.editShareName),"提示").catch(function(t){});case 9:u["a"].group.changeName({group_id:this.curGroupId,name:this.editShareName}).then(function(){e.$store.commit("updateGroup",{key:"shareName",data:e.editShareName})});case 10:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),handleLinkFocus:function(){this.isEditLink=!0,this.editShareName=this.shareName},handleNotice:function(){var t=this;u["a"].group.changeNotice({group_id:this.curGroupId,notice:this.newNotice}).then(function(){t.$showTips("修改成功"),t.editNotice=!1,t.$store.commit("updateGroup",{key:"groupNotice",data:t.newNotice})})},handleGroudMgr:function(){this.$emit("handleShowGroudMgr",1)},handleOpenNotice:function(){this.editNotice=!0,this.newNotice=this.group.groupNotice},copyLink:function(t){var e=this,i=document.location.protocol+t;this.$copyText(i).then(function(t){e.$showTips("复制成功")})},changePin:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(e){var i,s,n,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return i=1==e?"setPin":"cancelPin",s=1==e?"updateSessionListByPin":"cancelSessionListByPin",t.next=4,u["a"].session[i]({session_id:this.curGroupId});case 4:n=t.sent,r=n.data.data,this.$store.commit("updatePin",e),this.$store.commit(s,{session_id:this.curGroupId,is_pin:r.is_pin,pin_time_int:r.pin_time_int});case 8:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),changeMute:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(e){var i,s;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return i=1==e?"setMute":"cancelMute",s=1==e?"updateSessionListByMute":"cancelSessionListByMute",t.next=4,u["a"].session[i]({session_id:this.curGroupId});case 4:this.$store.commit("updateMute",e),this.$store.commit(s,this.curGroupId);case 6:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),leaveGroup:function(){var t=this;Object(l["f"])(this.$t("group.leaveComfirm")).then(function(){t.$emit("showLoadingRoom",!0),u["a"].group.leaveGroup({group_id:t.curGroupId}).then(function(){t.changeHotGroupStatus({groupId:t.curGroupId,isJoin:0}),t.removeSessionListById(t.curGroupId),t.$showTips(t.$t("group.leaveTip")),t.$emit("showLoadingRoom",!1),t.$store.commit("updateJoin",!1),"h5"==t.meechatType&&t.$router.go(-2)}).catch(function(){t.$emit("showLoadingRoom",!1)})})},searchUser:function(){var t=this;if(this.searchTxt.trim())if(this.membersArray.length<this.group.membersNum)u["a"].group.searchMember({group_id:this.group.groupId,keyword:this.searchTxt}).then(function(e){var i=e.data;t.searchList=i.data});else{var e=this.searchTxt;this.searchList=this.membersArray.filter(function(t){var i,s;return i=!!t.user_name&&t.user_name.indexOf(e)>-1,s=!!t.nick_name&&t.nick_name.indexOf(e)>-1,i||s})}}})},g={mixins:[d["e"]],data:function(){return{curItemIndex:0,checkList:[],groupName:"",isLoading:!1,showNum:0,meechatType:Object(l["o"])()}},computed:Object(c["a"])({checkedNum:function(){return this.checkList.filter(function(t){return t.isChecked}).length}},Object(h["e"])({userId:function(t){return t.userId},friendList:function(t){return t.chat.friendList},groupId:function(t){return t.group.groupId},group:function(t){return t.group},members:function(t){return t.group.members},membersArray:function(t){return t.group.membersArray},membersNum:function(t){return t.group.membersNum},adminList:function(t){return t.group.adminList}}),{inviteList:function(){return this.checkList.filter(function(t){return t.isChecked}).map(function(t){return t.user_id}).join(",")},resultList:function(){return this.checkList&&this.checkList.filter(function(t){return t.isChecked})||[]}}),methods:Object(c["a"])({},Object(h["b"])(["getGroupInfo"]),Object(h["d"])(["initGroup","changeSessionId"]),{getItemByUid:function(t){var e=this;return this.checkList.filter(function(i,s){return i.user_id==t&&(e.curItemIndex=s),i.user_id==t})[0]},changeState:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.getItemByUid(t);i.isChoosed||(4==this.inviteType&&e&&this.adminList.length+this.checkedNum>5?this.$showTips(this.$t("group.groupMgrMostTips")):(5==this.inviteType&&this.checkList.forEach(function(t){t.isChecked=!1}),i["isChecked"]=e,this.$set(this.checkList,this.curItemIndex,i)))},changeStateForH5:function(t){var e=this.getItemByUid(t),i=!e.isChecked;4==this.inviteType&&i&&this.adminList.length+this.checkedNum>5?this.$showTips(this.$t("group.groupMgrMostTips")):(5==this.inviteType&&this.checkList.forEach(function(t){t.isChecked=!1}),e["isChecked"]=i,this.$set(this.checkList,this.curItemIndex,e))},initList:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:t.t0=this.inviteType,t.next=1===t.t0?3:2===t.t0?3:3===t.t0?7:4===t.t0?7:5===t.t0?7:9;break;case 3:return t.next=5,this.$store.dispatch("getFriendList");case 5:return this.checkList=this.friendList,t.abrupt("break",9);case 7:return this.checkList=this.membersArray,t.abrupt("break",9);case 9:this.checkList=m.a.filter(this.checkList,function(t){if(t.isChecked=!1,t.isChoosed=!1,t.isShow=!0,2==e.inviteType){var i=e.membersArray.some(function(e){return e.user_id==t.user_id});return!i}return 4==e.inviteType&&1==t.is_admin&&(t.isChoosed=!0),t.user_id!=e.userId}),this.showNum=this.checkList.length;case 11:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),optSubmit:function(){switch(this.inviteType){case 1:this.createGroup();break;case 2:this.invitesMember();break;case 3:this.removesMember();break;case 4:this.addAdmin();break;case 5:this.changeCreator();break;case 6:this.createGroup();break}},createGroup:function(){var t=this;this.groupName.length>16?this.$showTips(this.$t("group.groupNameLengthTips")):this.groupName?(this.isLoading=!0,u["a"].group.createGroup({group_title:this.groupName,user_id_list:this.inviteList}).then(function(e){var i=e.data,s=i.data.session_id;t.$showTips(t.$t("group.createSuccess")),t.$store.commit("addSessionItem",i.data),t.ext&&t.ext.tgGroupId?t.doSyncTelegram(s):t.$router.push("/group/".concat(s)),"h5"!=t.meechatType&&t.hidePopup()})):a()({message:this.$t("group.groupNameTips"),type:"warning"})},doSyncTelegram:function(t){var e=this;u["a"].tg.doSync({group_id:t,tg_group_id:this.ext.tgGroupId}).then(function(){e.$router.replace("/group/".concat(t))}).catch(function(t){console.log(t),"h5"==e.meechatType&&e.$router.replace("/")})},invitesMember:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.next=3,u["a"].group.invites({user_ids:this.inviteList,group_id:this.groupId});case 3:return t.next=5,this.getGroupInfo();case 5:"h5"==this.meechatType?this.$router.go(-1):this.hidePopup();case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),removesMember:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.next=3,u["a"].group.removes({user_ids:this.inviteList,group_id:this.groupId});case 3:return t.next=5,this.getGroupInfo();case 5:"h5"==this.meechatType?this.$router.go(-1):this.hidePopup();case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),addAdmin:function(){var t=this;this.isLoading=!0,u["a"].group.addAdmin({user_ids:this.inviteList,group_id:this.groupId}).then(function(e){e.data;t.getGroupInfo(),"h5"==t.meechatType?t.$router.go(-1):t.hidePopup()})},changeCreator:function(){var t=this;if(!(this.checkedNum<=0)){var e=this.checkList[this.curItemIndex],i=e.nick_name||e.user_name;n.a.confirm("".concat(this.$t("group.groupMgrComfime")," ").concat(i)).then(function(){t.isLoading=!0,u["a"].group.changeCreator({new_creator:t.inviteList,group_id:t.groupId}).then(function(e){e.data;"h5"==t.meechatType?t.$router.go(-1):t.hidePopup(),t.$store.dispatch("getGroupInfo"),a()({message:"".concat(t.$t("group.groupMgrResult")," ").concat(i),type:"warning"})})}).catch(function(t){console.log(t)})}}}),mounted:function(){this.initList()}},v={props:{searchTxt:String},data:function(){return{}},components:{},computed:Object(c["a"])({},Object(h["e"])(["hotList"]),{showHotList:function(){var t=this.searchTxt&&this.searchTxt.trim();if(!t)return this.hotList;var e=this.hotList.filter(function(e){var i=e.group_title&&e.group_title.toLocaleLowerCase()||"";return i.match(t)});return e}}),methods:Object(c["a"])({},Object(h["d"])(["changeHotGroupStatus"]),{bgColorNum:function(t){return Object(l["l"])(t,this.userId)},joinGroup:function(t,e){var i=this;1==e?this.$router.push("/group/".concat(t)):u["a"].group.joinGroup({group_id:t}).then(function(){i.changeHotGroupStatus({groupId:t,isJoin:1}),i.$router.push("/group/".concat(t))})}}),mounted:function(){this.$store.commit("changeSessionId","0"),this.$store.dispatch("getHotList")}}}}]);