1 line
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0578e3ee"],{"36e3":function(t,e,a){"use strict";a("9aab")},"9aab":function(t,e,a){var i=a("e51a");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("499e").default;n("4df8db30",i,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var i=document.documentElement,n=document.body,s={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return i&&i.scrollTop?t=i.scrollTop:n&&(t=n.scrollTop),t},getClientHeight:function(){var t=0;return t=n.clientHeight&&i.clientHeight?Math.min(n.clientHeight,i.clientHeight):Math.max(n.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(n.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},cfb0:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"message"}},[a("c-title",{attrs:{hide:!1,text:"消息"}}),t._l(t.list,(function(e){return a("div",{key:e.id,staticClass:"main",on:{click:function(a){return t.link(e)}}},[a("div",{staticClass:"avatar"},[1==t.message_type?[a("van-image",{attrs:{width:"3.5rem",height:"3.5rem",round:"",src:e.lawyer.avatar_image}}),a("div",{staticClass:"content"},[a("span",[t._v(t._s(e.lawyer.name))]),a("span",{staticClass:"text"},[t._v(t._s(e.last_chat_content))])])]:[a("van-image",{attrs:{width:"3.5rem",height:"3.5rem",round:"",src:e.member.avatar_image}}),a("div",{staticClass:"content"},[a("span",[t._v(t._s(e.member.nickname))]),a("span",{staticClass:"text"},[t._v(t._s(e.last_chat_content))])])]],2),e.last_msg_time?a("div",{staticClass:"time"},[a("div",[t._v(" "+t._s(t.getMessageDate(e.last_msg_time))+" ")]),e.un_read_num>=1?a("div",{staticStyle:{"text-align":"right"}},[a("span",{staticClass:"un_read_num"},[t._v(" "+t._s(e.un_read_num)+" ")])]):t._e()]):t._e()])})),0==t.list.length?a("van-empty",{attrs:{description:"暂无信息"}}):t._e()],2)},n=[],s=(a("4056"),a("44bf")),l=a("c7eb"),r=a("1da1"),o=(a("99af"),a("14d9"),a("ac0d")),c={mixins:[o["a"]],data:function(){return{id:"",message_type:"",list:[],last_page:1,current_page:1,isLoadMore:!0,timerId:null}},activated:function(){var t=this;return Object(r["a"])(Object(l["a"])().mark((function e(){return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoadMore=!0,t.message_type=t.$route.query.message_type,t.$route.query.l_id&&(t.id=t.$route.query.l_id),e.next=5,t.getData();case 5:t.timerId=setInterval((function(){t.getData()}),5e3);case 6:case"end":return e.stop()}}),e)})))()},methods:{getMoreData:function(){var t=this;if(this.isLoadMore=!1,this.current_page>=this.last_page)return!1;$http.post("plugin.lawyer-platform.frontend.controllers.message.getList",json).then((function(e){t.isLoadMore=!0,1==e.result&&(t.list=t.list.concat(e.data.list.data),t.current_page=e.data.list.current_page,t.last_page=e.data.list.last_page)}))},getMessageDate:function(t){var e=new Date(1e3*t),a=e.getFullYear(),i=e.getMonth()+1,n=e.getDate();return i<10&&(i="0".concat(i)),n<10&&(n="0".concat(n)),"".concat(a,"-").concat(i,"-").concat(n)},getData:function(){var t=this,e={message_type:this.message_type};this.id&&(e.l_id=this.id),$http.post("plugin.lawyer-platform.frontend.controllers.message.getList",e).then((function(e){1==e.result&&(t.list=e.data.list.data,t.last_page=e.data.list.last_page)}))},link:function(t){clearInterval(this.timerId);var e={};2==this.message_type||3==this.message_type?(e.chatType=2,e.user_id=t.uid,e.queue_id=t.id):e.chatType=1,e.message_type=this.message_type,e.plugin_name="lawyer",e.employeeId=t.employee_id,this.$router.push(this.fun.getUrl("chatWindow",{},e))}},components:{VanImage:s["a"]}},d=c,m=(a("36e3"),a("2877")),u=Object(m["a"])(d,i,n,!1,null,"7cbea3f6",null);e["default"]=u.exports},e51a:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".text[data-v-7cbea3f6]{width:10rem;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.content[data-v-7cbea3f6]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:60px;-ms-flex-pack:justify;text-align:left;margin-left:.5rem;width:10rem;overflow:hidden}.content[data-v-7cbea3f6],.time[data-v-7cbea3f6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.time[data-v-7cbea3f6]{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:3.5rem;-ms-flex-pack:justify}.time .un_read_num[data-v-7cbea3f6]{padding:0 .375rem;line-height:1.125rem;height:1.125rem;font-size:.75rem;color:#fff;background-color:red;border-radius:1.125rem;-webkit-transform:scale(.65);transform:scale(.65)}.name[data-v-7cbea3f6]{margin-left:.5rem}#message[data-v-7cbea3f6]{background-color:#fff}.avatar[data-v-7cbea3f6]{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.avatar[data-v-7cbea3f6],.main[data-v-7cbea3f6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.main[data-v-7cbea3f6]{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;padding:1rem;border-bottom:1px solid #f1f1f1}",""]),t.exports=e}}]); |