|
|
@@ -166,7 +166,7 @@
|
|
|
class="el-icon-postcard hover evaluation"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <textarea draggable="false" class="input scroll" id="input" v-model="inputValue"
|
|
|
+ <textarea draggable="false" class="input scroll" id="input" v-model.trim="inputValue"
|
|
|
@keyup.enter="listenEnter($event)" @keyup.ctrl.enter="lineFeed()"></textarea>
|
|
|
<div class="row rightAlignment" style="width: 100%;">
|
|
|
<div @click="sendMessage()" class="msgInputBtn row center">发送</div>
|
|
|
@@ -409,7 +409,7 @@
|
|
|
|
|
|
/************回车提交************/
|
|
|
listenEnter(event) {
|
|
|
- if (event.keyCode === 13) {
|
|
|
+ if(event.keyCode === 13) {
|
|
|
this.inputValue = this.inputValue.replace(/\s/g, '')
|
|
|
// this.inputValue = this.inputValue.replace(/\n /g,'')
|
|
|
this.sendMessage(); // 发送文本
|
|
|
@@ -554,6 +554,7 @@
|
|
|
} else {
|
|
|
this.$public.imgPreview(picavalue, function (imgSrc, formData) {
|
|
|
self.upImg(formData)
|
|
|
+ e.target.value = "";
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -564,6 +565,7 @@
|
|
|
// 数据结构请求
|
|
|
self.$http.uploadPost('/index/upload/uploadImg', formData).then(res => {
|
|
|
//console.log(res.data.data.src)
|
|
|
+
|
|
|
if (res.data.code == 1) {
|
|
|
let isFirst = true;
|
|
|
//判断客服是否发送的第一句话
|
|
|
@@ -648,6 +650,7 @@
|
|
|
|
|
|
/*****************切换用户会话对象******************/
|
|
|
chooseDialogue(type, index) {
|
|
|
+ this.inputValue = '' // 清除会话内容
|
|
|
if (this.userSwitching) {
|
|
|
let data = [];
|
|
|
let order_id = '';
|
|
|
@@ -747,8 +750,7 @@
|
|
|
|
|
|
/*********************发送消息*********************/
|
|
|
sendMessage() {
|
|
|
- console.log(this.sessionList);
|
|
|
-
|
|
|
+ console.log(this.inputValue);
|
|
|
if (!this.inputValue) return;
|
|
|
if (this.sessionType == 2) {
|
|
|
this.$message({
|