Harley 6 年之前
父節點
當前提交
70564f142f

二進制
.DS_Store


+ 12 - 16
chat/src/components/index.vue

@@ -126,8 +126,8 @@
 				<!-- ********************************************************** -->
 				<!-- 人工会话模版 -->
 				<div v-if="link_success">
-					<!--历史消息-->
-					<div v-if="showHistory" v-for="(item, index) in hisSviceChat" :key="index">
+					<!--历史消息--> 
+					<div v-if="showHistory" v-for="(item, index) in hisSviceChat" :key="'h'+index">
 						<!-- 客服信息 -->
 						<div v-if="item.from_id.startsWith('KF')">
 							<div style="width: 100%;text-align: center;">
@@ -338,6 +338,7 @@
 						</div>
 						<div class="row center">
 							<img style="width:1.8rem;height:1.8rem;" v-if="!trueImg" :src="avatar_imgs">
+							<!-- {{service_info.avatar}} -->
 							<img style="width:1.8rem;height:1.8rem;" v-if="trueImg" :src="img_http +service_info.avatar">
 						</div>
 					</div>
@@ -350,7 +351,7 @@
 					</div>
 					<!-- 广告图 -->
 					<div class="leftMain-bottom row center" style="padding:0 .3rem;margin-top:.6rem;">
-						<a :href="'http://'+advertisement.advertisement_url" target="_blank" rel="noopener noreferrer">
+						<a :href="'https://'+advertisement.advertisement_url" target="_blank" rel="noopener noreferrer">
 							<img style="width:4.2rem;height:7rem;" :src="img_http+advertisement.advertisement_img">
 						</a>
 					</div>
@@ -607,9 +608,7 @@
 			//初始化Websocket链接
 			initWebSocket(apiToken) {
 				let sock_ip = ''; // 线上
-				// let sock_ip = 'ws://192.168.2.187:9101';  // 本地
-
-				this.websock = new WebSocket("wss://ky.281570.com:9101?apiToken=" + apiToken);
+				this.websock = new WebSocket("wss://ky.281570.com?apiToken=" + apiToken);
 				//数据返回
 				this.websock.onmessage = this.socket_message;
 				//数据发送
@@ -680,7 +679,7 @@
 							content: {text: redata.data.content}
 						})
 					}
-					console.log(this.robot);
+					//console.log(this.robot);
 					// this.automaticRolling();
 					//data
 					//this.robot =
@@ -895,8 +894,8 @@
 					obj.data.chatLog.forEach(res => {
 						// console.log(res,'历史信息');
 						res.content = JSON.parse(res.content);
+						res.content.text =this.turnFace(res.content.text);
 						let time_line = this.$public.customFormatDateTime(res.time_line, '', 3);
-						// res.time_line  =
 						if (!historyTime) {
 							res.time_line = time_line
 						} else {
@@ -908,10 +907,10 @@
 								res.time_line = time_line
 							}
 						}
+						// console.log(res.content);
 						historyTime = time_line;
 						this.hisSviceChat.push(res);
 					})
-
 				}
 
 				//获取发送时间
@@ -1003,7 +1002,6 @@
 			//用户匿名注册
 			registered() {
 				let token = localStorage.getItem('token');
-
 				let appuid = this.$public.getQueryString('appuid');
 				let tutype = this.$public.getQueryString('tutype');
 				if (appuid && tutype >= 1) {
@@ -1013,19 +1011,16 @@
 				} else {
 					token = '';
 				}
-
 				let data = {
 					token: token != null ? token : '',
 					appid: this.$public.getQueryString('appid'),
 					appuid: this.$public.getQueryString('appuid'),
 				}
-
 				let obj = {
 					headers: {
 						"apiToken": this.setApiToken('autoReg', 'register', this.currentTime[0], 'index')
 					}
 				}
-
 				this.$http.post('/index/register/autoReg', data, obj).then(res => {
 					if (res.data.code == 0) {
 						this.$dialog.alert({
@@ -1147,7 +1142,6 @@
 						robot_name: formatStr,
 						robotgroups_id: '1',
 					}
-
 					// console.log(this.turnFace(formatStr));
 					type = 'toRobot';
 					//本地存放数据
@@ -1318,7 +1312,7 @@
 				this.areaHeight = area.scrollHeight > 36 ? area.scrollHeight : 36;
 				let main = document.getElementById('main')
 				this.makeExpandingArea(area)
-				console.log('screen:', window.screen.height, 'inner:', window.innerHeight)
+				//console.log('screen:', window.screen.height, 'inner:', window.innerHeight)
 				// main.style.bottom = this.needScrollTop + 'px'
 				// console.log('foucus', this.needScrollTop)
 				// this.automaticRolling();
@@ -1711,7 +1705,9 @@
 		height: 83vh;
 		overflow-x: hidden;
 		overflow-y: auto;
-		padding: 0 0.6rem;
+		padding:0.4rem 0.3rem;
+		padding-top:0;
+	
 	}
 
 	.btn {

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

@@ -17,10 +17,10 @@
 						<yd-accordion-item :title="serchLeftClick" id="lists">
 							<ul>
 								<li
-										class="row center list"
-										v-for="(item,index) in options"
-										:key="index"
-										@click="serchLeftClick = item.label,getList(item.value)"
+									class="row center list"
+									v-for="(item,index) in options"
+									:key="index"
+									@click="serchLeftClick = item.label,getList(item.value)"
 								>
 									<p :class="serchLeftClick == item.label?'active':''">{{item.label}}</p>
 								</li>
@@ -39,10 +39,10 @@
 			<div class="main">
 				<div class="main-title row allAlignment bottomAlignment">
 					<div
-							v-for="(item) in typeList" :key="item.id"
-							class="main-title-list row center"
-							:class="mainTitle== item.name?'active':''"
-							@click="mainTitle =  item.name,getAjax(1)"
+						v-for="(item) in typeList" :key="item.id"
+						class="main-title-list row center"
+						:class="mainTitle== item.name?'active':''"
+						@click="mainTitle =  item.name,getAjax(1)"
 					>{{item.name}}
 					</div>
 				</div>
@@ -231,7 +231,7 @@
 				pages: 1,
 				imgs: [],
 				imgss: [],
-				url: 'https://manage.281570.com', // 域名地址
+				url: 'http://manage.281570.com', // 域名地址
 				// url: 'http://192.168.2.187:8090', // 域名地址
 				fileList: [],
 				filesImg: '',

+ 7 - 8
pc_chat/src/components/chat.vue

@@ -499,7 +499,7 @@
 						</div>
 
 						<el-col class="advent" v-for="imgs in advert" :key="imgs.id">
-							<a :href="'http://'+imgs.advertisement_url" target="_blank" rel="noopener noreferrer">
+							<a :href="'https://'+imgs.advertisement_url" target="_blank" rel="noopener noreferrer">
 								<img :src="url + imgs.advertisement_img" alt="">
 							</a>
 						</el-col>
@@ -589,7 +589,6 @@
 				// currTime: "", //获取系统时间
 				apiToken: '',//系统Token
 				machine: [], //机器会话信息
-
 				advert: '', // 广告语
 				problem: '', //机器智能问题
 				macNotPro: false, //机器人问题无法解决显示
@@ -603,7 +602,6 @@
 				machineAndAtl: 10, //默认为机器人,100为人工
 				satisfaction: 1, //评价满意度,1为满意,2为一般,3为不满意
 				url: 'https://manage.281570.com', // 域名地址
-				// url: 'http://192.168.2.187:8090', // 域名地址
 				user_info: '', // 用户信息
 				// 人工客服信息
 				service: '',
@@ -1117,7 +1115,6 @@
 			/***************转人工客服列表*************** */
 			changeService() {
 				this.nloding("转人工客服中请等待");
-				
 				// if(!this.isConnection) return
 				this.$axios.post('/api/index/groups/index', {}, {
 					headers: {
@@ -1213,8 +1210,8 @@
 			initWebSocket() {
 				let _this = this;
 				let apiToken = this.$md5.hex_md5('customer-service' + window.location.origin);
-				this.websock = new WebSocket('ws://127.0.0.1:4431?apiToken=' + apiToken);
-				// this.websock = new WebSocket('ws://192.168.2.187:4431?apiToken=' + apiToken);
+				this.websock = new WebSocket('wss://ky.281570.com?apiToken=' + apiToken);
+				// console.log(this.websock)
 				this.websock.debug = true;
 				// 数据接收
 				this.websock.onmessage = this.websocketonmessage;
@@ -1463,14 +1460,16 @@
 					this.automaticRolling();
 					this.machineAndAtl = 10;
 					this.jumpArtl = false;
-					// console.log(redata.content);
+					
 					this.Onlinemsg = redata.content;
 
 					this.$alert(this.jumpName + this.Onlinemsg, '系统提示', {
 						confirmButtonText: '确定',
 						dangerouslyUseHTMLString: true
+					}).then(() => {
+						this.closeNloading();
 					}).catch((err) => {
-						console.log(err)
+						this.closeNloading();
 					});
 				}
 				// 客服关闭会话.

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

@@ -126,7 +126,6 @@
 				showimgs:false,
 				showimgss:false,
 				url: 'https://manage.281570.com', // 域名地址
-				// url: 'http://192.168.2.187:8090', // 域名地址
 				pages: 1,
 				optionCont: "",
 				ledgedata: {}

+ 1 - 1
service_exe/src/renderer/App.vue

@@ -34,7 +34,7 @@
 			initWebSocket(apiToken) {
 				// 书写接口信息
 				// http://stadmin.bocai108.com/
-				const wsuri = "wss://ky.281570.com:9101?apiToken=" + apiToken;//www.service.com 线上
+				const wsuri = "wss://ky.281570.com?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);