(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-chat-chat"],{"380e":function(t,e,a){var n=a("c86c");e=n(!1),e.push([t.i,".session[data-v-64275a2d]{border-radius:%?15?%\n\t\t/* background-color: rgb(200,199,204); */}.session[data-v-64275a2d] :hover{border-radius:%?15?%;background-color:#c8c7cc}.container[data-v-64275a2d]{width:100%;display:flex;margin-top:%?10?%}.unchecked[data-v-64275a2d]{display:block;width:%?40?%;height:%?40?%;background-color:red;color:#fff;font-size:medium;text-align:center;line-height:%?40?%;border-radius:50%;position:absolute;right:-10px;top:%?-10?%}.avatar-container[data-v-64275a2d]{position:relative;margin:%?10?%}.avatar[data-v-64275a2d]{width:%?110?%;height:%?110?%;border-radius:50%}.content[data-v-64275a2d]{display:flex;align-items:auto;flex-direction:column;justify-content:center;padding-left:%?10?%}.name[data-v-64275a2d]{text-align:left;margin-top:0;font-weight:1000}.preview[data-v-64275a2d]{margin-bottom:0;font-size:smaller}.time-container[data-v-64275a2d]{margin-left:auto;margin-right:%?20?%;display:flex}.time[data-v-64275a2d]{font-size:smaller;margin-top:auto;margin-bottom:auto;text-align:center}",""]),t.exports=e},4160:function(t,e,a){"use strict";a.r(e);var n=a("9d09"),i=a("6c00");for(var o in i)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(o);a("6826");var r=a("828b"),s=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"64275a2d",null,!1,n["a"],void 0);e["default"]=s.exports},6826:function(t,e,a){"use strict";var n=a("bc99"),i=a.n(n);i.a},"6c00":function(t,e,a){"use strict";a.r(e);var n=a("afc8"),i=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=i.a},"9d09":function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",[a("v-uni-view",{staticClass:"session"},t._l(t.chatLists,(function(e,n){return a("v-uni-view",{key:e.id,staticClass:"container",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.toChatRoom(e)}}},[a("v-uni-view",{staticClass:"avatar-container"},[a("v-uni-image",{staticClass:"avatar",attrs:{src:t.handlerImgUrl(e.photo)}})],1),a("v-uni-view",{staticClass:"content"},[a("v-uni-text",{staticClass:"name"},[t._v(t._s(e.chatName))]),a("v-uni-text",{staticClass:"content-msg"},[t._v(t._s(e.msg))])],1),a("v-uni-view",{staticClass:"time-container"},[a("v-uni-text",{staticClass:"time"},[t._v(t._s(e.create_time))])],1)],1)})),1)],1)},i=[]},afc8:function(t,e,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("c223");var i=n(a("2634")),o=n(a("2fdc")),r=n(a("9b1b")),s=a("bf7f"),c=n(a("1af4")),u=n(a("5ae5")),d=a("8f59"),l={data:function(){return{timeNow:c.default.getTimeNow(),chatLists:[]}},onNavigationBarButtonTap:function(t){0==t.index&&uni.navigateTo({url:"../other/search/search",animationType:"slide-in-right"})},onShow:function(){},onLoad:function(){this.sortSessionByTime(),this.getChatList()},computed:(0,r.default)({},(0,d.mapGetters)(["sessions","token","isSocketOpen","lobbyMessages"])),methods:(0,r.default)((0,r.default)({},(0,d.mapActions)(["sortSessionByTime","removeSession"])),{},{handlerImgUrl:u.default,getChatList:function(){var t=this;return(0,o.default)((0,i.default)().mark((function e(){var a;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getChatList)();case 2:a=e.sent,200===a.code&&a.data.length>0&&(t.chatLists=a.data);case 4:case"end":return e.stop()}}),e)})))()},deleteSession:function(t){var e=this;uni.showModal({title:"删除会话",confirmText:"确定",cancelText:"取消",confirmColor:"#D94B4D",content:"聊天记录不会保存",success:function(a){a.confirm&&e.removeSession(t)}})},toGroupRoom:function(t){uni.navigateTo({url:"groupRoom/groupRoom?index="+t,animationType:"slide-in-right"})},toChatRoom:function(t){uni.navigateTo({url:"chatRoom/chatRoom?org=".concat(t.org,"&chatName=").concat(t.chatName),animationType:"slide-in-right"})},showLastTime:function(t){var e=c.default.TimeDifference(t,c.default.getTimeNow());if(0==e){var a=new Date(t);return a.getHours()+":"+a.getMinutes()}if(1==e)return"昨天";if(2==e)return"前天";var n=new Date(t);return n.getMonth()+1+"月"+n.getDate()+"日"},toLogin:function(){uni.navigateTo({url:"../index/login"})}})};e.default=l},bc99:function(t,e,a){var n=a("380e");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("967d").default;i("71410804",n,!0,{sourceMap:!1,shadowMode:!1})}}]);