|
|
@ -6,13 +6,13 @@
|
|
|
|
<meta name="author" content="陶士涵">
|
|
|
|
<meta name="author" content="陶士涵">
|
|
|
|
<title>GO-FLY咨询页</title>
|
|
|
|
<title>GO-FLY咨询页</title>
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/theme-chalk/index.css">
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/theme-chalk/index.css">
|
|
|
|
<script src="/static/js/functions.js"></script>
|
|
|
|
<script src="/static/js/functions.js?v=0.1.1"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/index.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/index.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
|
|
|
<!-- Bootstrap core CSS -->
|
|
|
|
<!-- Bootstrap core CSS -->
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
|
|
|
<link rel="stylesheet" href="/static/css/common.css" />
|
|
|
|
<link rel="stylesheet" href="/static/css/common.css?v=0.1.1" />
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
html,
|
|
|
|
html,
|
|
|
|
body {
|
|
|
|
body {
|
|
|
@ -25,7 +25,7 @@
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
text-align: left;
|
|
|
|
text-align: left;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
margin-bottom: 69px;
|
|
|
|
margin-bottom: 86px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.chatBox{
|
|
|
|
.chatBox{
|
|
|
|
/*max-height: 600px;*/
|
|
|
|
/*max-height: 600px;*/
|
|
|
@ -72,16 +72,16 @@
|
|
|
|
.chatBoxMe .el-col-3{float: right;text-align: right;}
|
|
|
|
.chatBoxMe .el-col-3{float: right;text-align: right;}
|
|
|
|
.chatBoxMe .chatUser{text-align: right}
|
|
|
|
.chatBoxMe .chatUser{text-align: right}
|
|
|
|
.chatBoxMe .chatContent:after{left:auto;right: -10px;}
|
|
|
|
.chatBoxMe .chatContent:after{left:auto;right: -10px;}
|
|
|
|
.chatArea{float: left;width: 79%;margin: 4px 0 0 4px;}
|
|
|
|
.chatArea{float: left;width: 89%;margin: 4px 0 0 4px;}
|
|
|
|
.btnArea{width: 20%;float: right;}
|
|
|
|
.btnArea{width: 10%;float: right;}
|
|
|
|
@media screen and (max-width: 500px) {
|
|
|
|
@media screen and (max-width: 500px) {
|
|
|
|
body{background: #fff}
|
|
|
|
body{background: #fff}
|
|
|
|
.chatArea {width: 66%;}
|
|
|
|
.chatArea {width: 70%;}
|
|
|
|
.btnArea{width: 32%;}
|
|
|
|
.btnArea{width: 20%;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.chatTitle{height: 30px;line-height: 30px;color: #1989fa}
|
|
|
|
.chatTitle{height: 30px;line-height: 30px;color: #1989fa}
|
|
|
|
.chatBoxSend{background: #f5f5f5;position: fixed;bottom: 0;width: 100%;height: 67px;max-width: 800px;}
|
|
|
|
.chatBoxSend{background: #f5f5f5;position: fixed;bottom: 0;width: 100%;height: 86px;max-width: 800px;}
|
|
|
|
.chatBoxSendBtn{float: right;margin: 12px 4px 0 0;}
|
|
|
|
.chatBoxSendBtn{float: right;margin: 12px 4px 0 0;}
|
|
|
|
.chatTime{text-align: center;color: #bbb;margin: 5px 0;font-size: 12px;}
|
|
|
|
.chatTime{text-align: center;color: #bbb;margin: 5px 0;font-size: 12px;}
|
|
|
|
.chatTimeHide{display: none;}
|
|
|
|
.chatTimeHide{display: none;}
|
|
|
@ -118,6 +118,11 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="chatBoxSend">
|
|
|
|
<div class="chatBoxSend">
|
|
|
|
|
|
|
|
<div class="iconBtns">
|
|
|
|
|
|
|
|
<div class="faceBtn visitorFaceBtn"></div>
|
|
|
|
|
|
|
|
<div class="imageBtn visitorImageBtn" id="uploadImg" v-on:click="uploadImg('/uploadimg')"></div>
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<el-input type="textarea" class="chatArea" v-model="messageContent" v-on:keyup.enter.native="chatToUser"></el-input>
|
|
|
|
<el-input type="textarea" class="chatArea" v-model="messageContent" v-on:keyup.enter.native="chatToUser"></el-input>
|
|
|
|
<div class="faceBox visitorFaceBox">
|
|
|
|
<div class="faceBox visitorFaceBox">
|
|
|
|
<ul class="faceBoxList">
|
|
|
|
<ul class="faceBoxList">
|
|
|
@ -127,8 +132,6 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="btnArea">
|
|
|
|
<div class="btnArea">
|
|
|
|
<el-button type="primary" class="chatBoxSendBtn" size="small" v-on:click="chatToUser">{{.SendBtn}}</el-button>
|
|
|
|
<el-button type="primary" class="chatBoxSendBtn" size="small" v-on:click="chatToUser">{{.SendBtn}}</el-button>
|
|
|
|
<div class="faceBtn visitorFaceBtn"></div>
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -436,6 +439,40 @@
|
|
|
|
$('.faceBox').hide();
|
|
|
|
$('.faceBox').hide();
|
|
|
|
this.messageContent+="face"+this.face[index].name;
|
|
|
|
this.messageContent+="face"+this.face[index].name;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//上传图片
|
|
|
|
|
|
|
|
uploadImg (url){
|
|
|
|
|
|
|
|
let _this=this;
|
|
|
|
|
|
|
|
$('#uploadImg').after('<input type="file" id="uploadImgFile" name="file" style="display:none" >');
|
|
|
|
|
|
|
|
$("#uploadImgFile").click();
|
|
|
|
|
|
|
|
$("#uploadImgFile").change(function (e) {
|
|
|
|
|
|
|
|
var formData = new FormData();
|
|
|
|
|
|
|
|
var file = $("#uploadImgFile")[0].files[0];
|
|
|
|
|
|
|
|
formData.append("imgfile",file); //传给后台的file的key值是可以自己定义的
|
|
|
|
|
|
|
|
filter(file) && $.ajax({
|
|
|
|
|
|
|
|
url: url || '',
|
|
|
|
|
|
|
|
type: "post",
|
|
|
|
|
|
|
|
data: formData,
|
|
|
|
|
|
|
|
contentType: false,
|
|
|
|
|
|
|
|
processData: false,
|
|
|
|
|
|
|
|
dataType: 'JSON',
|
|
|
|
|
|
|
|
mimeType: "multipart/form-data",
|
|
|
|
|
|
|
|
success: function (res) {
|
|
|
|
|
|
|
|
if(res.code!=200){
|
|
|
|
|
|
|
|
_this.$message({
|
|
|
|
|
|
|
|
message: res.msg,
|
|
|
|
|
|
|
|
type: 'error'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
_this.messageContent+='img[/' + res.result.path + ']';
|
|
|
|
|
|
|
|
_this.chatToUser();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function (data) {
|
|
|
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created: function () {
|
|
|
|
created: function () {
|
|
|
|
this.init();
|
|
|
|
this.init();
|
|
|
|