소스 검색

update pc_chat

luke 6 년 전
부모
커밋
293e297ecb
1개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 9 9
      pc_chat/src/components/chat.vue

+ 9 - 9
pc_chat/src/components/chat.vue

@@ -570,7 +570,7 @@
 				dialogUrl: false,
 				serviceInfor: '', //客服信息
 				websock: null, //会话初始值
-				currTime: "", //获取系统时间
+				// currTime: "", //获取系统时间
 				apiToken: '',//系统Token
 				machine: [], //机器会话信息
 
@@ -1080,7 +1080,7 @@
 				this.$axios.post('/api/index/groups/index', {}, {
 					headers: {
 						'Content-Type': 'application/x-www-form-urlencoded',
-						'apiToken': this.setApiToken('index', 'groups', this.currTime, 'index')
+						'apiToken': this.setApiToken('index', 'groups', 'index')
 					}
 				}).then(res => {
 					if (res.data.code == 1) {
@@ -1124,7 +1124,7 @@
 				this.$axios.post('/api/index/robot/index', {groups_id: 1, robotgroups_id: 1}, {
 					headers: {
 						'Content-Type': 'application/x-www-form-urlencoded',
-						'apiToken': this.setApiToken('index', 'robot', this.currTime, 'index')
+						'apiToken': this.setApiToken('index', 'robot', 'index')
 					}
 				}).then(res => {
 					if (res.data.code == 1) {
@@ -1138,7 +1138,7 @@
 				this.$axios.post('/api/index/evaluate/minRound', '', {
 					headers: {
 						'Content-Type': 'application/x-www-form-urlencoded',
-						'apiToken': this.setApiToken('minround', 'evaluate', this.currTime, 'index')
+						'apiToken': this.setApiToken('minround', 'evaluate', 'index')
 					}
 				}).then(res => {
 					if (res.data.code == 1) {
@@ -1168,7 +1168,7 @@
 			/**************初始化WebSocket****************/
 			initWebSocket() {
 				let _this = this;
-				let apiToken = this.$md5.hex_md5('customer-service' + this.currTime + window.location.origin);
+				let apiToken = this.$md5.hex_md5('customer-service' + window.location.origin);
 				this.websock = new WebSocket('ws://103.108.43.176:9101?apiToken=' + apiToken);
 				// this.websock = new WebSocket('ws://192.168.2.187:9101?apiToken=' + apiToken);
 				this.websock.debug = true;
@@ -1562,8 +1562,8 @@
 			},
 
 			/*************设置token加密***************** */
-			setApiToken(name, controller, time, modules) {
-				return this.$md5.hex_md5(name + 'customer-service' + controller + time + modules)
+			setApiToken(name, controller,modules) {
+				return this.$md5.hex_md5(name + 'customer-service' + controller + modules)
 			},
 
 			/*************跳转人工客服***************** */
@@ -1661,7 +1661,7 @@
 				let obj = {
 					headers: {
 						'Content-Type': 'application/x-www-form-urlencoded',
-						"apiToken": this.setApiToken('sensitivewords', 'index', this.currTime, 'index')
+						"apiToken": this.setApiToken('sensitivewords', 'index','index')
 					}
 				};
 				let data = {
@@ -1701,7 +1701,7 @@
 					// 获取系统时间
 					let date = res.data.data.time.split(" ");
 					date[0] = (new Date(date[0].replace(/-/g, '/')).getTime()) / 1000;
-					this.currTime = date[0];
+					// this.currTime = date[0];
 					this.hourse = date[1];
 					this.logo = res.data.data.logo;
 					// 获取机器智能问题