xiang %!s(int64=6) %!d(string=hai) anos
pai
achega
431ecaed9c
Modificáronse 41 ficheiros con 53 adicións e 817 borrados
  1. 3 0
      service/index.html
  2. 1 0
      service/src/api/ports.js
  3. 1 0
      service/src/components/historicalRecord.vue
  4. 9 1
      service/src/pages/login.vue
  5. 15 1
      service/static/publicMethods.js
  6. 0 16
      service_exe/src/index.html
  7. 13 6
      service_exe/src/renderer/App.vue
  8. 11 7
      service_exe/src/renderer/main.js
  9. BIN=BIN
      service_exe/src/static/audio/receive.wav
  10. BIN=BIN
      service_exe/src/static/audio/send.wav
  11. 0 0
      service_exe/src/static/css/app.b08f3768c9553af70c3dfb15b68c00a8.css
  12. 0 0
      service_exe/src/static/css/app.b08f3768c9553af70c3dfb15b68c00a8.css.map
  13. BIN=BIN
      service_exe/src/static/fonts/element-icons.535877f.woff
  14. BIN=BIN
      service_exe/src/static/fonts/element-icons.732389d.ttf
  15. 0 4
      service_exe/src/static/frce.js
  16. BIN=BIN
      service_exe/src/static/img/59.1cb4f69.gif
  17. BIN=BIN
      service_exe/src/static/img/loginBg.1847fc5.png
  18. 0 0
      service_exe/src/static/js/0.78e6e92dd6f80d447f44.js
  19. 0 0
      service_exe/src/static/js/0.78e6e92dd6f80d447f44.js.map
  20. 0 0
      service_exe/src/static/js/1.2850cac60cc7cb36bc98.js
  21. 0 0
      service_exe/src/static/js/1.2850cac60cc7cb36bc98.js.map
  22. 0 0
      service_exe/src/static/js/2.5988ffaaae4d45954528.js
  23. 0 0
      service_exe/src/static/js/2.5988ffaaae4d45954528.js.map
  24. 0 0
      service_exe/src/static/js/3.bb7138d6aee6b832f1d6.js
  25. 0 0
      service_exe/src/static/js/3.bb7138d6aee6b832f1d6.js.map
  26. 0 0
      service_exe/src/static/js/4.b2ac001ec334e8091243.js
  27. 0 0
      service_exe/src/static/js/4.b2ac001ec334e8091243.js.map
  28. 0 0
      service_exe/src/static/js/5.e4de278f29e86de1e53a.js
  29. 0 0
      service_exe/src/static/js/5.e4de278f29e86de1e53a.js.map
  30. 0 0
      service_exe/src/static/js/6.d9776ecdfcd686aeb8fc.js
  31. 0 0
      service_exe/src/static/js/6.d9776ecdfcd686aeb8fc.js.map
  32. 0 0
      service_exe/src/static/js/app.a9f51c630fb54c84585a.js
  33. 0 0
      service_exe/src/static/js/app.a9f51c630fb54c84585a.js.map
  34. 0 2
      service_exe/src/static/js/manifest.1375f5e568727c7312d8.js
  35. 0 0
      service_exe/src/static/js/manifest.1375f5e568727c7312d8.js.map
  36. 0 0
      service_exe/src/static/js/vendor.ed88eb57e8f88e68c79c.js
  37. 0 0
      service_exe/src/static/js/vendor.ed88eb57e8f88e68c79c.js.map
  38. BIN=BIN
      service_exe/src/static/logo.gif
  39. 0 253
      service_exe/src/static/md5.js
  40. 0 41
      service_exe/src/static/paste.js
  41. 0 486
      service_exe/src/static/publicMethods.js

+ 3 - 0
service/index.html

@@ -20,8 +20,11 @@
     //   div.innerHTML = "无效访问地址";
     // }
     function getQueryString(name) {
+      
       var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+
       var r = window.location.search.substr(1).match(reg);
+      
       if (r != null) {
         return unescape(r[2]);
       }

+ 1 - 0
service/src/api/ports.js

@@ -38,6 +38,7 @@ export default {
   history:{
     historyList:'/service/history/historyList',
     historyInfo:"/service/history/historyInfo",
+    userHistory:"/service/history/userHistory"
   },
 
   //留言 

+ 1 - 0
service/src/components/historicalRecord.vue

@@ -165,6 +165,7 @@ export default {
         //获取会话详情列表
         getRecordList(page,size = 10){
             let str ="historyinfo" + "customer-service" + "history" + "service";
+            
             this.$http.get(this.$ports.history.historyInfo,{
             params:{
                 servicelog_id:this.uid,

+ 9 - 1
service/src/pages/login.vue

@@ -177,7 +177,8 @@ export default {
     // 判断验证码参数
     let SystemId = this.$public.getQueryString("id");
     let System = this.$public.getQueryString("code");
-
+    let checkVcode=true;
+ 
     if (!SystemId && !System) {
       this.showSecurityCode = true;
     } else {
@@ -186,12 +187,19 @@ export default {
       this.verifySystem = System;
       localStorage.clear();
       sessionStorage.clear();
+      checkVcode=false;
+
+      
     }
     this.$comm.checkValidCodeEnabled((data)=> {
+   
       if (data == 0) {
         this.showSecurityCode = false;
       } else {
         this.showSecurityCode = true;
+        if(!checkVcode){
+            this.showSecurityCode = false;
+        }
       }
     });
 

+ 15 - 1
service/static/publicMethods.js

@@ -476,8 +476,22 @@ export default {
 	},
 
 	getQueryString(name) {
+		var href=window.location.href;
+		var url='';
+		
+		if(href.indexOf('/#/')>-1){ //处理vue特有的带#号路径
+			url=href.split('/#/');			
+			url=url[1];
+			if(url.indexOf('?')>-1){
+				url=url.split('?');
+				url=url[1];
+			}
+		}else{
+			url=window.location.search.substr(1);
+			
+		}
 		var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
-		var r = window.location.search.substr(1).match(reg);
+		var r = url.match(reg);
 		if (r != null) {
 			return unescape(r[2]);
 		}

+ 0 - 16
service_exe/src/index.html

@@ -1,16 +0,0 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>智能客服系统</title><link href=./static/css/app.b08f3768c9553af70c3dfb15b68c00a8.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.1375f5e568727c7312d8.js></script><script type=text/javascript src=./static/js/vendor.ed88eb57e8f88e68c79c.js></script><script type=text/javascript src=./static/js/app.a9f51c630fb54c84585a.js></script></body><script>let name = getQueryString('pid');
-    // if(unescape(name) != "这就是一个编码没有什么用啊"){
-    //   document.getElementById("app").remove();
-    //   var parent = document.body;
-    //   var div = document.createElement("div");
-    //   parent.appendChild(div)
-    //   div.innerHTML = "无效访问地址";
-    // }
-    function getQueryString(name) {
-      var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
-      var r = window.location.search.substr(1).match(reg);
-      if (r != null) {
-        return unescape(r[2]);
-      }
-      return null;
-    }</script></html>

+ 13 - 6
service_exe/src/renderer/App.vue

@@ -8,10 +8,14 @@
 
 <script>
 	import Vue from 'vue';
+	import receiveAPP from '../../static/audio/receive.wav';
+	import electron from 'electron'
+
 	export default {
 		name: 'App',
 		data(){
 			return{
+				Messagenum: 0,
 				reconnectData:null,
 				lockReconnect:false,    //避免重复连接,因为onerror之后会立即触发 onclose
 				timeout:5000,          //10s一次心跳检测
@@ -20,7 +24,8 @@
 				apiToken:'',
 				linkfailure:true,
 				Messagenum:0,
-				kfuser_info:{}
+				kfuser_info:{},
+				receiveMuisc: receiveAPP
 			}
 		},
 		methods:{
@@ -231,7 +236,10 @@
 				}
 
 				//接收用户消息数据
-				if(redata.message_type == "chatMessage"){
+				if (redata.message_type == "chatMessage") {
+					const ipc = require('electron').ipcRenderer;
+					ipc.send('haveMessage');
+					console.log(ipc, '123')
 					this.Messagenum = this.$store.getters.get_megnum;
 					this.Messagenum = ++this.Messagenum;
 					this.$store.dispatch("SET_MEGNNUM", this.Messagenum);
@@ -302,8 +310,8 @@
 			/*******************************************/
 			// 接收消息音频提示
 			receiveAudio() {
-				let receive = new Audio()
-				receive.src = "../static/audio/receive.wav";
+				let receive = new Audio();
+				receive.src = this.receiveMuisc;
 				receive.play();
 			},
 			/***************************************/
@@ -356,8 +364,7 @@
 		},
 		destroyed() {
 			this.lockReconnect = true;
-			this.$websocket.close();
-			// this.websock.close()                   //离开路由之后断开websocket连接
+			this.websock.close()                   //离开路由之后断开websocket连接
 			clearTimeout(this.reconnectData);      //离开清除 timeout
 			clearTimeout(this.timeoutObj);         //离开清除 timeout
 			clearTimeout(this.serverTimeoutObj);   //离开清除 timeout

+ 11 - 7
service_exe/src/renderer/main.js

@@ -5,17 +5,24 @@ import App from './App'
 import router from './router';
 import store from './store';
 import ElementUI from 'element-ui';
-import frce from '../static/frce';
+import frce from '../../static/frce';
 import http from './api/http';
 // import publicMethods from '../static/publicMethods';
 import 'element-ui/lib/theme-chalk/index.css';
 import axios from 'axios'; //引入axios
 import ports from './api/ports.js'; //api接口文档
-import publicMethods from '../static/publicMethods.js';
+import publicMethods from '../../static/publicMethods.js';
 import md5 from 'js-md5';
 import comm from './assets/common.js';
 Vue.use(ElementUI);
 
+if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
+
+Vue.config.productionTip = false
+// The Vue build version to load with the `import` command
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
+
+
 Vue.config.productionTip = false;
 // 注册表情包数组
 Vue.prototype.$frce = frce.frce;
@@ -29,11 +36,8 @@ Vue.prototype.$public = publicMethods;
 Vue.prototype.$comm=comm;
 /* eslint-disable no-new */
 new Vue({
-  el: '#app',
+  components: { App },
   router,
   store,
-  components: {
-    App
-  },
   template: '<App/>'
-})
+}).$mount('#app')

BIN=BIN
service_exe/src/static/audio/receive.wav


BIN=BIN
service_exe/src/static/audio/send.wav


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/css/app.b08f3768c9553af70c3dfb15b68c00a8.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/css/app.b08f3768c9553af70c3dfb15b68c00a8.css.map


BIN=BIN
service_exe/src/static/fonts/element-icons.535877f.woff


BIN=BIN
service_exe/src/static/fonts/element-icons.732389d.ttf


+ 0 - 4
service_exe/src/static/frce.js

@@ -1,4 +0,0 @@
-export default{
-    frce : ["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],
-    arr : ['1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','P','R','T','V','W','X','Y','Z'],
-}

BIN=BIN
service_exe/src/static/img/59.1cb4f69.gif


BIN=BIN
service_exe/src/static/img/loginBg.1847fc5.png


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/0.78e6e92dd6f80d447f44.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/0.78e6e92dd6f80d447f44.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/1.2850cac60cc7cb36bc98.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/1.2850cac60cc7cb36bc98.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/2.5988ffaaae4d45954528.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/2.5988ffaaae4d45954528.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/3.bb7138d6aee6b832f1d6.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/3.bb7138d6aee6b832f1d6.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/4.b2ac001ec334e8091243.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/4.b2ac001ec334e8091243.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/5.e4de278f29e86de1e53a.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/5.e4de278f29e86de1e53a.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/6.d9776ecdfcd686aeb8fc.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/6.d9776ecdfcd686aeb8fc.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/app.a9f51c630fb54c84585a.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/app.a9f51c630fb54c84585a.js.map


+ 0 - 2
service_exe/src/static/js/manifest.1375f5e568727c7312d8.js

@@ -1,2 +0,0 @@
-!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,d=0,s=[];d<r.length;d++)u=r[d],t[u]&&s.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)f=o(o.s=a[d]);return f};var r={},t={9:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"78e6e92dd6f80d447f44",1:"2850cac60cc7cb36bc98",2:"5988ffaaae4d45954528",3:"bb7138d6aee6b832f1d6",4:"b2ac001ec334e8091243",5:"e4de278f29e86de1e53a",6:"d9776ecdfcd686aeb8fc"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
-//# sourceMappingURL=manifest.1375f5e568727c7312d8.js.map

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/manifest.1375f5e568727c7312d8.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/vendor.ed88eb57e8f88e68c79c.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
service_exe/src/static/js/vendor.ed88eb57e8f88e68c79c.js.map


BIN=BIN
service_exe/src/static/logo.gif


+ 0 - 253
service_exe/src/static/md5.js

@@ -1,253 +0,0 @@
-/*
- * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
- * Digest Algorithm, as defined in RFC 1321.
- * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
- * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
- * Distributed under the BSD License
- * See http://pajhome.org.uk/crypt/md5 for more info.
- */
-
-/*
- * Configurable variables. You may need to tweak these to be compatible with
- * the server-side, but the defaults work in most cases.
- */
-var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase        */
-var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance   */
-var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode      */
-
-/*
- * These are the s you'll usually want to call
- * They take string arguments and return either hex or base-64 encoded strings
- */
-export default {
-  hex_md5(s) {
-    return this.binl2hex(this.core_md5(this.str2binl(s), s.length * chrsz));
-  },
-  b64_md5(s) {
-    return this.binl2b64(this.core_md5(this.str2binl(s), s.length * chrsz));
-  },
-  str_md5(s) {
-    return this.binl2str(this.core_md5(this.str2binl(s), s.length * chrsz));
-  },
-  hex_hmac_md5(key, data) {
-    return this.binl2hex(this.core_hmac_md5(key, data));
-  },
-  b64_hmac_md5(key, data) {
-    return this.binl2b64(this.core_hmac_md5(key, data));
-  },
-  str_hmac_md5(key, data) {
-    return this.binl2str(this.core_hmac_md5(key, data));
-  },
-
-  /*
-   * Perform a simple self-test to see if the VM is working
-   */
-  md5_vm_test() {
-    return this.hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
-  },
-
-  /*
-   * Calculate the MD5 of an array of little-endian words, and a bit length
-   */
-  core_md5(x, len) {
-    /* append padding */
-    x[len >> 5] |= 0x80 << ((len) % 32);
-    x[(((len + 64) >>> 9) << 4) + 14] = len;
-
-    var a = 1732584193;
-    var b = -271733879;
-    var c = -1732584194;
-    var d = 271733878;
-
-    for (var i = 0; i < x.length; i += 16) {
-      var olda = a;
-      var oldb = b;
-      var oldc = c;
-      var oldd = d;
-
-      a = this.md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
-      d = this.md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
-      c = this.md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
-      b = this.md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
-      a = this.md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
-      d = this.md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
-      c = this.md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
-      b = this.md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
-      a = this.md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
-      d = this.md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
-      c = this.md5_ff(c, d, a, b, x[i + 10], 17, -42063);
-      b = this.md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
-      a = this.md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
-      d = this.md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
-      c = this.md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
-      b = this.md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
-
-      a = this.md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
-      d = this.md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
-      c = this.md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
-      b = this.md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
-      a = this.md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
-      d = this.md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
-      c = this.md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
-      b = this.md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
-      a = this.md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
-      d = this.md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
-      c = this.md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
-      b = this.md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
-      a = this.md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
-      d = this.md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
-      c = this.md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
-      b = this.md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
-
-      a = this.md5_hh(a, b, c, d, x[i + 5], 4, -378558);
-      d = this.md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
-      c = this.md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
-      b = this.md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
-      a = this.md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
-      d = this.md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
-      c = this.md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
-      b = this.md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
-      a = this.md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
-      d = this.md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
-      c = this.md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
-      b = this.md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
-      a = this.md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
-      d = this.md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
-      c = this.md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
-      b = this.md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
-
-      a = this.md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
-      d = this.md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
-      c = this.md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
-      b = this.md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
-      a = this.md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
-      d = this.md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
-      c = this.md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
-      b = this.md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
-      a = this.md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
-      d = this.md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
-      c = this.md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
-      b = this.md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
-      a = this.md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
-      d = this.md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
-      c = this.md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
-      b = this.md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
-
-      a = this.safe_add(a, olda);
-      b = this.safe_add(b, oldb);
-      c = this.safe_add(c, oldc);
-      d = this.safe_add(d, oldd);
-    }
-    return Array(a, b, c, d);
-
-  },
-
-  /*
-   * These s implement the four basic operations the algorithm uses.
-   */
-  md5_cmn(q, a, b, x, s, t) {
-    return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s), b);
-  },
-  md5_ff(a, b, c, d, x, s, t) {
-    return this.md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
-  },
-  md5_gg(a, b, c, d, x, s, t) {
-    return this.md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
-  },
-  md5_hh(a, b, c, d, x, s, t) {
-    return this.md5_cmn(b ^ c ^ d, a, b, x, s, t);
-  },
-  md5_ii(a, b, c, d, x, s, t) {
-    return this.md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
-  },
-
-  /*
-   * Calculate the HMAC-MD5, of a key and some data
-   */
-  core_hmac_md5(key, data) {
-    var bkey = this.str2binl(key);
-    if (bkey.length > 16) bkey = this.core_md5(bkey, key.length * chrsz);
-
-    var ipad = Array(16),
-      opad = Array(16);
-    for (var i = 0; i < 16; i++) {
-      ipad[i] = bkey[i] ^ 0x36363636;
-      opad[i] = bkey[i] ^ 0x5C5C5C5C;
-    }
-
-    var hash = this.core_md5(ipad.concat(this.str2binl(data)), 512 + data.length * chrsz);
-    return this.core_md5(opad.concat(hash), 512 + 128);
-  },
-
-  /*
-   * Add integers, wrapping at 2^32. This uses 16-bit operations internally
-   * to work around bugs in some JS interpreters.
-   */
-  safe_add(x, y) {
-    var lsw = (x & 0xFFFF) + (y & 0xFFFF);
-    var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
-    return (msw << 16) | (lsw & 0xFFFF);
-  },
-
-  /*
-   * Bitwise rotate a 32-bit number to the left.
-   */
-  bit_rol(num, cnt) {
-    return (num << cnt) | (num >>> (32 - cnt));
-  },
-
-  /*
-   * Convert a string to an array of little-endian words
-   * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
-   */
-  str2binl(str) {
-    var bin = Array();
-    var mask = (1 << chrsz) - 1;
-    for (var i = 0; i < str.length * chrsz; i += chrsz)
-      bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32);
-    return bin;
-  },
-
-  /*
-   * Convert an array of little-endian words to a string
-   */
-  binl2str(bin) {
-    var str = "";
-    var mask = (1 << chrsz) - 1;
-    for (var i = 0; i < bin.length * 32; i += chrsz)
-      str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask);
-    return str;
-  },
-
-  /*
-   * Convert an array of little-endian words to a hex string.
-   */
-  binl2hex(binarray) {
-    var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
-    var str = "";
-    for (var i = 0; i < binarray.length * 4; i++) {
-      str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) +
-        hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF);
-    }
-    return str;
-  },
-
-  /*
-   * Convert an array of little-endian words to a base-64 string
-   */
-  binl2b64(binarray) {
-    var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-    var str = "";
-    for (var i = 0; i < binarray.length * 4; i += 3) {
-      var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16) |
-        (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8) |
-        ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF);
-      for (var j = 0; j < 4; j++) {
-        if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
-        else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F);
-      }
-    }
-    return str;
-  }
-
-}

+ 0 - 41
service_exe/src/static/paste.js

@@ -1,41 +0,0 @@
-// (function(){
-    var imgReader = function( item ){
-      var blob = item.getAsFile(),
-        reader = new FileReader();
-      // 读取文件后将其显示在网页中
-      reader.onload = function( e ){
-        var img = new Image();
-   
-        img.src = e.target.result;
-        document.body.appendChild( img );
-      };
-      // 读取文件
-      reader.readAsDataURL( blob );
-    };
-    document.getElementById( 'input' ).addEventListener( 'paste', function( e ){
-       // 添加到事件对象中的访问系统剪贴板的接口
-      var clipboardData = e.clipboardData,
-        i = 0,
-        items, item, types;
-   
-      if( clipboardData ){
-        items = clipboardData.items;
-        if( !items ){
-          return;
-        }
-        item = items[0];
-        // 保存在剪贴板中的数据类型
-        types = clipboardData.types || [];
-        for( ; i < types.length; i++ ){
-          if( types[i] === 'Files' ){
-            item = items[i];
-            break;
-          }
-        }
-        // 判断是否为图片数据
-        if( item && item.kind === 'file' && item.type.match(/^image\//i) ){
-          imgReader( item );
-        }
-      }
-    });
-//   })(); 

+ 0 - 486
service_exe/src/static/publicMethods.js

@@ -1,486 +0,0 @@
-import frceArr from './frce';
-
-export default {
-	//获取图片
-	imgPreview(file, callback) {
-		let self = this;
-		let name = file.name.split('.')[0]
-		//判断支不支持FileReader
-		if (!file || !window.FileReader) return;
-		if (/^image/.test(file.type)) {
-			//创建一个reader
-			let reader = new FileReader();
-			//将图片转成base64格式
-			reader.readAsDataURL(file);
-			//读取成功后的回调
-			reader.onloadend = function () {
-				let result = this.result;
-				let img = new Image();
-				let formData = new FormData();
-				img.src = result;
-				img.onload = function () {
-					let data = self.compress(img);
-					let blob = self.dataURItoBlob(data);
-					formData.append("file", blob, name + '.jpeg');
-					//图片预览,配置文件,formData数据;
-					callback && callback(data, formData);
-				};
-			};
-		}
-	},
-	// 压缩图片
-	compress(img) {
-		let canvas = document.createElement("canvas");
-		let ctx = canvas.getContext("2d");
-		// let initSize = img.src.length;
-		let width = img.width;
-		let height = img.height;
-		canvas.width = width;
-		canvas.height = height;
-		// 铺底色
-		ctx.fillStyle = "#fff";
-		ctx.fillRect(0, 0, canvas.width, canvas.height);
-		ctx.drawImage(img, 0, 0, width, height);
-
-		//进行压缩
-		let ndata = canvas.toDataURL("image/jpeg", 0.4);
-		// console.log("*******压缩后的图片大小*******");
-		// console.log(ndata)
-		return ndata;
-	},
-
-	// base64转成bolb对象
-	dataURItoBlob(base64Data) {
-		var byteString;
-		if (base64Data.split(",")[0].indexOf("base64") >= 0)
-			byteString = atob(base64Data.split(",")[1]);
-		else byteString = unescape(base64Data.split(",")[1]);
-		var mimeString = base64Data
-			.split(",")[0]
-			.split(":")[1]
-			.split(";")[0];
-		var ia = new Uint8Array(byteString.length);
-		for (var i = 0; i < byteString.length; i++) {
-			ia[i] = byteString.charCodeAt(i);
-		}
-		return new Blob([ia], {type: mimeString});
-	},
-
-
-	//
-	setApiToken(name, controller, time, modules) {
-		let str = name + 'customer-service' + controller + time + modules
-		return str.toLocaleLowerCase()
-	},
-
-	/**
-	 * 时间戳转日期自定义时间格式
-	 * timeStamp:时间戳
-	 * custom:转换日期时定义年月日用是什么符号隔开
-	 * isDtae:0=月份、1=日期、3=时间
-	 */
-	customFormatDateTime(timeStamp, custom, isDtae) {
-		var date = new Date();
-		date.setTime(timeStamp * 1000);
-		var y = date.getFullYear();
-		var m = date.getMonth() + 1;
-		m = m < 10 ? ('0' + m) : m;
-		var d = date.getDate();
-		d = d < 10 ? ('0' + d) : d;
-		var h = date.getHours();
-		h = h < 10 ? ('0' + h) : h;
-		var minute = date.getMinutes();
-		var second = date.getSeconds();
-		minute = minute < 10 ? ('0' + minute) : minute;
-		second = second < 10 ? ('0' + second) : second;
-		if (isDtae == 0) {
-			return y + custom + m //+'student';
-		} else if (isDtae == 1) {
-			return y + custom + m + custom + d;
-		} else if (isDtae == 3) {
-			return h + ':' + minute //+ ':' + second;
-		} else {
-			return y + '-' + m + '-' + d + ' ' + h + ':' + minute //+ ':' + second;
-		}
-	},
-
-	/*****************提示关键字及记录次数******************/
-	/**
-	 *
-	 * @param {*} data
-	 * @param {*} sensitive
-	 * @param {*}
-	 */
-	shieldingKeyword(data, sensitive) {
-		//将敏感词组用|转换字符串
-		let snstive = sensitive.join('|');
-		let num = 0, text = '';
-		//匹配出会话中的敏感词
-		data.replace(eval('/' + snstive + '/g'), (res) => {
-			text += ',' + res;
-			num++;
-		})
-		return {
-			text,
-			num
-		}
-	},
-
-	/*****************用户屏蔽关键字******************/
-	/**
-	 *
-	 * @param {*} data
-	 * @param {*} sensitive
-	 * @param {*}
-	 */
-	userShieldingKeyword(data, sensitive) {
-		//将敏感词组用|转换字符串
-		let snstive = sensitive.join('|');
-		let num = 0, text = '';
-		//匹配出会话中的敏感词
-		return data.replace(eval('/' + snstive + '/g'), (res) => {
-			var str = '';
-			for (var i = 0; i < res.length; i++) {
-				str += '*';
-			}
-			return str;
-		})
-	},
-
-
-	/******************访客接入*********************/
-	/**
-	 *
-	 * @param {object} redata  接收消息源
-	 * @param {Array} offlineList  访客离线列表
-	 * @param {Array} sessionList  访客会话列表
-	 * @param {int} sessionType 选择列表状态默认未1(1是会话中,2是离线)
-	 * @param {int} dataIndex  定位当前会话,默认是0
-	 * @param {Array} dataList 当前会话信息列表
-	 * @param {string} user_name 当前会话访客名
-	 * @param {function} callback   访客匹配离线列表处理后链接回调方法
-	 * @param {function} callback1   访客正常链接回调方法
-	 */
-	visitorsConnect([redata, offlineList, sessionList, sessionType, dataIndex, dataList, user_name], callback, callback1) {
-		// console.log('将会话工单写入访客信息',redata);
-		// console.log('访客信息评价',evaluate);
-		if (redata.evaluate_id > 0) {
-			redata.user_info.isEva = 10;
-		}
-		//将会话工单写入访客信息
-		redata.user_info.conversationId = redata.conversationId;
-		//默认离线列表没有访客信息
-		let isTrue = true;
-		let name = '';
-		let sessionInfo = '';
-
-		//匹配是否是离线用户上线
-		if (offlineList.length > 0) {
-			for (let i = 0; i < offlineList.length; i++) {
-				//匹配离线列表是否有这个用户
-				if (offlineList[i].id == redata.user_info.id) {
-					//查询离线列表是否有此用户会话工单未结束
-					if (offlineList[i].conversationId == redata.conversationId) {
-						// console.log(sessionType,offlineList);
-						//工单号未结束的数据获取历史聊天消息和对象名字
-						if (sessionType == 2 && i == dataIndex) {//客服选中离线重新链接访客
-							dataList = [];
-							dataList = offlineList[i].data;
-							name = offlineList[i].nick_name ? offlineList[i].nick_name : offlineList[i].name;
-							sessionType = 1;
-							dataIndex = sessionList.length == 0 ? 0 : sessionList.length - 1;
-						} else if (sessionType == 2 && i < dataIndex) {//客服选中离线列表重新链接访客后面的访客
-							if (i > 0) {
-								dataList = offlineList[i].data;
-								name = offlineList[i].nick_name ? offlineList[i].nick_name : offlineList[i].name;
-							}
-						} else {
-							name = redata.user_info.nick_name ? redata.user_info.nick_name : redata.user_info.name;
-						}
-						//将掉线前聊天消息写入到用户对象里面
-						redata.user_info.data = offlineList[i].data;
-					} else {
-						//工单号已结束数据处理
-						if (dataIndex == 0 && sessionList.length == 0) {
-							name = redata.user_info.nick_name ? redata.user_info.nick_name : redata.user_info.name;
-							dataList = [];
-						}
-						redata.user_info.data = [];
-					}
-					//获取离线列表数据
-					sessionInfo = offlineList[i]
-					//将离线状态用户删除
-					offlineList.splice(i, 1);
-
-					isTrue = false;
-					//回调
-					callback && callback(offlineList);
-					break;
-				}
-			}
-		}
-
-		//新访客链接
-		if (isTrue) {
-			if (sessionList.length == 0) {
-				//判断是否选离线用户列表
-				if (offlineList.length > 0 && sessionType == 2) {
-					//不做处理
-
-				} else {
-					dataIndex = 0;
-					sessionType = 1;
-					// console.log(redata.user_info.nick_name,redata.user_info.name);
-					name = redata.user_info.nick_name ? redata.user_info.nick_name : redata.user_info.name;
-					dataList = [];
-				}
-			} else {
-				for (let i = 0; i < sessionList.length; i++) {
-					//匹配离线列表是否有这个用户
-					if (sessionList[i].id == redata.user_info.id) {
-						sessionList.splice(i, 1);
-						break;
-					}
-				}
-
-				//判断接入用户是否有昵称展示
-				redata.user_info.name = redata.user_info.nick_name ? redata.user_info.nick_name : redata.user_info.name;
-			}
-			//历史会话消息
-			if (redata.history.length > 0) {
-				let chatData = [];
-				redata.history.forEach(e => {
-					let content = JSON.parse(e.content);
-					let obj = {
-						text: this.turnFace(content.text, frceArr.frce),
-						img: content.img,
-						type: false,
-					};
-					if (e.from_id.startsWith("KF")) {
-						//this.turnFace(redata.content.text,frceArr.frce);
-						chatData.push({
-							type: 'service',
-							content: obj,
-							time: this.customFormatDateTime(e.time_line, '', 3)
-						})
-					} else {
-						chatData.push({type: 'user', content: obj, time: this.customFormatDateTime(e.time_line, '', 3)})
-					}
-				})
-				redata.user_info.data = chatData;
-				dataList = chatData;
-			} else {
-				redata.user_info.data = [];
-			}
-		} else {
-			redata.user_info.data = sessionInfo.data
-		}
-		// console.log(name);
-		//回调
-		callback1 && callback1(redata, sessionList, offlineList, sessionType, dataIndex, dataList, name);
-	},
-
-	/*****************用户会话离线及相关数据*********************/
-	/**
-	 * @param {object} redata  接收消息源
-	 * @param {Array} sessionList  访客会话列表
-	 * @param {Array} offlineList  访客离线列表
-	 * @param {int} sessionType 选择列表状态默认未1(1是会话中,2是离线)
-	 * @param {int} dataIndex  定位当前会话,默认是0
-	 * @param {string} user_name 当前会话访客名
-	 * @param {Array} dataList 当前会话信息列表
-	 * @param {*} callback  回调函数
-	 */
-	userOffline([redata, sessionList, offlineList, sessionType, dataIndex, user_name, dataList], callback) {
-		let userInfo = [];
-		for (let i = 0; i < sessionList.length; i++) {
-			//匹配会话中离线用户
-			if (sessionList[i].id == redata.id) {
-				//把数据添加到离线列表
-				offlineList.push(sessionList[i]);
-				//用户选中状态会话中处理
-				if (sessionType == 1) {
-					//判断会话中列表长度
-					if (sessionList.length > 1) {
-						//判断是否离线用户是当前选中状态
-						if (dataIndex == i) {
-							dataIndex = 0;
-							user_name = sessionList[0].name;
-							dataList = sessionList[0].data;
-							userInfo = sessionList;
-						}
-						//删除会话列表离线用户
-						sessionList.splice(i, 1);
-					} else {
-						sessionType = 2;
-						dataIndex = 0;
-						user_name = offlineList[0].name;
-						dataList = offlineList[0].data;
-						userInfo = offlineList;
-						sessionList.splice(i, 1);
-					}
-				}
-				callback && callback(sessionList, offlineList, sessionType, dataIndex, user_name, dataList, userInfo);
-				break;
-			}
-		}
-	},
-
-	/**************删除会话中离线用户及相关数据**************/
-	/**
-	 * @param {object} redata  接收消息源
-	 * @param {Array} sessionList  访客会话列表
-	 * @param {Array} offlineList  访客离线列表
-	 * @param {int} sessionType 选择列表状态默认未1(1是会话中,2是离线)
-	 * @param {int} dataIndex  定位当前会话,默认是0
-	 * @param {string} user_name 当前会话访客名
-	 * @param {Array} dataList 当前会话信息列表
-	 * @param {*} callback  回调函数
-	 */
-
-	sessionEnd([redata, sessionList, offlineList, sessionType, dataIndex, user_name, dataList], callback) {
-		let isTrue = true;
-		let userInfo = [];
-		// console.log('哈哈',sessionList);
-		//会话中列表匹配
-		if (sessionList.length > 0) {
-			for (let i = 0; i < sessionList.length; i++) {
-				//检测会话列表中是否有结束的会话对象
-				if (sessionList[i].id == redata.id) {
-					//删除会话列表中结束的会话对象用户信息
-					sessionList.splice(i, 1);
-					// this.$store.dispatch("SET_SESSION",sessionList);
-					if (sessionType == 1) {
-						if (sessionList.length > 1) {
-							//处理会话显现状态
-							if (dataIndex == i) {
-								user_name = sessionList[0].name;
-								dataList = sessionList[0].data;
-								userInfo = sessionList;
-							}
-						} else {
-							if (offlineList.length > 0) {
-								sessionType = 2;
-								dataIndex = 0;
-								userInfo = offlineList;
-							} else {
-								user_name = '';
-								dataList = [];
-								userInfo = '';
-							}
-						}
-					}
-					isTrue = false;
-					break;
-				}
-			}
-		}
-		//离线列表查询
-		if (isTrue) {
-			for (let i = 0; i < offlineList.length; i++) {
-				//判断离线列表是否结束会话
-				if (offlineList[i].id == redata.id) {
-					//删除离线列表中结束会话的用户信息
-					offlineList.splice(i, 1);
-					// this.$store.dispatch("SET_OFFLINE",offlineList);
-					if (sessionType == 2) {
-						if (dataIndex == i) {
-							if (offlineList.length > 1) {
-								if (sessionList.length > 0) {
-									dataList = sessionList[0].data;
-									user_name = sessionList[0].name;
-									userInfo = sessionList;
-								} else {
-									dataList = offlineList[0].data;
-									user_name = offlineList[0].name;
-									userInfo = offlineList;
-								}
-							} else {
-								if (sessionList.length > 0) {
-									dataList = sessionList[0].data;
-									user_name = sessionList[0].name;
-									userInfo = sessionList;
-								} else {
-									dataList = [];
-									user_name = '';
-									userInfo = '';
-								}
-							}
-						}
-					}
-					break;
-				}
-			}
-		}
-		console.log('测试掉线', sessionList);
-		//回调
-		callback && callback(sessionList, offlineList, sessionType, dataIndex, user_name, dataList, userInfo);
-
-	},
-
-
-	/*****************接收用户会话消息***************/
-	/**
-	 *
-	 * @param {*} redata 数据源
-	 * @param {*} sessionList 会话列表
-	 * @param {*} frce 表情数据源
-	 * @param {*} callback  回调
-	 */
-	receivesMessage(redata, sessionList, frce, callback) {
-		let dataIndex = 0;
-		if(sessionList.length<1){
-			return -2001;
-		}
-		//匹配是那个用户回的消息
-		for (let i = 0; i < sessionList.length; i++) {
-			if (sessionList[i].id == redata.id) {
-				dataIndex = i;
-				break;
-			}
-		}
-
-
-		//获取当前回复消息对象
-		let chatList = sessionList[dataIndex]
-
-		redata.type = 'user';
-		redata.content = JSON.parse(redata.content);
-		//这个地方转
-		redata.content.text = this.turnFace(redata.content.text, frce);
-		//将消息添加对应的会话列表中
-		chatList.data.push(redata);
-		callback && callback(redata, chatList, dataIndex);
-	},
-
-	/******************文字信息转表情******************/
-	/**
-	 * @param {*} data
-	 * @param {*} frce
-	 */
-	turnFace(data, frce) {
-		let str = data.match(/\#\[.*?\]\//g);
-		let arr = Array.from(new Set(str));
-		arr.forEach(e => {
-			let imgsrc = '';
-			for (let i = 0; i < frce.length; i++) {
-				let expText = e.slice(1, e.length - 1);
-				if (expText == frce[i]) {
-					imgsrc = '<img class="hover" src="' + require(`@/assets/img/${i}.gif`) + '"/>'
-					break;
-				}
-			}
-			data = data.replace(new RegExp(`\\#\\[${e.substring(2, e.length - 2)}\\]\\/`, 'g'), imgsrc);
-		})
-		return data;
-	},
-
-	getQueryString(name) {
-		var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
-		var r = window.location.search.substr(1).match(reg);
-		if (r != null) {
-			return unescape(r[2]);
-		}
-		return null;
-	}
-}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio