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