You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shipin/public/admin/system_static/js/chunk-3a14e199.8fbc5b11.js

1 line
14 KiB

1 year ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3a14e199"],{7624:function(t,e,s){"use strict";e.a=["em-tlj-1","em-tlj-2","em-tlj-3","em-tlj-4","em-tlj-5","em-tlj-6","em-tlj-7","em-tlj-8","em-tlj-9","em-tlj-10","em-tlj-11","em-tlj-12","em-tlj-13","em-tlj-14","em-tlj-15","em-tlj-16","em-tlj-17","em-tlj-18","em-tlj-19","em-tlj-20","em-tlj-21","em-tlj-22","em-tlj-23","em-tlj-24","em-tlj-25","em-tlj-26","em-tlj-27","em-tlj-28","em-tlj-29","em-tlj-30","em-tlj-31","em-tlj-32","em-tlj-33","em-tlj-34","em-tlj-35","em-tlj-36","em-tlj-37","em-tlj-38","em-tlj-39","em-tlj-40","em-tlj-41","em-tlj-42","em-tlj-43","em-tlj-44","em-tlj-45","em-tlj-46","em-tlj-47","em-tlj-48","em-tlj-49","em-tlj-50","em-tlj-51","em-tlj-52","em-tlj-53","em-tlj-54","em-tlj-55","em-tlj-56","em-tlj-57","em-tlj-58","em-tlj-59","em-tlj-60","em-tlj-61","em-tlj-62","em-tlj-63","em-tlj-64","em-tlj-65","em-tlj-66","em-tlj-67","em-tlj-68","em-tlj-69","em-tlj-70","em-tlj-71","em-tlj-72","em-tlj-73","em-tlj-74","em-tlj-75","em-tlj-76","em-tlj-77","em-tlj-78","em-tlj-79","em-tlj-80","em-tlj-81","em-tlj-82","em-tlj-83","em-tlj-84","em-tlj-85","em-tlj-86","em-tlj-87","em-tlj-88","em-tlj-89","em-tlj-90","em-tlj-91","em-tlj-92","em-tlj-93","em-tlj-94","em-tlj-95","em-tlj-96"]},a5ac:function(t,e,s){},add8:function(t,e,s){"use strict";s("ed0a")},c168:function(t,e,s){"use strict";s.r(e);var i=s("2909"),o=(s("d3b7"),s("159b"),s("14d9"),s("d81d"),s("ac1f"),s("5319"),s("99af"),s("d708")),a=s("49ea"),r=s("c276"),n=s("7624"),c=s("42e3"),d={name:"chat_mobile",data:function(){return{ops:{vuescroll:{mode:"slide",enable:!1,auto:!1,autoLoadDistance:0,pullRefresh:{enable:!0,auto:!1,autoLoadDistance:0,tips:{deactive:"",active:"上拉加载更多",start:"Loading...",beforeDeactive:" "}},pushLoad:{enable:!1}},bar:{background:"#393232",opacity:".5",size:"2px"}},swiperOptions:{},status:!1,loading:!1,isTool:!1,isSwiper:!1,isWords:!1,autoplay:!1,circular:!0,interval:3e3,duration:500,emojiGroup:(t=n.a,e=+(e=21)||1,s=[],t.forEach((function(t,i){i%e==0&&s.push([]),s[s.length-1].push(t)})),s),con:"",toUid:"",limit:15,upperId:0,chatList:[],kefuInfo:{},scrollTop:0,active:!0,isScroll:!0,oldHeight:0,selector:"",transferList:[],isTransfer:!1,uploadData:{},header:{},fileUrl:"",userToken:"",tourist_uid:"",orderId:"",orderInfo:"",cartInfo:"",productId:"",productInfo:"",tourist_avatar:""};var t,e,s},computed:{isSend:function(){return 0!=this.con.length},records:function(){var t=this;return this.chatList.map((function(e,s){return e.time=t.$moment(1e3*e.add_time).format("MMMDo h:mm"),!s||300<=e.add_time-t.chatList[s-1].add_time?e.show=!0:e.show=!1,e}))}},created:function(){var t=localStorage.getItem("LOGIN_STATUS_TOKEN")||"";this.fileUrl=o.a.apiBaseURL.replace("adminapi","kefuapi")+"/tourist/upload",this.userToken=t,this.toUid=this.$route.query.toUid||"",this.nickname=this.$route.query.nickname||"",this.orderId=this.$route.query.orderId||"",this.productId=this.$route.query.product_id||""},mounted:function(){var t=this,e=(this.$wechat._isMobile()||this.$router.replace("/kefu/appChat"),this);this.getServiceList(),this.userToken&&(this.getOrderInfo(),this.getGoodsInfo()),this.header["Authori-zation"]="Bearer "+Object(r.c)("kefu_token"),a.a.then((function(s){t.userToken&&s.send({type:"login",data:t.userToken}),s.$on(["reply","chat"],(function(e){1!=e.msn_type&&2!=e.msn_type||(e.msn=t.replace_em(e.msn)),t.chatList.push(e),t.$nextTick((function(){t.$refs.scrollBox.refresh(),t.scrollBom()})),setTimeout((function(e){t.$refs.scrollBox.refresh()}),300)})),s.$on("socket_error",(function(){t.$message.error("连接失败")})),s.$on("error",(function(){t.$message.error("连接失败")})),s.$on("to_transfer",(function(t){s.send({data:{id:t.toUid},type:"to_chat"})})),s.$on("online",(function(t){0==t.online&&t.uid==e.toUid&&e.$Modal.confirm({title:"提示",content:"客服已离线,是否需要反馈?",okText:"确定",cancelText:"取消",onOk:function(){e.$router.replace({path:"/kefu/mobile_feedback"})}})}))})),this.$nextTick((function(){}))},methods:{goBack:function(){this.$router.go(-1)},handleFormatError:fu