bztang-admin/addons/yun_shop/static/app/js/chunk-41c217a4.fe332e74.js

1 line
5.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41c217a4"],{"1ea7":function(t,e,a){"use strict";a("52acb")},"46e1":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".text[data-v-a47ed2ce]{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1}.content[data-v-a47ed2ce],.text[data-v-a47ed2ce]{width:10rem;-webkit-box-orient:vertical}.content[data-v-a47ed2ce]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:60px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;text-align:left;margin-left:.5rem;overflow:hidden}.time[data-v-a47ed2ce]{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.name[data-v-a47ed2ce]{margin-left:.5rem}#message[data-v-a47ed2ce]{background-color:#fff}.avatar[data-v-a47ed2ce]{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.avatar[data-v-a47ed2ce],.main[data-v-a47ed2ce]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.main[data-v-a47ed2ce]{-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},"52acb":function(t,e,a){var i=a("46e1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=a("499e").default;s("28b08c48",i,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));var i=document.documentElement,s=document.body,n={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:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&i.clientHeight?Math.min(s.clientHeight,i.clientHeight):Math.max(s.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(s.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"},[t._v(" "+t._s(t.getMessageDate(e.last_msg_time))+" ")]):t._e()])})),0==t.list.length?a("van-empty",{attrs:{description:"暂无信息"}}):t._e()],2)},s=[],n=(a("4056"),a("44bf")),l=(a("99af"),a("ac0d")),o={mixins:[l["a"]],data:function(){return{id:"",message_type:"",list:[],last_page:1,current_page:1,isLoadMore:!0}},activated:function(){this.isLoadMore=!0,this.message_type=this.$route.query.message_type,this.$route.query.l_id&&(this.id=this.$route.query.l_id),this.getData()},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,s=e.getDate();return i<10&&(i="0".concat(i)),s<10&&(s="0".concat(s)),"".concat(a,"-").concat(i,"-").concat(s)},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){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:n["a"]}},c=o,r=(a("1ea7"),a("2877")),d=Object(r["a"])(c,i,s,!1,null,"a47ed2ce",null);e["default"]=d.exports}}]);