- 管理端前端设备判定改为按宽高比(嵌入竖屏容器时正确使用手机版布局) - 统计上报跨源读取 parent.location 报错防护(降级用 referrer) - 续接会话时校验客服在线,离线不再误入聊天页 - 聊天记录整理与消息发送的用户资料缺失空值防护,避免接口 400 - entrypoint 数据库导入加空库守卫,容器重启/线上更新不再重置数据
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-292eb811"],{"38d8":function(t,e,n){},7864:function(t,e,n){"use strict";n.r(e);n("7f7f");var i=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"i-layout-page-header"},[e("div",{staticClass:"i-layout-page-header"},[e("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])])]),e("Row",{staticClass:"ivu-mt box-wrapper"},[e("Col",{staticClass:"left-wrapper",attrs:{span:"3"}},[e("Menu",{attrs:{theme:t.theme3,"active-name":t.sortName,width:"auto"}},[e("MenuGroup",t._l(t.labelSort,(function(n,i){return e("MenuItem",{key:i,staticClass:"menu-item",class:i===t.current?"showOn":"",attrs:{name:n.id},nativeOn:{click:function(e){return t.bindMenuItem(n,i)}}},[t._v("\n "+t._s(n.name)+"\n "),0!=i?e("div",{staticClass:"icon-box"},[e("Icon",{attrs:{type:"ios-more",size:"24"},on:{click:function(e){return e.stopPropagation(),t.showMenu(n)}}})],1):t._e(),0!=i?e("div",{directives:[{name:"show",rawName:"v-show",value:n.status,expression:"item.status"}],staticClass:"right-menu ivu-poptip-inner"},[e("div",{staticClass:"ivu-poptip-body",on:{click:function(e){return t.labelEdit(n)}}},[e("div",{staticClass:"ivu-poptip-body-content"},[e("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("编辑小组")])])]),e("div",{staticClass:"ivu-poptip-body",on:{click:function(e){return t.deleteSort(n,"删除小组",i)}}},[e("div",{staticClass:"ivu-poptip-body-content"},[e("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("删除小组")])])])]):t._e()])})),1)],1)],1),e("Col",{ref:"rightBox",attrs:{span:"21"}},[e("Card",{attrs:{bordered:!1,"dis-hover":""}},[e("Row",{staticClass:"mb20",attrs:{type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-store_service-add"],expression:"['setting-store_service-add']"}],staticClass:"mr10",attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加话术")]),e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-store_service-add"],expression:"['setting-store_service-add']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success",icon:"md-add"},on:{click:t.addSort}},[t._v("添加分类")])],1)],1),e("Table",{attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatar",fn:function(t){var n=t.row;t.index;return[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:n.avatar,expression:"row.avatar"}]})])]}},{key:"add_time",fn:function(n){var i=n.row;n.index;return[e("span",[t._v(" "+t._s(i.add_time))])]}},{key:"action",fn:function(n){var i=n.row,r=n.index;return[e("a",{on:{click:function(e){return t.edit(i)}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(i,"删除客服",r)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)],1)],1)},r=[],a=(n("8e6e"),n("456d"),n("96cf"),n("1da1")),o=(n("ac6a"),n("ade3")),c=n("2f62"),s=n("90e7");function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){Object(o["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d={name:"index",filters:{typeFilter:function(t){var e={wechat:"微信用户",routine:"小程序用户"};return e[t]}},computed:l(l({},Object(c["e"])("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}}),data:function(){return{isChat:!0,formValidate3:{page:1,limit:15},total3:0,loading3:!1,modals3:!1,tableList3:[],columns3:[{title:"用户名称",key:"nickname",width:200},{title:"客服头像",slot:"headimgurl"},{title:"操作",slot:"action"}],formValidate5:{page:1,limit:15,uid:0,to_uid:0,id:0},total5:0,loading5:!1,tableList5:[],FromData:null,formValidate:{page:1,limit:15,data:"",type:"",nickname:""},tableList2:[],modals:!1,total:0,tableFrom:{page:1,limit:15,cate_id:0},timeVal:[],fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},loading:!1,tableList:[],columns1:[{title:"ID",key:"id",width:80},{title:"标题",key:"title",minWidth:120},{title:"详情",key:"message",minWidth:320},{title:"排序",key:"sort",minWidth:60},{title:"添加时间",slot:"add_time",minWidth:120},{title:"操作",slot:"action",fixed:"right",minWidth:150}],columns4:[{type:"selection",width:60,align:"center"},{title:"ID",key:"uid",width:80},{title:"微信用户名称",key:"nickname",minWidth:160},{title:"客服头像",slot:"headimgurl",minWidth:60},{title:"用户类型",slot:"user_type",width:100},{title:"性别",slot:"sex",minWidth:60},{title:"地区",slot:"country",minWidth:120},{title:"是否关注公众号",slot:"subscribe",minWidth:120}],loading2:!1,total2:0,addFrom:{uids:[]},selections:[],rows:{},rowRecord:{},theme3:"light",labelSort:[],sortName:"",current:0}},created:function(){this.getUserLabelAll()},mounted:function(){},methods:{getUserLabelAll:function(t){var e=this;Object(s["D"])().then((function(n){var i=n.data.data,r={name:"全部",id:""};i.unshift(r),i.forEach((function(t){t.status=!1})),t||(e.sortName=i[0].id,e.tableFrom.cate_id=i[0].id,e.getList()),e.labelSort=i}))},addSort:function(){var t=this;this.$modalForm(Object(s["E"])()).then((function(){return t.getUserLabelAll()}))},labelEdit:function(t){var e=this;this.$modalForm(Object(s["F"])(t.id)).then((function(){return e.getUserLabelAll(1)}))},deleteSort:function(t,e,n){var i=this,r={title:e,num:n,url:"chat/speechcraftcate/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(r).then((function(t){i.$Message.success(t.msg),i.labelSort.splice(n,1),i.labelSort=[],i.getUserLabelAll()})).catch((function(t){i.$Message.error(t.msg)}))},showMenu:function(t){console.log("454545"),this.labelSort.forEach((function(e){console.log("rrrr",e.id),console.log("rrrr2",e.id),e.id==t.id?(console.log("ssss",t.status),e.status=!t.status):e.status=!1}))},bindMenuItem:function(t,e){this.current=e,this.labelSort.forEach((function(t){t.status=!1})),this.tableFrom.cate_id=t.id,this.getList()},cancel:function(){this.formValidate={page:1,limit:10,data:"",type:"",nickname:""}},handleReachBottom:function(){var t=this;return new Promise((function(e){t.formValidate.page=t.formValidate.page+1,setTimeout((function(){kefucreateApi(t.formValidate).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var i,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=n.data,i.list.length>0)for(r=0;r<i.list.length;r++)t.tableList2.push(i.list[r]);t.total2=i.count,t.loading2=!1;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading2=!1,t.$Message.error(e.msg)})),e()}),2e3)}))},look:function(t){this.isChat=!1,this.rowRecord=t,this.getChatlist()},getChatlist:function(){var t=this;this.loading5=!0,this.formValidate5.uid=this.rows.uid,this.formValidate5.to_uid=this.rowRecord.uid,this.formValidate5.id=this.rows.id,kefuChatlistApi(this.formValidate5).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=n.data,t.tableList5=i.list,t.total5=i.count,t.loading5=!1;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading5=!1,t.$Message.error(e.msg)}))},pageChange5:function(t){this.formValidate5.page=t,this.getChatlist()},submitFail:function(){this.getList()},record:function(t){this.rows=t,this.modals3=!0,this.isChat=!0,this.getListRecord()},getListRecord:function(){var t=this;this.loading3=!0,kefuRecordApi(this.formValidate3,this.rows.id).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=n.data,t.tableList3=i.list?i.list:[],t.total3=i.count,t.loading3=!1;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading3=!1,t.$Message.error(e.msg)}))},pageChange3:function(t){this.formValidate3.page=t,this.getListRecord()},edit:function(t){var e=this;this.$modalForm(Object(s["C"])(t.id)).then((function(){return e.getList()}))},add:function(){var t=this;this.$modalForm(Object(s["B"])()).then((function(){return t.getList()}))},onSelectTab:function(t){this.selections=t;var e=[];this.selections.map((function(t){e.push(t.uid)})),this.addFrom.uids=e},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal.join("-"),this.formValidate.page=1,this.getListService()},selectChange:function(t){this.formValidate.data=t,this.timeVal=[],this.formValidate.page=1,this.getListService()},getListService:function(){var t=this;this.loading2=!0,kefucreateApi(this.formValidate).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=n.data,t.tableList2=i.list,t.total2=i.count,t.tableList2.map((function(t){t._isChecked=!1})),t.loading2=!1;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading2=!1,t.$Message.error(e.msg)}))},pageChange2:function(t){this.formValidate.page=t,this.getListService(),this.addFrom.uids=[]},userSearchs:function(){this.formValidate.page=1,this.getListService()},del:function(t,e,n){var i=this,r={title:e,num:n,url:"/chat/speechcraft/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(r).then((function(t){i.$Message.success(t.msg),i.tableList.splice(n,1)})).catch((function(t){i.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(s["G"])(this.tableFrom).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=n.data,t.tableList=i.list,t.total=n.data.count,t.loading=!1;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},onchangeIsShow:function(t){var e=this,n={id:t.id,status:t.status};kefusetStatusApi(n).then(function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$Message.success(n.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},putRemark:function(){var t=this;if(0===this.addFrom.uids.length)return this.$Message.warning("请选择要添加的客服");kefuAddApi(this.addFrom).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$Message.success(n.msg),t.modals=!1,t.getList();case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))}}},h=d,f=(n("d448"),n("2877")),m=Object(f["a"])(h,i,r,!1,null,"984ccf30",null);e["default"]=m.exports},"90e7":function(t,e,n){"use strict";n.d(e,"f",(function(){return r})),n.d(e,"e",(function(){return a})),n.d(e,"o",(function(){return o})),n.d(e,"G",(function(){return c})),n.d(e,"C",(function(){return s})),n.d(e,"B",(function(){return u})),n.d(e,"k",(function(){return l})),n.d(e,"l",(function(){return d})),n.d(e,"D",(function(){return h})),n.d(e,"E",(function(){return f})),n.d(e,"F",(function(){return m})),n.d(e,"x",(function(){return g})),n.d(e,"y",(function(){return p})),n.d(e,"v",(function(){return b})),n.d(e,"w",(function(){return v})),n.d(e,"t",(function(){return w})),n.d(e,"n",(function(){return O})),n.d(e,"r",(function(){return j})),n.d(e,"q",(function(){return y})),n.d(e,"g",(function(){return k})),n.d(e,"s",(function(){return C})),n.d(e,"j",(function(){return _})),n.d(e,"p",(function(){return L})),n.d(e,"h",(function(){return x})),n.d(e,"a",(function(){return S})),n.d(e,"b",(function(){return R})),n.d(e,"d",(function(){return V})),n.d(e,"m",(function(){return M})),n.d(e,"i",(function(){return F})),n.d(e,"c",(function(){return $})),n.d(e,"z",(function(){return E})),n.d(e,"A",(function(){return P})),n.d(e,"u",(function(){return A}));var i=n("6b6c");function r(t){return Object(i["a"])({url:"setting/config/header_basics",method:"get",params:t})}function a(t,e){return Object(i["a"])({url:e,method:"get",params:t})}function o(t){return Object(i["a"])({url:"chat/kefu/login/".concat(t),method:"get"})}function c(t){return Object(i["a"])({url:"chat/speechcraft",method:"get",params:t})}function s(t){return Object(i["a"])({url:"chat/speechcraft/".concat(t,"/edit"),method:"get"})}function u(){return Object(i["a"])({url:"chat/speechcraft/create",method:"get"})}function l(t){return Object(i["a"])({url:"chat/feedback",method:"get",params:t})}function d(t){return Object(i["a"])({url:"chat/feedback/".concat(t,"/edit"),method:"get"})}function h(){return Object(i["a"])({url:"chat/speechcraftcate",method:"get"})}function f(){return Object(i["a"])({url:"chat/speechcraftcate/create",method:"get"})}function m(t){return Object(i["a"])({url:"chat/speechcraftcate/".concat(t,"/edit"),method:"get"})}function g(t){return Object(i["a"])({url:"setting/role",method:"GET",params:t})}function p(t){return Object(i["a"])({url:"setting/role/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function b(t){return Object(i["a"])({url:"setting/role/".concat(t.id),method:"post",data:t})}function v(t){return Object(i["a"])({url:"setting/role/".concat(t,"/edit"),method:"get"})}function w(){return Object(i["a"])({url:"setting/role/create",method:"get"})}function O(t){return Object(i["a"])({url:"chat/kefu",method:"get",params:t})}function j(t){return Object(i["a"])({url:"chat/kefu/create",method:"get",params:t})}function y(){return Object(i["a"])({url:"chat/kefu/add",method:"get"})}function k(t){return Object(i["a"])({url:"chat/kefu",method:"post",data:t})}function C(t){return Object(i["a"])({url:"chat/kefu/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function _(t){return Object(i["a"])({url:"chat/kefu/".concat(t,"/edit"),method:"GET"})}function L(t,e){return Object(i["a"])({url:"chat/kefu/record/".concat(e),method:"GET",params:t})}function x(t){return Object(i["a"])({url:"chat/kefu/chat_list",method:"GET",params:t})}function S(t){return Object(i["a"])({url:"chat/qrcode",method:"get",params:t})}function R(t){return Object(i["a"])({url:"chat/qrcode/".concat(t),method:"get"})}function V(t){return Object(i["a"])({url:"chat/statistics",method:"get",params:t})}function M(){return Object(i["a"])({url:"chat/group",method:"get"})}function F(t){return Object(i["a"])({url:"chat/group/create/"+t,method:"get"})}function $(t){return Object(i["a"])({url:"chat/record",method:"get",params:t})}function E(t){return Object(i["a"])({url:"setting/verison",method:"get",params:t})}function P(t){return Object(i["a"])({url:"setting/verison/".concat(t),method:"get"})}function A(t){return Object(i["a"])({url:"chat/record/list",method:"get",params:t})}},d448:function(t,e,n){"use strict";n("38d8")}}]); |