blade há 6 anos atrás
pai
commit
d371748f3b

+ 1 - 1
chat/config/index.js

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

+ 2 - 2
chat/index.html

@@ -12,8 +12,8 @@
 	<meta name="viewport"
 		  content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,width=device-width,initial-scale=1.0"/>
 	<!-- <script src="//unpkg.com/vue-ydui/dist/ydui.flexible.js"></script> -->
-	<link rel ="shortcut icon" type="image/x-icon" href="static/logo.gif">
-	<title>大博集团智能客服系统</title>
+	<!--<link rel ="shortcut icon" type="image/x-icon" href="static/logo.gif"> -->
+	<title>智能客服系统</title>
 </head>
 <body>
 <div id="app"></div>

Diff do ficheiro suprimidas por serem muito extensas
+ 249 - 555
chat/package-lock.json


+ 1 - 0
chat/package.json

@@ -10,6 +10,7 @@
     "build": "node build/build.js"
   },
   "dependencies": {
+    "auto-textarea": "^1.4.0",
     "axios": "^0.19.0",
     "vue": "^2.5.2",
     "vue-ydui": "^1.2.6"

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

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

+ 44 - 9
chat/src/components/index.vue

@@ -359,14 +359,18 @@
 			<!-- 底部输入框 -->
 			<div class="footer row wrap" id='input_box'>
 				<!-- @keydown="inputNumFun()" -->
-				<textarea 
+				 <!-- <textarea  
 						id="textarea"
 						v-model.trim="text_info"
 						placeholder="请输入你的问题:"
 						maxlength="450"
 						@keyup ='keyup_maxlength()'
+						 :style="{height:iboxheight}" 
+					
 				>
-				</textarea>
+				</textarea>  -->
+
+				 <autoTextarea placeholder="" lineHeight="30px" border="false" fontSize="18px" />
 
 				<div class="send row item-center" style="border-bottom:.01rem solid #ddd">
 					<img
@@ -478,12 +482,13 @@
 	import frce from "./frce.js";
 	import defaultImgs from "./../assets/timg.jpg"
 	import headPortrait from "./../assets/headPortrait.png"
-
+	import autoTextarea from 'auto-textarea'
 	export default {
 		name: "service",
 		// 模板注册
 		components: {
-			knowledgeLibrary
+			knowledgeLibrary,
+			autoTextarea
 		},
 		data() {
 			return {
@@ -503,13 +508,14 @@
 				problem: [],//机器人问题
 				welcome: [],//欢迎语
 				advertisement: '', //广告
-				img_http: 'http://kfadmin.bocai186.com',//图片路径域
+				img_http: 'http://manage.281570.com',//图片路径域
 				//img_http:'http://192.168.2.186:8090',//图片路径域
 
 				robot: [],//和机器人聊天临时数据
 				chat: [],//人工会话
 				error_num: 1001,//机器人回答超出能力之外编号
 				isConnection: true,//人工分组列表开关
+				ibox_height:'auto',
 				//客服信息
 				service_info: {
 					avatar: headPortrait,
@@ -587,7 +593,7 @@
 				let sock_ip = ''; // 线上
 				// let sock_ip = 'ws://192.168.2.187:9101';  // 本地
 
-				this.websock = new WebSocket("ws://kfadmin.bocai186.com:9101?apiToken=" + apiToken);
+				this.websock = new WebSocket("ws://ky.281570.com:9101?apiToken=" + apiToken);
 				//数据返回
 				this.websock.onmessage = this.socket_message;
 				//数据发送
@@ -1049,6 +1055,17 @@
 				});
 				this.automaticRolling();
 			},
+			checkSetType(){
+				let u = navigator.userAgent, app = navigator.appVersion;
+					let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
+					let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+					if (isAndroid) {
+						return 'android';
+					}
+					if (isIOS) {
+				    return 'ios';
+					}
+			},
 
 			/*******************************************/
 			//转人工
@@ -1062,7 +1079,8 @@
 							'uid': this.user_info.id,
 							'name': this.user_info.name,
 							'avatar': this.user_info.avatar,
-							'group': this.group
+							'group': this.group,
+							'settype':this.checkSetType()
 						}
 					}
 					this.socket_send(JSON.stringify(data));
@@ -1267,8 +1285,20 @@
 			},
 			/***********************************/
 			keyup_maxlength(){
-				//console.log(this.text_info.length);
+				let ct=this.text_info;
+				let leng=ct.replace(/[^\x00-\xff]/g,"aa").length;
+				let len=Math.ceil(leng/25);
+				if(leng>12){
+					len=len+1;
+				}
+				if(len >0){
+					this.ibox_height=(len)*27;
+				
+					this.ibox_height=this.ibox_height+'px';
+
+				}
 			},
+			
 
 			/*******************************************/
 			//手机弹窗处理
@@ -1483,6 +1513,9 @@
 		computed: {
 			inputmsg() {
 				return this.text_info;
+			},
+			iboxheight(){
+				return this.ibox_height;
 			}
 		},
 		// 监听
@@ -2036,7 +2069,9 @@
 		text-align: right;
 		display: block;
 	}
-
+	#main{
+		/* margin-bottom: .3rem; */
+	}
 	/*
 	*留言知识库
 	 */

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

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

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff