|
|
@@ -511,7 +511,7 @@
|
|
|
// 转接历史信息
|
|
|
if (redata.message_type == "connect") {
|
|
|
if (redata.data.history.length > 0) {
|
|
|
- //console.log(redata, '转接历史消息');
|
|
|
+ console.log(redata, '转接历史消息');
|
|
|
this.showHistoryList = true;
|
|
|
redata.data.history.forEach(res => {
|
|
|
let content = JSON.parse(res.content)
|
|
|
@@ -562,7 +562,7 @@
|
|
|
upImg(formData) {
|
|
|
let self = this;
|
|
|
// 数据结构请求
|
|
|
- self.post('api/' + self.$ports.uploadImg, formData).then(res => {
|
|
|
+ self.$http.post(self.$ports.uploadImg, formData).then(res => {
|
|
|
//console.log(res.data.data.src)
|
|
|
if (res.data.code == 1) {
|
|
|
let isFirst = true;
|
|
|
@@ -883,15 +883,14 @@
|
|
|
|
|
|
/*****************获取当前聊天用户信息****************/
|
|
|
get_user(id,type,index) {
|
|
|
- // console.log(id,type,index)
|
|
|
let obj = {
|
|
|
- headers: {
|
|
|
- "apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + 'service'),
|
|
|
- 'userToken': this.token
|
|
|
- },
|
|
|
account_id: id
|
|
|
};
|
|
|
- this.post('api' + this.$ports.userInfo.accountInfo, obj).then(res => {
|
|
|
+ let headers ={ headers: {
|
|
|
+ "apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + 'service'),
|
|
|
+ 'userToken': this.token
|
|
|
+ },}
|
|
|
+ this.$http.post(this.$ports.userInfo.accountInfo,obj,headers).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.session_user_info = res.data.data;
|
|
|
this.value = res.data.data.label
|
|
|
@@ -922,7 +921,7 @@
|
|
|
userToken: this.token
|
|
|
}
|
|
|
};
|
|
|
- this.get("api/" + this.$ports.minRound, obj).then(res => {
|
|
|
+ this.$http.get( this.$ports.minRound,obj).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.trigger_condition = res.data.data.systemconfig_data;
|
|
|
}
|
|
|
@@ -946,7 +945,7 @@
|
|
|
'userToken': this.token
|
|
|
}
|
|
|
};
|
|
|
- this.post('api' + this.$ports.sensitiveWords, '', obj).then(res => {
|
|
|
+ this.$http.post(this.$ports.sensitiveWords, '', obj).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
res.data.data.serverSensitive.forEach(res => {
|
|
|
this.sensitive.push(res.sensitivewords_word)
|
|
|
@@ -976,10 +975,6 @@
|
|
|
if (!this.isTrue) return false;
|
|
|
this.isTrue = false;
|
|
|
let obj = {
|
|
|
- headers: {
|
|
|
- "apiToken": this.$md5('update' + "customer-service" + 'service' + 'service'),
|
|
|
- 'userToken': this.token
|
|
|
- },
|
|
|
account_id: this.session_user_info.id,
|
|
|
nick_name: this.session_user_info.nick_name,
|
|
|
account_email: this.session_user_info.account_email,
|
|
|
@@ -989,8 +984,14 @@
|
|
|
label_id: this.label_id
|
|
|
|
|
|
};
|
|
|
+ let headers={
|
|
|
+ headers: {
|
|
|
+ "apiToken": this.$md5('update' + "customer-service" + 'service' + 'service'),
|
|
|
+ 'userToken': this.token
|
|
|
+ },
|
|
|
+ }
|
|
|
|
|
|
- this.post('api' + this.$ports.userInfo.update, obj).then(res => {
|
|
|
+ this.$http.post(this.$ports.userInfo.update, obj,headers).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.websocketsend(JSON.stringify({"type":"updateusercache","data":{"userid":this.session_user_info.id}}))
|
|
|
this.$message({
|