Explorar o código

update pc_chat

luke %!s(int64=6) %!d(string=hai) anos
pai
achega
090a20b43a
Modificáronse 1 ficheiros con 58 adicións e 43 borrados
  1. 58 43
      pc_chat/src/components/chat.vue

+ 58 - 43
pc_chat/src/components/chat.vue

@@ -1,5 +1,5 @@
 <template>
-	<div v-loading="allLoading" element-loading-text="拼命连接中">
+	<div v-loading="allLoading" element-loading-text="系统加载中,请稍候">
 		<div class="chatBox">
 			<!-- ************************* 头部消息 ************************* -->
 			<el-header height='80px'>
@@ -847,9 +847,8 @@
 				this.machineAndAtl = 10;
 				const loading = this.$loading({
 					lock: true,
-					text: '加载中',
+					text: '本次会话正在关闭',
 					spinner: 'el-icon-loading',
-					background: 'rgba(0, 0, 0, 0.7)'
 				});
 				setTimeout(() => {
 					loading.close();
@@ -1283,50 +1282,61 @@
 				}
 				// 链接客服信息
 				if (redata.message_type == 'connect') {
-					let server = {};
-					if (redata.data) {
-						server = redata.data
-					} else {
-						server = {
-							conversationId: redata.data.conversationId,
-							kf_id: redata.data.kf_id,
-							kf_name: "",
-							serverInfo: {
-								avatar: this.avatarImg,
-								client_id: "",
-								group: "",
-								id: "",
-								intime: "",
-								job_name: "",
-								name: "tank",
-								signature: "",
-								status: 0,
-								task: 0,
+					const loading = this.$loading({
+						lock: true,
+						text: '正在连接人工客服,请稍候',
+						spinner: 'el-icon-loading',
+					});
+					setTimeout(() => {
+
+						let server = {};
+						if (redata.data) {
+							server = redata.data
+						} else {
+							server = {
+								conversationId: redata.data.conversationId,
+								kf_id: redata.data.kf_id,
+								kf_name: "",
+								serverInfo: {
+									avatar: this.avatarImg,
+									client_id: "",
+									group: "",
+									id: "",
+									intime: "",
+									job_name: "",
+									name: "tank",
+									signature: "",
+									status: 0,
+									task: 0,
+								}
+
 							}
+						}
 
+						// this.webTime = ''
+						this.artAndLeave = 10;
+						this.machineAndAtl = 100;
+						// console.log(server, '============客服信息')
+						this.service = server;
+						// console.log();
+						this.serviceImg = server.serverInfo.avatar;
+						this.consult = false;
+						this.evlShow = false;
+						this.comtSuccess = false;
+						this.showleaveIcon = false;
+						this.waitingMsg = false;
+						this.selNum = this.selNum;
+						this.tokNum = this.tokNum;
+						this.service_on = true;
+						this.closeByServer = false;
+						// console.log(redata.data.evaluate_id,"评价数量")
+						if (redata.data.evaluate_id > 0) {
+							this.evaluateNum = true;
 						}
-					}
 
-					// this.webTime = ''
-					this.artAndLeave = 10;
-					this.machineAndAtl = 100;
-					// console.log(server, '============客服信息')
-					this.service = server;
-					// console.log();
-					this.serviceImg = server.serverInfo.avatar;
-					this.consult = false;
-					this.evlShow = false;
-					this.comtSuccess = false;
-					this.showleaveIcon = false;
-					this.waitingMsg = false;
-					this.selNum = this.selNum;
-					this.tokNum = this.tokNum;
-					this.service_on = true;
-					this.closeByServer = false;
-					// console.log(redata.data.evaluate_id,"评价数量")
-					if (redata.data.evaluate_id > 0) {
-						this.evaluateNum = true;
-					}
+						loading.close();
+					}, 2000);
+
 				}
 				// 暂无客服
 				if (redata.message_type == 'wait') {
@@ -1413,6 +1423,11 @@
 					this.jumpArtl = false;
 					// console.log(redata.content);
 					this.Onlinemsg = redata.content;
+
+					this.$alert(this.jumpName + this.Onlinemsg,'系统提示', {
+						confirmButtonText: '确定',
+						dangerouslyUseHTMLString: true
+					});
 				}
 				// 客服关闭会话.
 				if (redata.message_type == 'closeBysever') {