123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934 |
- <template>
- <div class="contact-box" id="contact-box">
- <div class="contact-box-item msg-box" >
- <div class="box-btn " @click="toggleMsgBox">
- <i class="el-icon-service"></i>
- <span>在线客服</span>
- </div>
- <div class="contact-msg-box" v-show="showMsgBox">
- <div class="msg-box-panel">
- <div class="panel-header">
- <i class="el-icon-close kf-close" @click="showMsgBox=false"></i>
- <p class="kf-h-line">酷医云在线客服</p>
- <div class="clearfix"></div>
- </div>
- <div class="panel-body">
- <ul class="msg-inner scroll-y">
- <li v-for="(messageitem, key) in messageBox" :key="key" :id="'id_'+messageitem.id" class="cell clearfix" :class="messageitem.float=='right'?'cell_right':''">
- <template v-if="messageitem.float=='right'">
- <div class="msg_body fl">
- <div class="inner" v-html="messageitem.message"></div>
- </div>
- <div class="cell_pic fl">
- <div class="pic">
- <img :src="messageitem.avatar" alt="">
- </div>
- </div>
- </template>
- <template v-else>
- <div class="cell_pic fl">
- <div class="pic">
- <img :src="messageitem.avatar" alt="">
- </div>
- </div>
- <div class="msg_body fl">
- <div class="inner" v-html="messageitem.message"></div>
- </div>
- </template>
- </li>
- </ul>
- </div>
- <div class="panel-tool">
- <i class="icon-face" title="表情" @click="showEmotion"></i>
- <el-upload
- class="avatar-uploader"
- action="https://jsonplaceholder.typicode.com/posts/"
- :show-file-list="false"
- :http-request='handleIMPicUload'
- :on-success="handleIMPicSuccess"
- :before-upload="beforeIMPicUpload">
- <i class="el-icon-picture" title="图片"></i>
- </el-upload>
- <div class="face-box" v-show="showFace">
- <div class="face-box-title">
- <span>表情</span>
- <i class="el-icon-close " @click="showFace=false" style="float:right" ></i>
- </div>
- <ul class="face-box-list clearfix">
- <li v-for="(faceitem, index) in facelist" :key="index" @click="selectEmotion(faceitem)" >
- <img :src="faceitem[1]" :id="faceitem[0]" alt="">
- </li>
- </ul>
- </div>
-
- </div>
- <div class="panel-booter">
- <div class="msg-input-box">
- <textarea class="textarea scroll-y message-textarea" v-model="message" placeholder="请输入"></textarea>
- </div>
- <div class="msg-send-btn-box">
- <span class="time fl">服务时间:工作时间:9:00-22:00 节假日:9:00-18:00</span>
- <el-button type="primary" icon="el-icon-edit" class="fr" size="mini" @click="sendMessage">发送</el-button>
-
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="contact-box-item phone-box">
- <div class="box-btn" @click="togglePhoneBox">
- <i class="el-icon-phone-outline"></i>
- <span>客服电话</span>
- </div>
- <div class="contact-phone-box" v-show="showPhoneBox">
- <i class="el-icon-phone-outline" ></i>
- <span>0755-86526342</span>
- </div>
- </div>
- </div>
- </template>
- <script>
- import {getusersig} from "@/api/kefu/tencentim";
- import webim from 'webim-tencent';
- let selType = webim.SESSION_TYPE.C2C;
- let reqMsgCount = 15;
- var msgList = [];
- var getPrePageC2CHistroyMsgInfoMap = {};
- export default {
- name:'contactBox',
- data(){
- return{
- showMsgBox:false,
- showPhoneBox:false,
- selToID:'',
- loginInfo: {
- sdkAppID: '',
- appIDAt3rd: '',
- identifier: '',
- accountType: '',
- userSig: '',
- identifierNick: '',
- headurl: '',
- },
- useradmin:{
- usersig: '',
- Indentifier: '',
- appIDAt3rd:'',
- IdentifierNick:'',
- HeadURL:'',
- },
- kefuUrl:'https://images.shengws.com/ico_gjh.png',
- userSigFlag:false,
- imloginFlag:false,
- message:'',
- messageBox:[],
- facelist:[],
- showFace:false,
- }
- },
- created(){
-
- this.getusersig();
- },
- methods:{
- getusersig() {
- getusersig().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.useradmin = {
- usersig: response.data.data.sig,
- Indentifier: response.data.data.Indentifier,
- appIDAt3rd:response.data.data.appIDAt3rd,
- IdentifierNick:response.data.data.IdentifierNick,
- HeadURL:response.data.data.HeadURL,
- }
-
- this.loginInfo.appIDAt3rd = this.useradmin.appIDAt3rd
- this.loginInfo.identifier = this.useradmin.Indentifier
- this.loginInfo.userSig = this.useradmin.usersig
- this.loginInfo.identifierNick = this.useradmin.IdentifierNick
- this.loginInfo.headurl = this.useradmin.HeadURL
- this.loginInfo.sdkAppID = response.data.data.sdkAppID
- this.loginInfo.accountType = response.data.data.accountType
- this.selToID = response.data.data.selToAdmin;
- this.userSigFlag = true;
- }
- });
- },
- showEmotion:function(){
- this.facelist = [];
- for (const index in webim.Emotions) {
- this.facelist.push(webim.Emotions[index]);
- }
- this.showFace = true;
- },
- selectEmotion:function(face){
- this.message += face[0];
- this.showFace = false;
- },
- sendMessage:function(){
- var message = this.message.trim();
- var msgLen = webim.Tool.getStrBytes(message);
- if(message == '') {
- this.$message.error('不能发送空消息');
- return false;
- }
- var maxLen, errInfo;
- if (selType == webim.SESSION_TYPE.C2C) {
- maxLen = webim.MSG_MAX_LENGTH.C2C;
- errInfo = "消息长度超出限制(最多" + Math.round(maxLen / 3) + "汉字)";
- } else {
- maxLen = webim.MSG_MAX_LENGTH.GROUP;
- errInfo = "消息长度超出限制(最多" + Math.round(maxLen / 3) + "汉字)";
- }
- if (msgLen > maxLen) {
- this.$message.error(errInfo);
- return false;
- }
- this.handleMsgSend(message);
- },
- handleMsgSend(msgContent) {
- var selSess = new webim.Session(selType, this.selToID, this.selToID, this.kefuUrl, Math.round(new Date().getTime() / 1000));
- var isSend = true;
- var seq = -1;
- var random = Math.round(Math.random() * 4294967296);
- var msgTime = Math.round(new Date().getTime() / 1000);
- var subType;
- if (selType == webim.SESSION_TYPE.C2C) {
- subType = webim.C2C_MSG_SUB_TYPE.COMMON;
- } else {
- subType = webim.GROUP_MSG_SUB_TYPE.COMMON;
- }
- var msg = new webim.Msg(selSess, isSend, seq, random, msgTime, this.loginInfo.identifier, subType, this.loginInfo.identifierNick);
-
- var text_obj, face_obj, tmsg, emotionIndex, emotion, restMsgIndex;
-
- var expr = /\[[^[\]]{1,3}\]/mg;
- var emotions = msgContent.match(expr);
- if (!emotions || emotions.length < 1) {
- text_obj = new webim.Msg.Elem.Text(msgContent);
- msg.addText(text_obj);
- } else {
- for (var i = 0; i < emotions.length; i++) {
- tmsg = msgContent.substring(0, msgContent.indexOf(emotions[i]));
- if (tmsg) {
- text_obj = new webim.Msg.Elem.Text(tmsg);
- msg.addText(text_obj);
- }
- emotionIndex = webim.EmotionDataIndexs[emotions[i]];
- emotion = webim.Emotions[emotionIndex];
-
- if (emotion) {
- face_obj = new webim.Msg.Elem.Face(emotionIndex, emotions[i]);
- msg.addFace(face_obj);
- } else {
- text_obj = new webim.Msg.Elem.Text(emotions[i]);
- msg.addText(text_obj);
- }
- restMsgIndex = msgContent.indexOf(emotions[i]) + emotions[i].length;
- msgContent = msgContent.substring(restMsgIndex);
- }
- if (msgContent) {
- text_obj = new webim.Msg.Elem.Text(msgContent);
- msg.addText(text_obj);
- }
- }
-
- msg.PushInfo = {
- "PushFlag": 0,
- "Desc": '测试离线推送内容',
- "Ext": '测试离线推送透传内容',
- "AndroidInfo": {
- "Sound": "android.mp3"
- },
- "ApnsInfo": {
- "Sound": "apns.mp3",
- "BadgeMode": 1
- }
- };
-
- msg.PushInfoBoolean = true;
- msg.sending = 1;
- msg.originContent = msgContent;
-
- var _this = this;
-
- webim.sendMsg(msg, function (resp) {
- _this.addMsg(msg);
- _this.message = '';
- }, function (err) {
- console.log(err)
- });
- },
- addMsg(msg, prepage) {
- var messageitem = {
- id:'',
- message:'',
- avatar:'',
- time:'',
- float:''
- };
- var isSelfSend, fromAccount, fromAccountNick, fromAccountImage, sessType, subType;
-
-
-
- sessType = msg.getSession().type();
- isSelfSend = msg.getIsSend();
- fromAccount = msg.getFromAccount();
- if (!fromAccount) {
- return;
- }
- if (isSelfSend) {
- messageitem.avatar = this.loginInfo.headurl;
- messageitem.float = "right";
- } else {
- messageitem.avatar = this.kefuUrl;
- messageitem.float = "left";
- }
- messageitem.id = msg.random;
- messageitem.time = webim.Tool.formatText2Html(webim.Tool.formatTimeStamp(msg.getTime()));
- messageitem.message = this.convertMsgtoHtml(msg)
- this.messageBox.push(messageitem);
-
- var msgflow = document.getElementsByClassName("msg-inner")[0];
- if (prepage) {
-
- if (msgflow.scrollTop == 0) {
- setTimeout(function () {
- msgflow.scrollTop = 0;
- }, 300);
- }
- } else {
-
- setTimeout(function () {
- msgflow.scrollTop = msgflow.scrollHeight;
- }, 300);
- }
- },
- sendPic(images, imgName) {
- var _this = this;
- if (!this.selToID) {
- alert("请先选择对话用户");
- return;
- }
-
- if (!this.selSess) {
- this.selSess = new webim.Session(selType, this.selToID, this.selToID, this.kefuUrl, Math.round(new Date().getTime() / 1000));
- }
- var msg = new webim.Msg(this.selSess, true, -1, -1, -1, this.loginInfo.identifier, 0, this.loginInfo.identifierNick);
- var images_obj = new webim.Msg.Elem.Images(images.File_UUID);
- for (var i in images.URL_INFO) {
- var img = images.URL_INFO[i];
- var newImg;
- var type;
- switch (img.PIC_TYPE) {
- case 1:
- type = 1;
- break;
- case 2:
- type = 3;
- break;
- case 4:
- type = 2;
- break;
- }
- newImg = new webim.Msg.Elem.Images.Image(type, img.PIC_Size, img.PIC_Width, img.PIC_Height, img.DownUrl);
- images_obj.addImage(newImg);
- }
- msg.addImage(images_obj);
-
-
-
-
-
-
- webim.sendMsg(msg, function (resp) {
- if (selType == webim.SESSION_TYPE.C2C) {
- _this.addMsg(msg);
- }
- }, function (err) {
- alert(err.ErrorInfo);
- });
- },
- bindScrollHistoryEvent(axtion){
- var msgflow = document.getElementsByClassName("msg-inner")[0];
- var _this = this;
- if (axtion=='init') {
- msgflow.onscroll = function () {
- if (msgflow.scrollTop == 0) {
- msgflow.scrollTop = 10;
- if (selType == webim.SESSION_TYPE.C2C) {
- _this.getPrePageC2CHistoryMsgs();
- }
- }
- }
- }else {
- msgflow.onscroll = null;
- }
- },
- getPrePageC2CHistoryMsgs (cbOk, cbError) {
- var _this = this;
- if (selType == webim.SESSION_TYPE.GROUP) {
- _this.$message.error("当前的聊天类型为群聊天,不能进行拉取好友历史消息操作");
- return;
- }
- var tempInfo = getPrePageC2CHistroyMsgInfoMap[_this.selToID];
- var lastMsgTime;
- var msgKey;
- if (tempInfo) {
- lastMsgTime = tempInfo.LastMsgTime;
- msgKey = tempInfo.MsgKey;
- } else {
- _this.$message.error("获取下一次拉取的c2c消息时间和消息Key为空");
- return;
- }
- var options = {
- 'Peer_Account': _this.selToID,
- 'MaxCnt': reqMsgCount,
- 'LastMsgTime': lastMsgTime,
- 'MsgKey': msgKey
- };
- webim.getC2CHistoryMsgs(
- options,
- function (resp) {
- var complete = resp.Complete;
- if (resp.MsgList.length == 0) {
- webim.Log.warn("没有历史消息了:data=" + JSON.stringify(options));
- return;
- }
- getPrePageC2CHistroyMsgInfoMap[_this.selToID] = {
- 'LastMsgTime': resp.LastMsgTime,
- 'MsgKey': resp.MsgKey
- };
- if (cbOk) {
- cbOk(resp.MsgList);
- } else {
- _this.getHistoryMsgCallback(resp.MsgList, true);
- }
- },
- cbError
- );
- },
- getLastC2CHistoryMsgs (cbOk, cbError) {
- var _this = this;
- var lastMsgTime = 0;
- var msgKey = '';
- var options = {
- 'Peer_Account': this.selToID,
- 'MaxCnt': reqMsgCount,
- 'LastMsgTime': lastMsgTime,
- 'MsgKey': msgKey
- };
- this.selSess = null;
- webim.MsgStore.delSessByTypeId(selType, this.selToID);
-
- webim.getC2CHistoryMsgs(
- options,
- function (resp) {
- var complete = resp.Complete;
-
- if (resp.MsgList.length == 0) {
- webim.Log.warn("没有历史消息了:data=" + JSON.stringify(options));
- return;
- }
- getPrePageC2CHistroyMsgInfoMap[_this.selToID] = {
- 'LastMsgTime': resp.LastMsgTime,
- 'MsgKey': resp.MsgKey
- };
-
- if (cbOk)
- cbOk(resp.MsgList);
- },
- cbError
- );
- },
- getHistoryMsgCallback(msgList, prepage) {
- var msg;
- var prepage = prepage || false;
-
-
- if (prepage) {
- msgList.reverse();
- }
-
- for (var j in msgList) {
- msg = msgList[j];
- if (msg.getSession().id() == this.selToID) {
- this.selSess = msg.getSession();
-
- this.addMsg(msg, prepage);
- }
- }
-
- webim.setAutoRead(this.selSess, true, true);
- },
- convertMsgtoHtml(msg) {
- var html = "",
- elems, elem, type, content;
- elems = msg.getElems();
- var count = elems.length;
- for (var i = 0; i < count; i++) {
- elem = elems[i];
- type = elem.getType();
- content = elem.getContent();
- switch (type) {
- case webim.MSG_ELEMENT_TYPE.TEXT:
- var eleHtml = this.convertTextMsgToHtml(content);
-
- html += webim.Tool.formatText2Html(eleHtml);
- break;
- case webim.MSG_ELEMENT_TYPE.FACE:
- html += this.convertFaceMsgToHtml(content);
- break;
- case webim.MSG_ELEMENT_TYPE.IMAGE:
- if (i <= count - 2) {
- var customMsgElem = elems[i + 1];
- var imgName = customMsgElem.getContent().getData();
- html += this.convertImageMsgToHtml(content, imgName);
- i++;
- } else {
- html += this.convertImageMsgToHtml(content);
- }
- break;
- case webim.MSG_ELEMENT_TYPE.SOUND:
- html += this.convertSoundMsgToHtml(content);
- break;
- case webim.MSG_ELEMENT_TYPE.FILE:
- html += this.convertFileMsgToHtml(content);
- break;
- case webim.MSG_ELEMENT_TYPE.LOCATION:
- html += this.convertLocationMsgToHtml(content);
- break;
- case webim.MSG_ELEMENT_TYPE.CUSTOM:
- var eleHtml = this.convertCustomMsgToHtml(content);
-
- html += webim.Tool.formatText2Html(eleHtml);
- break;
- case webim.MSG_ELEMENT_TYPE.GROUP_TIP:
- var eleHtml = this.convertGroupTipMsgToHtml(content);
-
- html += webim.Tool.formatText2Html(eleHtml);
- break;
- default:
- webim.Log.error('未知消息元素类型: elemType=' + type);
- break;
- }
- }
- return html;
- },
- convertTextMsgToHtml(content) {
- return content.getText();
- },
-
- convertFaceMsgToHtml(content) {
- var faceUrl = null;
- var data = content.getData();
- var index = webim.EmotionDataIndexs[data];
-
- var emotion = webim.Emotions[index];
- if (emotion && emotion[1]) {
- faceUrl = emotion[1];
- }
- if (faceUrl) {
- return "<img src='" + faceUrl + "'/>";
- } else {
- return data;
- }
- },
-
- convertImageMsgToHtml(content, imageName) {
- var smallImage = content.getImage(webim.IMAGE_TYPE.SMALL);
- var bigImage = content.getImage(webim.IMAGE_TYPE.LARGE);
- var oriImage = content.getImage(webim.IMAGE_TYPE.ORIGIN);
- if (!bigImage) {
- bigImage = smallImage;
- }
- if (!oriImage) {
- oriImage = smallImage;
- }
- return "<img name='" + imageName + "' src='" + smallImage.getUrl() + "#" + bigImage.getUrl() + "#" + oriImage.getUrl() + "' style='CURSOR: hand' id='" + content.getImageId() + "' bigImgUrl='" + bigImage.getUrl() + "'/>";
- },
- handleIMPicUload:function(fileobj){
- var file = fileobj.file
- console.log("file", file);
- var _this = this;
- var businessType;
- if (selType != webim.SESSION_TYPE.C2C) {
- this.$message.error('不支持群聊');
- return;
- }
- businessType = webim.UPLOAD_PIC_BUSSINESS_TYPE.C2C_MSG;
-
- var opt = {
- 'file': file,
- 'onProgressCallBack': this.onProgressCallBack,
-
- 'To_Account': this.selToID,
- 'businessType': businessType
- };
-
- webim.uploadPic(opt,
- function (resp) {
-
- _this.sendPic(resp, file.name);
-
- },
- function (err) {
- alert(err.ErrorInfo);
- }
- );
- },
- handleIMPicSuccess:function(){},
- beforeIMPicUpload:function(file){
- var fileType = file.type;
- const isJPG = fileType.indexOf("image") > -1;
- if (!isJPG) {
- this.$message.error('只能上传图片');
- }
- return isJPG;
- },
- togglePhoneBox:function(){
- if (this.showPhoneBox) {
- this.showPhoneBox = false;
- }else {
- this.showPhoneBox = true;
- }
- this.showMsgBox = false;
- },
- toggleMsgBox:function(){
- if (this.showMsgBox) {
- this.showMsgBox = false;
- }else {
- this.showMsgBox = true;
- }
- this.showPhoneBox = false;
- },
- webimlogin(){
- let _this = this;
- let listeners = {
- "onConnNotify": this.onConnNotify
- , "jsonpCallback": this.jsonpCallback
- , "onMsgNotify": this.onMsgNotify
- , "onProfileSystemNotifys": this.onProfileSystemNotifys
- , "onKickedEventCall": this.onKickedEventCall
- , "onC2cEventNotifys": this.onC2cEventNotifys
- };
- webim.login(this.loginInfo, listeners, this.loginOptions,
- function(resp){
-
- _this.imloginFlag = true;
- },
- function(err) {
- _this.$message.error('webim登录错误');
- }
- );
- },
- onConnNotify(){},
- jsonpCallback(){},
- onMsgNotify(newMsgList){
-
- var msgList = [];
- var dateStart = null;
- var dateEnd = null;
-
-
- var sess, newMsg, formId;
-
- var sessMap = webim.MsgStore.sessMap();
-
- for (var j in newMsgList) {
-
- newMsg = newMsgList[j];
- formId = newMsg.getSession().id();
- if (formId.indexOf("AdminKeFu")>-1) {
-
- if (newMsg.getSession().id() == this.selToID) {
- this.addMsg(newMsg);
- }
- msgList.push(newMsg.elems[0].content.text);
- }else if(formId.indexOf("User")>-1){
- this.$message.success("有的新的消息,请到客服管理查看")
- }
-
- }
- },
- onProfileSystemNotifys(){},
- onKickedEventCall(){},
- onC2cEventNotifys(){},
- },
- watch:{
- 'userSigFlag':function(value){
- if(this.userSigFlag) {
- this.webimlogin();
- }
- },
- 'imloginFlag':function(value) {
- var _this = this;
- if (this.imloginFlag) {
- this.bindScrollHistoryEvent('reset');
- this.getLastC2CHistoryMsgs(function (msgList) {
- _this.getHistoryMsgCallback(msgList);
- _this.bindScrollHistoryEvent('init');
-
- }, function (err) {
- alert(err.ErrorInfo);
- });
- }
- }
- },
-
- }
- </script>
-
- <style scoped>
- .contact-box {
- position: fixed;
- right: 12px;
- bottom: 10%;
- margin-top: -100px;
- z-index: 9999;
- }
-
- .contact-box .contact-box-item{
- position: relative;
- margin-bottom: 6px;
- border: 1px solid #999;
- }
-
- .contact-box .contact-box-item .box-btn {
- width: 48px;
- height: 48px;
- text-align: center;
- display: block;
- position: relative;
- background: #fff;
- cursor: pointer;
- }
- .contact-box .contact-box-item .box-btn i{
- font-size:30px;
- margin: 9px;
- color: #59a3ec;
- display: inline-block;
- }
-
- .contact-box .box-btn span{
- display: none;
- color:#fff;
- padding: 8px;
- font-size: 14px;
- background: #5aa6f1;
- }
- .contact-box .box-btn:hover span{
- display: block;
- }
- .contact-box .box-btn:hover i{
- display: none;
- }
- .contact-box .contact-phone-box {
- border: 1px solid #999;
- position: absolute;
- bottom: 0px;
- right: 56px;
- height: 48px;
- display:flex;
- background: #fff;
- width: 230px;
- align-items: center;
- }
- .contact-box .contact-phone-box i {
- color: #59a3ec;
- font-size:30px;
- margin: 9px;
- }
- .contact-box .contact-phone-box span {
- font-size:20px;
- margin-left: 15px;
- color: #485b6d;
- }
-
- .contact-box .contact-info-box {
- border: 1px #e5e5e5 solid;
- position: absolute;
- bottom: 0px;
- right: 56px;
- display: none;
- background: #fff;
- width: 175px;
- z-index: 10000;
- }
- .contact-box .msg-box:hover .contact-info-box{
- display:block;
- color: #485b6d;
- font-size:20px;
- padding: 5px;
- }
-
- .contact-box .contact-msg-box {
- border: 1px #e5e5e5 solid;
- position: absolute;
- bottom: 0px;
- right: 56px;
- background: #fff;
- }
- .contact-box .msg-box-panel {
- width: 408px;
- background-color: #fff;
- position: relative;
- }
- .contact-box .panel-header {
- border-bottom: 1px #e5e5e5 solid;
- }
- .contact-box .panel-header .kf-close {
- width: 30px;
- height: 20px;
- float: right;
- cursor: pointer;
- margin: 12px 0 0 0;
- }
- .contact-box .panel-header .kf-h-line {
- float: left;
- color: #485b6d;
- font-size: 16px;
- line-height: 40px;
- height: 40px;
- padding-left: 10px;
- }
- .contact-box .panel-body {
- overflow-x: visible;
- overflow-y: auto;
- height: 182px;
- }
-
- .contact-box .msg-inner {
- overflow-y: auto;
- overflow-x: hidden;
- height: 100%;
- border-bottom: 1px #e5e5e5 solid;
- }
- .contact-box .scroll-y::-webkit-scrollbar {
- width: 6px;
- height: 3px;
- }
- .contact-box .scroll-y::-webkit-scrollbar-thumb {
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.1);
- box-shadow: inset 0 0 6px rgba(0,0,0,.1);
- border-radius: 2px;
- }
- .contact-box .scroll-y::-webkit-scrollbar-track {
- border-radius: 2px;
- }
- .contact-box .msg-inner .cell {
- margin-bottom: 15px;
- }
- .contact-box .cell_right {
- float: right;
- }
-
- .contact-box .clearfix {
- clear: both;
- }
- .contact-box .msg-inner .msg_body {
- border: 1px #e5e5e5 solid;
- line-height: 22px;
- display: inline-block;
- padding: 6px;
- max-width: 292px;
- }
- .contact-box .fl {
- float: left;
- }
- .contact-box .msg-inner .msg_body .inner {
- color: #465b6e;
- }
- .contact-box .msg-inner .cell_pic {
- width: 40px;
- height: 40px;
- display: inline-block;
- margin: 0 20px;
- }
- .contact-box .msg-inner .cell_pic .pic {
- width: 40px;
- height: 40px;
- display: flex;
- }
- .contact-box .msg-inner .cell_pic .pic img {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- object-fit: cover;
- object-position: center;
- }
-
- .contact-box .msg-box-panel .panel-booter .textarea {
- border: 1px #fff solid;
- padding: 10px 20px;
- color: #465b6e;
- height: 100px;
- resize: none;
- width: 100%;
- }
- .contact-box .msg-box-panel .panel-booter .msg-send-btn-box {
- padding: 0 20px 10px 20px;
- float: left;
- background: #fff;
- width: 408px;
- }
- .contact-box .msg-box-panel .panel-booter .time {
- font-size: 12px;
- color: #bebebe;
- height: 26px;
- line-height: 26px;
- }
- .contact-box .msg-box-panel .panel-booter .msg-send-btn-box .send_btn {
- color: #fff;
- padding: 6px 20px;
- border-radius: 4px;
- font-size: 12px;
- background: #58a1ed;
- border: none;
- }
-
- .contact-box .panel-tool {
- color: #465b6e;
- height: 30px;
- border-bottom: 1px #e5e5e5 solid;
- display:flex;
- align-items: center;
- }
-
- .contact-box .panel-tool i {
- font-size: 20px;
- padding: 0 5px;
- margin: 0 5px;
- cursor: pointer;
- }
-
- .contact-box .panel-tool .icon-face::before {
- content: '\1F642';
- font-size: 15px;
- }
- .contact-box .face-box {
- width: 304px;
- z-index: 10001;
- background: #fff;
- position: relative;
- bottom: 70px;
- left: -100px;
- border: 2px #e5e5e5 solid;
- }
- .contact-box .face-box-list li {
- display: inline-block;
-
- border-right: 1px #CCC solid;
- border-bottom: 1px #CCC solid;
- cursor: pointer;
- }
- .contact-box .face-box-title {
- border-bottom: 1px #e5e5e5 solid;
- margin: 2px 0;
- }
- </style>
|