xiang 6 年之前
父節點
當前提交
f965abcc25

+ 1 - 1
chat/config/index.js

@@ -11,7 +11,7 @@ module.exports = {
     assetsPublicPath: '/',
     // proxyTable: {
     //   '/api': {
-    //     target:'http://manage.281570.com',  // 线上地址
+    //     target:'https://manage.281570.com',  // 线上地址
     //     // target:'http://192.168.2.187:8090',  // 本地地址
     //     changeOrigin: false,
     //     pathRewrite: {

+ 1 - 1
chat/src/api/https.js

@@ -3,7 +3,7 @@ import $qs from 'qs';
 // 请求超时时间
 axios.defaults.timeout = 10000
 // 线上
-let Base = 'http://manage.281570.com'
+let Base = 'https://manage.281570.com'
 // 开发
 //let Base = 'http://sports.5gogo.com'
 function headerUrl (url) {

+ 2 - 2
chat/src/components/index.vue

@@ -506,7 +506,7 @@
 				problem: [],//机器人问题
 				welcome: [],//欢迎语
 				advertisement: '', //广告
-				img_http: 'http://manage.281570.com',//图片路径域
+				img_http: 'https://manage.281570.com',//图片路径域
 				//img_http:'http://192.168.2.186:8090',//图片路径域
 
 				robot: [],//和机器人聊天临时数据
@@ -609,7 +609,7 @@
 				let sock_ip = ''; // 线上
 				// let sock_ip = 'ws://192.168.2.187:9101';  // 本地
 
-				this.websock = new WebSocket("ws://ky.281570.com:9101?apiToken=" + apiToken);
+				this.websock = new WebSocket("wss://ky.281570.com:9101?apiToken=" + apiToken);
 				//数据返回
 				this.websock.onmessage = this.socket_message;
 				//数据发送

+ 1 - 1
chat/src/components/knowledgeLibrary.vue

@@ -231,7 +231,7 @@
 				pages: 1,
 				imgs: [],
 				imgss: [],
-				url: 'http://manage.281570.com', // 域名地址
+				url: 'https://manage.281570.com', // 域名地址
 				// url: 'http://192.168.2.187:8090', // 域名地址
 				fileList: [],
 				filesImg: '',

二進制
chat/static/logo.gif


二進制
chat/static/logo1.gif


+ 1 - 1
pc_chat/config/index.js

@@ -12,7 +12,7 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        target:'http://manage.281570.com',  // 后台访问地址
+        target:'https://manage.281570.com',  // 后台访问地址
         // target:'http://192.168.2.187:8090',  // 后台访问地址
         changeOrigin: true,
         pathRewrite: {

+ 1 - 1
pc_chat/src/api/http.js

@@ -4,7 +4,7 @@ import qs from 'qs'  // 序列化字符串
 // 请求超时时间
 axios.defaults.timeout = 10000
 // 线上
-let Base = 'http://manage.281570.com'
+let Base = 'https://manage.281570.com'
 // 开发
 // let Base = ''
 function headerUrl(url) {

+ 2 - 1
pc_chat/src/components/chat.vue

@@ -602,7 +602,7 @@
 				userConversation: {}, //用户当前会话
 				machineAndAtl: 10, //默认为机器人,100为人工
 				satisfaction: 1, //评价满意度,1为满意,2为一般,3为不满意
-				url: 'http://manage.281570.com', // 域名地址
+				url: 'https://manage.281570.com', // 域名地址
 				// url: 'http://192.168.2.187:8090', // 域名地址
 				user_info: '', // 用户信息
 				// 人工客服信息
@@ -1117,6 +1117,7 @@
 			/***************转人工客服列表*************** */
 			changeService() {
 				this.nloding("转人工客服中请等待");
+				
 				// if(!this.isConnection) return
 				this.$axios.post('/api/index/groups/index', {}, {
 					headers: {

+ 1 - 1
pc_chat/src/components/ledgeBase.vue

@@ -125,7 +125,7 @@
 				imgss: [],
 				showimgs:false,
 				showimgss:false,
-				url: 'http://manage.281570.com', // 域名地址
+				url: 'https://manage.281570.com', // 域名地址
 				// url: 'http://192.168.2.187:8090', // 域名地址
 				pages: 1,
 				optionCont: "",

二進制
pc_chat/static/logo.gif


+ 1 - 1
service/src/App.vue

@@ -29,7 +29,7 @@
 			initWebSocket(apiToken) {
 				// 书写接口信息
 				// http://stadmin.bocai108.com/
-				const wsuri = "ws://ky.281570.com:9101?apiToken=" + apiToken;//www.service.com 线上
+				const wsuri = "wss://ky.281570.com:9101?apiToken=" + apiToken;//www.service.com 线上
 				// const wsuri = "ws://192.168.2.187:9101?apiToken=" + apiToken;//www.service.com //192.168.2.186 本地
 				// 创建websocket实例
 				Vue.prototype.$websocket = new WebSocket(wsuri);

+ 1 - 1
service/src/api/http.js

@@ -4,7 +4,7 @@ import qs from 'qs'  // 序列化字符串
 // 请求超时时间
 axios.defaults.timeout = 10000
 // 线上
-let Base = 'http://manage.281570.com'
+let Base = 'https://manage.281570.com'
 // 开发
 //let Base = 'http://sports.5gogo.com'
 function headerUrl (url) {

+ 1 - 1
service/src/components/hader.vue

@@ -161,7 +161,7 @@
 				user_info: '',//
 				userID:null,
 				unreadNum:null, // 未读数量
-				img_http:'http://manage.281570.com',//图片路径域
+				img_http:'https://manage.281570.com',//图片路径域
 				innerDrawer:false,//会话总览抽屉开关
 				// img_http: 'http://192.168.2.187:8090',//图片路径域
 				dataTree: [],

+ 1 - 1
service/src/components/historicalRecord.vue

@@ -133,7 +133,7 @@ export default {
             alarm:'',//评价谢谢
             account:'',//用户信息
             // imgsrc:'http://192.168.2.186:8090'
-            imgsrc:'http://manage.281570.com',//图片路径域 
+            imgsrc:'https://manage.281570.com',//图片路径域 
             isShowBt:false,//显示加载按钮
             currentPage:'',//当前页数
         }

+ 1 - 1
service/src/components/leftNav.vue

@@ -32,7 +32,7 @@
 				megnum: 0,
 				showMeg: false,
 				logo: '',
-				img_http: 'http://manage.281570.com',//图片路径域
+				img_http: 'https://manage.281570.com',//图片路径域
 				// img_http: 'http://192.168.2.187:8090',//图片路径域
 				titleActive: "TheCurrentSession",
 				data: [

+ 2 - 2
service/src/pages/LeaveMessage.vue

@@ -118,7 +118,7 @@
 										</el-col>
 										<el-col>
 											<el-upload style="margin:10px;"
-													action="http://manage.281570.com/index/upload/uploadImg"
+													action="https://manage.281570.com/index/upload/uploadImg"
 													:before-upload="beforeAvatarUpload"
 													:on-change='uploadChange'
 													:on-success='uploadSuccess'
@@ -238,7 +238,7 @@
 				dialogImageUrl: '',
 				userInfo: [], //用户信息
 				getUserItem: [],
-				img_http: 'http://manage.281570.com',//图片路径域
+				img_http: 'https://manage.281570.com',//图片路径域
 				// img_http: 'http://192.168.2.187:8090',//图片路径域
 				fileList:[],
 				imgUrl:'',

+ 1 - 1
service/src/pages/TheCurrentSession.vue

@@ -355,7 +355,7 @@
 				lineUp: [],//排队列表
 				conversationId: '',//会话工单
 				session_user_info: {},//当前会话用户信息
-				img_http: 'http://manage.281570.com',//图片路径域
+				img_http: 'https://manage.281570.com',//图片路径域
 				// img_http: 'http://192.168.2.187:8090',//图片路径域
 				fit: 'scale-down',//图片渲染样式
 				is_eva_btn: true,//

+ 1 - 1
service/src/pages/login.vue

@@ -71,7 +71,7 @@ export default {
       logo: "",
       verifySystem: "",
       verifySystemId: "",
-      img_http: "http://manage.281570.com" //图片路径域
+      img_http: "https://manage.281570.com" //图片路径域
       // img_http: 'http://192.168.2.187:8090',//图片路径域
     };
   },

二進制
service/static/logo.gif


+ 3 - 5
service_exe/src/renderer/App.vue

@@ -34,7 +34,7 @@
 			initWebSocket(apiToken) {
 				// 书写接口信息
 				// http://stadmin.bocai108.com/
-				const wsuri = "ws://ky.281570.com:9101?apiToken=" + apiToken;//www.service.com 线上
+				const wsuri = "wss://ky.281570.com:9101?apiToken=" + apiToken;//www.service.com 线上
 				// const wsuri = "ws://192.168.2.187:9101?apiToken=" + apiToken;//www.service.com //192.168.2.186 本地
 				// 创建websocket实例
 				Vue.prototype.$websocket = new WebSocket(wsuri);
@@ -119,10 +119,10 @@
 						this.$store.dispatch("SET_SESSSION_USER", redata.data.user_info);
 					}
 				}
-				this.getVisitorList();
+				// this.getVisitorList();
 				console.log(redata);
 				let getters = this.$store.getters;
-				console.log({'getters':this.$store})
+				// console.log({'getters':this.$store})
 				//获取vuex数据
 				let session = getters.get_session;//会话列表
 				let offline  = getters.get_offline;//离线列表
@@ -223,8 +223,6 @@
 						current_session,
 					]
 					_this.$public.sessionEnd(arr,function(session,offline,type,index,name,list,userInfo){
-						console.log('session',session);
-						console.log('offline',offline);
 						_this.$store.dispatch("SET_CURRENT",list);//当前会话数据
 						_this.$store.dispatch("SET_SESSION_NAME",name);//当前会话对象名
 						_this.$store.dispatch("SET_NUM",index);

+ 1 - 0
service_exe/src/renderer/api/ports.js

@@ -38,6 +38,7 @@ export default {
   history:{
     historyList:'/service/history/historyList',
     historyInfo:"/service/history/historyInfo",
+    userHistory:"/service/history/userHistory"
   },
 
   //留言 

+ 27 - 9
service_exe/src/renderer/components/hader.vue

@@ -146,7 +146,7 @@
 <script>
 	import Vue from 'vue';
 	import '@/css/index.css'
-
+	import { Loading } from 'element-ui';
 	export default {
 		name: 'hader',
 		data() {
@@ -182,6 +182,7 @@
 				dialogImageUrl: '', // 放大的图片
 
 				serverList:[],
+				get_num:'',
 			}
 		},
 
@@ -194,15 +195,19 @@
 			}else if(this.$store.getters.get_user_info!= ""){
 				this.user_info = JSON.parse(this.$store.getters.get_user_info)
 			}
-			this.userID = this.$store.getters.get_user_info.id;
+			this.userID = this.user_info.id;
+			// console.log(this.userID);
 			this.unreadnotice();
 			let _this = this;
-			let get = setTimeout(function(){
+			this.get_num = setInterval(function(){
 				_this.unreadnotice();
-			},1000)
+			},5000)
 
 
 
+		},
+		beforeDestroy() {
+			clearInterval(this.get_num);
 		},
 
 		computed: {
@@ -257,10 +262,13 @@
 				this.$store.dispatch("SET_SESSION_MESSAGE",{});
 				this.$store.dispatch("SET_SOCKET_OPEN",false);//列表下标 
 				this.$store.dispatch("SET_NAVSTATE", 'TheCurrentSession'); 
+				this.websocketsend(JSON.stringify({
+					type:'kfzdclose',
+					data: {
+						uid: 'KF' + this.user_info.id,
+					}
+				}));
 				this.$websocket.close();
-				// this.$socket_open = false;
-				
-				// console.log(this.$socket_open)
 				this.$token = '';
 				this.$router.push({path:'/login',query: { pid:escape("这就是一个编码没有什么用啊") }})
 			},
@@ -301,7 +309,8 @@
 					this.init();
 					this.get_session_lise();
 					this.ession_int = setInterval(()=>{
-						this.get_session_lise(this.newTime);
+						Loading.service({text:'拼命加载中',background:'rgba(0, 0, 0, 0.8)'});
+						this.get_session_lise(this.newTime,10000);
 					},1000*5)
 				}
 			},
@@ -318,6 +327,11 @@
 
 			/*************获取会话总览数据************/
 			getInnerDrawer(){
+				// setTimeout(()=>{})
+				// Loading.service({text:'拼命加载中',background:'rgba(0, 0, 0, 0.8)'});
+				setTimeout(()=>{
+					Loading.service({text:'拼命加载中',background:'rgba(0, 0, 0, 0.8)'});
+				},200)
 				if(this.innerDrawer) return false;
 				this.innerDrawer = true;
 				let obj = {
@@ -352,12 +366,13 @@
 								}
 							});
 						},1000*60);
+						Loading.service().close()
 					}
 				});
 			},
 
 			/******************会话详情列表******************/
-			get_session_lise(time){
+			get_session_lise(time,type){
 				// if() return false
 				let str ="chatbytime" + "customer-service" + "history" + "service";
 				this.$http.get(this.$ports.overview.chatByTime,{
@@ -393,6 +408,9 @@
 							e.content.text = this.$public.turnFace(e.content.text,this.$frce);
 							this.dataList.push(e)
 						});
+						if( type ==10000){
+							Loading.service().close()
+						}
 					}
 				});
 			},

+ 3 - 0
service_exe/src/renderer/components/historicalRecord.vue

@@ -119,6 +119,7 @@
 </template>
 <script>
 import '@/css/index.css';
+import { Loading } from 'element-ui';
 export default {
     props:['show','uid','user_name'],
     name:'historicalRecord',
@@ -164,6 +165,7 @@ export default {
         /*****************************************/
         //获取会话详情列表
         getRecordList(page,size = 10){
+            Loading.service({text:'拼命加载中',background:'rgba(0, 0, 0, 0.8)'});
             let str ="historyinfo" + "customer-service" + "history" + "service";
             this.$http.get(this.$ports.history.historyInfo,{
             params:{
@@ -190,6 +192,7 @@ export default {
                         e.content.text = this.turnFace(e.content.text);
                         this.dataList.push(e)
                     });
+                    Loading.service().close()
                 }
             });
         },

+ 1 - 1
service_exe/src/renderer/components/leftNav.vue

@@ -14,7 +14,7 @@
 				>
 					<img style="margin-right:10px;" :src="titleActive == item.type?item.imgsrcA:item.imgsrc"/>
 					{{item.title}}
-					<el-badge :value="megnum" class="item" v-if="index == 0 && showMeg">
+					<el-badge :value="megnum" class="item" v-if="index == 0 && titleActive != 'TheCurrentSession'">
 						<i style="font-size:14px; color:#5399F5;   margin-left: 10px;"
 						   class="el-icon-chat-dot-square"> </i>
 					</el-badge>

+ 35 - 23
service_exe/src/renderer/components/messageCenter.vue

@@ -75,16 +75,13 @@
 </template>
 
 <script>
-
+	import { Loading } from 'element-ui';
 	export default {
 		name: "messageCenter",
 		data() {
 			return {
 				drawer: false,
 				switchMessageType: "unread",
-
-				nomessage:true,
-
 				userID:null,
 				userName:null,
 				//已读列表
@@ -94,11 +91,13 @@
 				//未读第一个
 				unreadListOne:{},
 				//未读数量
-				unreadNum:null,
+				unreadNum:0,
+				readNum:0,//读取数量
 				// 详情
 				messageBox:{},
 				//标记代码
 				markupCode:0,
+				loading: false,
 
 			}
 		},
@@ -110,16 +109,22 @@
 		},
 		watch: {
 			get_drawer(data) {
-				// console.log('22',data)
 				this.drawer = data;
-				this.userID =  JSON.parse(localStorage.getItem('user')).id;
-				this.userName =  JSON.parse(localStorage.getItem('user')).user_name;
 				if(data){
-					this.readnotice();
-					this.unreadnotice();
+					setTimeout(()=>{
+						Loading.service({text:'拼命加载中',background:'rgba(0, 0, 0, 0.8)'});
+						this.unreadnotice();
+					},500)
 				}
 			},
 		},
+		/**
+		 * 挂载前执行
+		 */
+		mounted(){
+			this.userID =  JSON.parse(localStorage.getItem('user')).id;
+			this.userName =  JSON.parse(localStorage.getItem('user')).user_name;
+		},
 		methods: {
 			handleClose() {
 				this.$store.dispatch("SET_DRAWER", false);
@@ -127,6 +132,7 @@
 			switchMessage(num) {
 				this.switchMessageType = num;
 				this.markupCode = 0 ;
+				Loading.service({text:'拼命加载中',background:'rgba(0, 0, 0, 0.8)'});
 				if(this.switchMessageType == 'unread'){
 					this.unreadnotice();
 				}else if(this.switchMessageType=='read'){
@@ -146,12 +152,13 @@
 				this.$http.post(this.$ports.center.readnotice,{
 					user_id: this.userID
 				},obj).then(res => {
-					// console.log(res)
 					if(res.data.code === 1){
-						console.log("已读",res.data.data)
 						this.readList =  res.data.data;
 						if(res.data.data.length > 0){
 							this.messageBox = res.data.data[0];
+							Loading.service().close()
+						}else{
+							this.unreadListOne = {}
 						}
 					}
 				});
@@ -171,14 +178,16 @@
 				},obj).then(res => {
 					// console.log(res)
 					if(res.data.code === 1){
-						console.log("未读",res.data.data)
+						// console.log("未读",res.data.data);
 						this.unreadList = res.data.data;
-						// console.log(this.unreadListOne,'第一个')
-						this.unreadNum =res.data.data.length >0 ? res.data.data.length-1 : 0;
+
+						this.unreadNum = this.unreadList.length;
 						if(res.data.data.length > 0){
 							this.unreadListOne = res.data.data[0];
-							this.readInfo(res.data.data[0].id)
+							this.readInfo(res.data.data[0].id);
+							// this.loading = false;
 						}
+						Loading.service().close()
 
 					}
 				});
@@ -186,7 +195,6 @@
 
 			//读取信息
 			readInfo(id){
-				//this.messageBox.id
 				let str = "updatenotice" + "customer-service" + "index" + this.time + "service";
 				let obj = {
 					headers: {
@@ -200,7 +208,8 @@
 				},obj).then(res => {
 					// console.log(res)
 					if(res.data.code === 1){
-						console.log("已读",res.data.data)
+						if(this.unreadNum == 0) return
+						this.unreadNum --;
 					}
 				})
 			},
@@ -208,13 +217,13 @@
 
 			// 点击显示当前详细内容
 			toReading(item,index){
-				// console.log(item,index);
 				if( this.markupCode == index) return
 				this.markupCode = index;
-				this.nomessage = false;
-				this.messageBox = item;
 				if(this.switchMessageType == 'unread'){
-					this.readInfo(item.id)
+					this.unreadListOne = item;
+					this.readInfo(this.unreadList[index].id)
+				}else{
+					this.messageBox = item;
 				}
 			}
 		},
@@ -248,6 +257,8 @@
 
 	.message-list {
 		margin: 0;
+		overflow-y:scroll;
+		height: 80vh;
 		// /* 奇数背景色 */
 		// .list-item:nth-of-type(odd) {
 		// 	background: #F6F8FF;
@@ -264,7 +275,7 @@
 
 			p {
 				color: #666;
-				font-size: 14px;
+				font-size: 12px;
 				overflow: hidden;
 				text-overflow:ellipsis;
 				white-space: nowrap;
@@ -278,6 +289,7 @@
 
 			span {
 				font-size: 14px;
+				font-weight: bold;
 				color: #666;
 			}
 

+ 3 - 1
service_exe/src/renderer/pages/FastReply.vue

@@ -199,7 +199,7 @@
 	import leftNav from "@/components/leftNav";
 	import hader from "@/components/hader";
 	import messageCenter from "@/components/messageCenter";
-
+	import { Loading } from 'element-ui';
 	export default {
 		name: "FastReply",
 		data() {
@@ -323,6 +323,7 @@
 
 			/**************查询快捷回复语列表***************/
 			getFastReply() {
+				Loading.service({text:'拼命加载中',background:'rgba(0, 0, 0, 0.8)'});
 				let obj = {
 					headers: {
 						apiToken: this.$md5("userwords" + "customer-service" + "index" + "service"),
@@ -334,6 +335,7 @@
 					if (res.data.code == 1) {
 						//私有库
 						this.ReplyArr = res.data.data.userWords; // res.data.data.sysWords
+						Loading.service().close();
 					}
 				});
 			},

+ 78 - 27
service_exe/src/renderer/pages/TheCurrentSession.vue

@@ -93,12 +93,11 @@
 							</p>
 						</div>
 					</div>
-
+					<div class="history-info">
+						<el-button type="text" size="small" :loading="historyLoading" 
+						@click="getHistoryInfo">{{historyProcess}}</el-button>
+					</div>
 					<div class="chat-box scroll" id='chat_box'>
-						<div class="history-info">
-							<el-button type="text" size="small" :loading="historyLoading" 
-							@click="getHistoryInfo">{{historyProcess}}</el-button>
-						</div>
 						<div v-for="(item,index) in data" :key="index">
 							<!-- 系统转接 -->
 							<!-- <div class="row center" v-if="item.type == 'system'">
@@ -522,13 +521,14 @@
 						this.showHistoryList = true;
 						redata.data.history.forEach(res => {
 							let content = JSON.parse(res.content)
-							res.content = content;
+							// res.content = content;
 							if (content.text) {
 								content.text = this.$public.turnFace(content.text,this.$frce)
-								res.content = content
 							}
+							res.content = content
 							this.historyList.push(res)
 						})
+						this.automaticRolling();
 					}
 				}
 			},
@@ -661,8 +661,11 @@
 			},
 
 			/*****************切换用户会话对象******************/
-			chooseDialogue(type, index) {
-				this.inputValue = '' // 清除会话内容
+			chooseDialogue(type,index,system) {
+				if(!system){
+					this.inputValue = '' // 清除会话内容
+				}
+				console.log(type, index);
 				if (this.userSwitching) {
 					let data = [];
 					let order_id = '';
@@ -763,21 +766,31 @@
 				send.play()
 			},
 
+			//判断是否选中访客
+			visitor_info(){
+				if(this.sessionType == 1 && this.sessionList.length <= 0 ){
+					return  '-1';
+				}else if(this.sessionType == 2 && this.offlineList <= 0 ){
+					return ' -1';
+				}
+				//this.sessionList.length >0 && this.sessionType == 1
+			},
+			
 			/*********************发送消息*********************/
 			sendMessage() {
-				console.log('websocket',this.$websocket.readyState)
-				console.log('sessionType', this.sessionType)
-				if(this.sessionType == 1) {
-					console.log("???")
-				}
-				console.log(this.inputValue);
-				if (!this.inputValue) return;
+				if (!this.inputValue ) return;
 				if (this.sessionType == 2) {
 					this.$message({
 						message: '只能给在线用户发送消息哦...',
 						type: 'warning'
 					});
 					return false;
+				}else if(this.sessionType == 1 && this.sessionList.length <= 0){
+					this.$message({
+						message: '只能给在线用户发送消息哦...',
+						type: 'warning'
+					});
+					return false;
 				}
 				// if(this.offlineList.length <= 0 ) return
 				let isFirst = true, sensitiveNumber = 0;
@@ -906,6 +919,7 @@
 
 			/*****************获取当前聊天用户信息****************/
 			get_user(id,type,index) {
+				// console.log(id,type,index)
 				let obj = {
 					account_id: id
 				};
@@ -962,6 +976,15 @@
 				})
 			},
 
+			/*****************************/
+			automaticScrollTop(){
+				this.$nextTick(() => {
+					let msg = document.getElementById('chat_box') // 获取对象
+					console.log(msg.scrollHeight);
+					msg.scrollTop = '0px'
+				})
+			},
+
 			/**************获取敏感词*****************/
 			getSensitive() {
 				let obj = {
@@ -1138,9 +1161,9 @@
 			/****************访问信息和评价状态***************/
 			accessTerminal(data) {
 				if (this.sessionType == 1) {
-					console.log('dataIndex', this.dataIndex)
+					// console.log('dataIndex', this.dataIndex)
 					let List = this.sessionList[this.dataIndex];
-					console.log('list', List)
+					// console.log('list', List)
 					if (data == 'eva') {
 						if (!List) return false
 						// console.log(List,'对话信息');
@@ -1164,6 +1187,9 @@
 								source:List.ipinfo
 
 							}
+							if(this.sessionList.length == 1 &&  this.dataIndex ==0){
+								this.get_user(List.id,1,this.dataIndex);
+							}
 						} else {
 							this.terminal_IP = {}
 						}
@@ -1182,7 +1208,25 @@
 					// }
 				}
 			},
-			getHistoryInfo() { // 获取历史数据
+			/****************** 获取历史数据 *******************/
+			getHistoryInfo() { // 
+				let visitors_id = '';
+				let conversationId = '';
+				if(this.sessionType == 1){
+					visitors_id = this.sessionList[this.dataIndex] ? this.sessionList[this.dataIndex].id: '';
+					conversationId =this.sessionList[this.dataIndex] ? this.sessionList[this.dataIndex].conversationId : '';
+				}else if(this.sessionType == 2){
+					visitors_id = this.offlineList[this.dataIndex] ? this.offlineList[this.dataIndex].id :'';
+					conversationId = this.offlineList[this.dataIndex] ? this.offlineList[this.dataIndex].conversationId : '';
+				}
+				if(visitors_id == ''){
+					this.$message({
+						message:'没有对应的访客',
+						type: 'warning'
+					});
+					return false;
+				}
+
 				let obj = {
 					headers: {
 						apiToken: this.$md5("userhistory" + "customer-service" + "history" + "service"),
@@ -1190,8 +1234,9 @@
 						userToken: this.token
 					},
 					params: {
-						// user_name: this.user_info.account_name,
+						account_user_id: visitors_id,
 						account_id: 'KF' + this.user_info.id,
+						conversationId,
 						currentPage: this.historyPage,
 						pageSize: 10
 					}
@@ -1212,12 +1257,18 @@
 								let list = res.data.data.list
 								if(list) {
 									for(let item of list) {
+										let content =  JSON.parse(item.content)
+										if (content.text) {
+											content.text = this.$public.turnFace(content.text,this.$frce)
+										}
 										let historyItem = {
 											type: item.from_id.substr(0, 2) === 'KF' ? 'service' : 'user',
 											time: this.$public.customFormatDateTime(item.time_line),
-											content: JSON.parse(item.content)
+											content: content
+											
 										}
-										this.data.unshift(historyItem)
+										this.data.unshift(historyItem);
+										this.automaticScrollTop()
 									}
 									this.historyPage ++ ;
 									this.historyProcess = '更多历史记录'
@@ -1284,11 +1335,13 @@
 			// },
 			sessionList: {
 				handler(val) {
+					console.log(val,'事件监听sessionList');
 					this.accessTerminal(val)
 				},
 				deep: true
 			},
 			offlineList(e) {
+				console.log(e,'事件监听offlineList')
 				this.accessTerminal(e)
 			},
 
@@ -1309,7 +1362,7 @@
 				dataIndex: 'get_num',
 				sessionType: 'get_type',
 				get_user_info: 'get_session_user', // 会话人详细信息
-				// is_eva_btn:'get_is_eva_btn',
+		
 			}),
 
 			get_session_message() {
@@ -1455,9 +1508,7 @@
 	}
 
 	.chat-box {
-		height: 62vh;
-		/* background: red; */
-		/* padding: 40px 0; */
+		height: 56vh;
 		padding-bottom: 10px;
 		border-bottom: 1px solid #d5e5ff;
 		overflow-x: hidden;
@@ -1574,7 +1625,7 @@
 
 	.FastReplyBox {
 		padding: 0.4rem 0;
-		height: 80vh;
+		height: 75vh;
 		overflow-x: hidden;
 		overflow-y: auto;
 	}

+ 8 - 1
service_exe/src/renderer/pages/login.vue

@@ -177,7 +177,8 @@ export default {
     // 判断验证码参数
     let SystemId = this.$public.getQueryString("id");
     let System = this.$public.getQueryString("code");
-
+    let checkVcode=true;
+ 
     if (!SystemId && !System) {
       this.showSecurityCode = true;
     } else {
@@ -186,12 +187,18 @@ export default {
       this.verifySystem = System;
       localStorage.clear();
       sessionStorage.clear();
+      checkVcode=false;
+
+      
     }
     this.$comm.checkValidCodeEnabled((data)=> {
       if (data == 0) {
         this.showSecurityCode = false;
       } else {
         this.showSecurityCode = true;
+        if(!checkVcode){
+            this.showSecurityCode = false;
+        }
       }
     });
 

二進制
service_exe/static/icon.png


二進制
service_exe/static/icon1.png


二進制
service_exe/static/logo.gif