chunk-652c94c5.26be4173.js 7.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-652c94c5"],{"3e04":function(t,e,s){"use strict";var i=s("646e"),n=s.n(i);n.a},4956:function(t,e,s){"use strict";var i=s("efe2"),n=s.n(i);n.a},"4d7a":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"hot-group"},[s("div",{staticClass:"top-search"},[t.searchShow?s("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTxt,expression:"searchTxt"},{name:"focus",rawName:"v-focus"}],staticClass:"search-wrap",attrs:{type:"text"},domProps:{value:t.searchTxt},on:{input:[function(e){e.target.composing||(t.searchTxt=e.target.value)},function(e){return t.searchUser(e,t.sessionList)}],blur:t.handleBlur}}):s("div",{staticClass:"search-tips search-wrap",on:{click:function(e){t.searchShow=!0}}},[s("i",{staticClass:"el-icon-search"}),t._v(t._s(t.$t("public.searchHotGroup"))+"\n ")]),s("span",{on:{click:function(e){return t.$router.go(-1)}}},[t._v(t._s(t.$t("public.cancel")))])]),t.isSearch?t._l(t.searchList,function(t,e){return s("session-item",{key:e,staticClass:"current",attrs:{item:t}})}):t._e(),s("div",{staticClass:"hot-list"},[s("hot-group",{attrs:{searchTxt:t.searchTxt}})],1)],2)},n=[],a=s("3f47"),o=(s("3a23"),s("39ab"),s("3050"),s("c843")),r=s.n(o),c=s("6e6d"),u=s("52c1"),m=s("8869"),l=s("57d1"),h=s("1749");c["default"].component(r.a.name,r.a);var p={name:"searchH5",mixins:[m["f"]],components:{sessionItem:l["a"],hotGroup:h["default"]},data:function(){return{searchShow:!1,searchTxt:""}},computed:Object(a["a"])({},Object(u["e"])({sessionList:function(t){return t.chat.sessionList}})),methods:{handleBlur:function(t){var e=t.target.value;e||(this.searchShow=!1)}},created:function(){}},_=p,d=(s("4956"),s("17cc")),f=Object(d["a"])(_,i,n,!1,null,"78551c0b",null);e["default"]=f.exports},"57d1":function(t,e,s){"use strict";var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"pub-chat-item",class:{current:t.item.session_id==t.curSession,top:1==t.item.is_pin},on:{click:function(e){return t.changeSessionId(t.item)},contextmenu:function(e){return e.preventDefault(),t.onToolBtn(e)}}},[s("div",{staticClass:"avatar-wrap"},[t.item.unread>0&&1==t.item.is_mute?s("i",{staticClass:"mute mute-point"}):t.item.unread>0&&0==t.item.is_mute?s("i",{staticClass:"mute mute-num"},[t._v(t._s(t.item.unread))]):t._e(),t.item.cover_photo?s("img",{staticClass:"user-avatar",attrs:{src:t.item.cover_photo,alt:""}}):s("div",{staticClass:"user-avatar",class:"avatar_bg"+t.bgColorNum(t.item.session_id),attrs:{"data-name":t.item.name&&t.item.name.slice(0,2).toUpperCase()}}),1==t.item.is_auth?s("i",{staticClass:"icon-auth"}):t._e()]),s("div",{staticClass:"info"},[s("h3",[1==t.item.is_group?s("i",{staticClass:"icon-group"}):t._e(),s("span",[t._v(t._s(t.item.name))])]),s("p",[t.item.unread>0&&1==t.item.is_mute?s("span",[t._v("["+t._s(t.item.unread)+t._s(t.$t("public.item"))+"]")]):t._e(),t.item.last_msg?[5==t.item.last_msg.msg_type?["grab_redpack"==t.item.last_msg.event_type?[t._v("\n "+t._s((t.userInfo&&t.userInfo.user_id)==t.item.last_msg.from?t.$t("public.you"):t.item.last_msg.nick_name)+" "+t._s(t.$t("redPacket.receiveRedpack"))+"\n ")]:"join"==t.item.last_msg.event_type?[t._v("\n "+t._s((t.userInfo&&t.userInfo.user_id)==t.item.last_msg.from?t.$t("public.you"):t.item.last_msg.nick_name)+" "+t._s(t.$t("chat.joinGroup"))+"\n ")]:t._e()]:t.item.is_group?[t._v("\n "+t._s(t.item.last_msg.nick_name)+":"+t._s(0===t.item.last_msg.msg_type?t.item.cont:-1===t.item.last_msg.msg_type?t.$t("chat.revokeMsg"):"["+t.$t("chat.msgType["+(t.item.last_msg.msg_type-1)+"]")+"]")+"\n ")]:[t._v("\n "+t._s(0===t.item.last_msg.msg_type?t.item.cont:-1===t.item.last_msg.msg_type?""+(t.userId==t.item.last_msg.from?t.$t("public.you"):t.item.last_msg.nick_name)+t.$t("chat.revokeMsg"):"["+t.$t("chat.msgType["+(t.item.last_msg.msg_type-1)+"]")+"]")+"\n ")]]:t._e()],2),s("span",{staticClass:"time"},[t._v(t._s(t.handleUpdate(t.item.update_time_int)))]),1==t.item.is_mute?s("i",{staticClass:"icon-mute"}):t._e()]),t.item.session_id?s("ul",{directives:[{name:"show",rawName:"v-show",value:t.showToolbar,expression:"showToolbar"}],staticClass:"pub-pop-toolbar ext-session",style:{left:t.toolBarLeft,top:t.toolBarTop}},[s("li",{on:{click:function(e){return e.stopPropagation(),t.changePin(t.item.session_id,t.item.is_pin)}}},[t._v(t._s(1==t.item.is_pin?""+t.$t("public.cancel")+t.$t("chat.sticky"):t.$t("chat.sticky")))]),s("li",{on:{click:function(e){return e.stopPropagation(),t.changeMute(t.item.session_id,t.item.is_mute)}}},[t._v(t._s(1==t.item.is_mute?t.$t("group.cancelDisturb"):t.$t("group.doNotDisturb")))]),s("li",{on:{click:function(e){return e.stopPropagation(),t.delSession(t.item.session_id)}}},[t._v(t._s(t.$t("chat.deleteSession")))])]):t._e()])},n=[],a=(s("4453"),s("ee95")),o=s("3f47"),r=s("52c1"),c=s("5975"),u=s("33f8"),m={name:"msgItem",props:{item:{type:Object}},data:function(){return{toolBarLeft:0,toolBarTop:0,showToolbar:!1,meechatType:Object(u["n"])()}},computed:Object(o["a"])({},Object(r["e"])(["curSession","userId"]),{userInfo:function(){return this.$store.state.userInfo}}),methods:{changeSessionId:function(t){var e=1==t.is_group?"/group/".concat(t.session_id):"/pm/".concat(t.session_id);this.$router.push({path:e})},bgColorNum:function(t){return Object(u["k"])(t,this.userId)},hideToolbar:function(t){!1!==this.showToolbar&&(this.showToolbar=!1,document.body.removeEventListener("click",this.hideToolbar,!1),document.body.removeEventListener("contextmenu",this.hideToolbar,!1))},getPagePos:function(t){var e=t,s=0,i=0;while(!/pub-chat-item/gi.test(e.getAttribute("class")))e=e.offsetParent;while(null!=e)s+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{actualX:s,actualY:i}},onToolBtn:function(t){var e=this;if(this.showToolbar)this.hideToolbar(t);else{var s="h5"==this.meechatType?window.innerWidth:276,i=100,n=this.getPagePos(t.target),a=n.actualX,o=t.pageX,r=o-a,c=s-i-20;this.toolBarLeft="".concat(r<c?r:c,"px"),setTimeout(function(){document.body.addEventListener("click",e.hideToolbar,!1),document.body.addEventListener("contextmenu",e.hideToolbar,!1)},0),this.showToolbar=!0}},changePin:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(e,s){var i,n,a,o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return i=0==s?"setPin":"cancelPin",n=0==s?"updateSessionListByPin":"cancelSessionListByPin",t.next=4,c["a"].session[i]({session_id:e});case 4:a=t.sent,o=a.data.data,this.$store.commit("updatePin",s),this.hideToolbar(),this.$store.commit(n,{session_id:e,is_pin:o.is_pin,pin_time_int:o.pin_time_int});case 9:case"end":return t.stop()}},t,this)}));function e(e,s){return t.apply(this,arguments)}return e}(),changeMute:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(e,s){var i,n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return i=0==s?"setMute":"cancelMute",n=0==s?"updateSessionListByMute":"cancelSessionListByMute",t.next=4,c["a"].session[i]({session_id:e});case 4:this.hideToolbar(),this.$store.commit("updateMute",s),this.$store.commit(n,e);case 7:case"end":return t.stop()}},t,this)}));function e(e,s){return t.apply(this,arguments)}return e}(),delSession:function(t){var e=this;Object(u["e"])(this.$t("chat.closeSessionMsg")).then(function(){e.$store.commit("removeSessionListById",t),e.hideToolbar(),e.curSession==t&&(e.$store.commit("changeSessionId",0),e.$router.push({path:"/"}))})},handleUpdate:function(t){return Object(u["i"])(t,1,this)}}},l=m,h=(s("3e04"),s("17cc")),p=Object(h["a"])(l,i,n,!1,null,null,null);e["a"]=p.exports},"646e":function(t,e,s){},efe2:function(t,e,s){}}]);