Harley 6 years ago
parent
commit
e44f14a888

BIN
.DS_Store


+ 2 - 0
service/src/api/http.js

@@ -48,6 +48,8 @@ export default {
 				})
 		})
 	},
+
+	/************************不加请求头post请求**************************/
 	uploadPost(url, params) {
 		return new Promise((resolve, reject) => {
 			axios.post(headerUrl(url), params)

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

@@ -161,7 +161,7 @@
 				user_info: '',//
 				userID:null,
 				unreadNum:null, // 未读数量
-				img_http:'',//图片路径域
+				img_http:window.url_https_ajax,//图片路径域
 				innerDrawer:false,//会话总览抽屉开关
 				dataTree: [],
 				defaultProps: {
@@ -185,7 +185,7 @@
 		},
 
 		mounted() {
-        	this.img_http = window.url_https_ajax;
+        	// this.img_http = window.url_https_ajax;
 			if (this.$store.getters.get_stateValue) {
 				this.value = this.$store.getters.get_stateValue;
 			}

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

@@ -32,7 +32,7 @@
 				megnum: 0,
 				showMeg: false,
 				logo: '',
-				img_http: '',//图片路径域
+				img_http: window.url_https_ajax,//图片路径域
 				titleActive: "TheCurrentSession",
 				data: [
 					{
@@ -101,7 +101,7 @@
 			}
 		},
 		mounted() {
-        	this.img_http = window.url_https_ajax;
+        	// this.img_http = window.url_https_ajax;
 			this.titleActive = this.$store.getters.get_navState;
 			this.logo = sessionStorage.getItem('logo');
 			this.showMeg = this.$store.getters.get_meg;

+ 13 - 7
service/src/css/index.css

@@ -2,18 +2,24 @@
 * {
   padding: 0;
   margin: 0;
-  -o-user-select: none;
-  -moz-user-select: none;
+  /* -o-user-select: none;
+  -moz-user-select: none; */
   /*火狐 firefox*/
-  -webkit-user-select: none;
+  /* -webkit-user-select: none; */
   /*webkit浏览器*/
-  -ms-user-select: none;
+  /* -ms-user-select: none; */
   /*IE10+*/
-  -khtml-user-select: none;
+  /* -khtml-user-select: none; */
   /*早期的浏览器*/
-  user-select: none;
+  /* user-select: none; */
   /*  */
-  box-sizing: border-box;
+  box-sizing: border-box; 
+
+
+  /* -webkit-user-select:none;
+	-moz-user-select:none;
+	-o-user-select:none;
+	user-select:none;*/
 }
 body,img{
   padding: 0;

+ 10 - 6
service/src/pages/LeaveMessage.vue

@@ -238,7 +238,7 @@
 				dialogImageUrl: '',
 				userInfo: [], //用户信息
 				getUserItem: [],
-				img_http: '',//图片路径域
+				img_http: window.url_https_ajax,//图片路径域
 				fileList:[],
 				imgUrl:'',
 				users:[],
@@ -258,7 +258,7 @@
 			messageCenter
 		},
 		mounted() {
-			this.img_http = window.url_https_ajax;
+			// this.img_http = window.url_https_ajax;
 			this.uploadImg = this.img_http+"/index/upload/uploadImg"
 			this.frceArr = frce.frce;
 			this.value = this.options[2].value;
@@ -378,10 +378,14 @@
 			//提交留言
 			sendMessage() {
 				if(this.leaveInfor && this.isSendMessage){
-					this.isUpImg = true;
-					this.$refs.upload.submit();
-					this.img_number = 0;
-					this.isSendMessage  = false;
+					if(this.fileList.length <1){
+						this.sendData();
+					}else{
+						this.isUpImg = true;
+						this.$refs.upload.submit();
+						this.img_number = 0;
+						this.isSendMessage  = false;
+					}
 					// setTimeout(()=>{
 			
 					// },1500)

+ 38 - 5
service/src/pages/TheCurrentSession.vue

@@ -354,8 +354,7 @@
 				lineUp: [],//排队列表
 				conversationId: '',//会话工单
 				session_user_info: {},//当前会话用户信息
-				img_http: '',//图片路径域
-				// img_http: 'http://192.168.2.187:8090',//图片路径域
+				img_http: window.url_https_ajax,//图片路径域
 				fit: 'scale-down',//图片渲染样式
 				is_eva_btn: true,//
 				trigger_condition: 0,//评价触发条件
@@ -536,6 +535,21 @@
 			/*********************图片发送*********************/
 			uploadIMG(e) {
 				//console.log(e);
+				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;
+				}
+
+
 				let self = this;
 				let files = e.target.files || e.dataTransfer.files;
 				if (!files.length) return;
@@ -569,6 +583,12 @@
 			upImg(formData) {
 				let self = this;
 				// 数据结构请求
+				let loading = this.$loading({
+					lock: true,
+					text: '图片发送中...',
+					spinner: 'el-icon-loading',
+					background:'rgba(0, 0, 0, 0.8)',
+				});
 				self.$http.uploadPost('/index/upload/uploadImg', formData).then(res => {
 					//console.log(res.data.data.src)
 
@@ -609,8 +629,7 @@
 							sensitiveNumber: 0,//敏感词次数
 						}
 						self.websocketsend(JSON.stringify({type, data}))
-
-
+						loading.close()
 					}
 				})
 			},
@@ -1108,6 +1127,19 @@
 
 			/**********************qq截图粘贴---发送截图*****************/
 			handleClose(done) {
+				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;
+				}
 				this.dialogPaste = false;
 				let blob = this.$public.dataURItoBlob(this.pasteUrl)
 				let self = this;
@@ -1300,7 +1332,8 @@
 		 * 挂载前执行
 		 */
 		mounted() {
-			this.img_http = window.url_https_ajax;
+			// console.log('来了',window.url_https_ajax);
+			// this.img_http = window.url_https_ajax;
 			//获取vuex里面数据
 			this.get_vuex_info();
 			let _this = this;

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

@@ -71,7 +71,7 @@ export default {
       logo: "",
       verifySystem: "",
       verifySystemId: "",
-      img_http: "" //图片路径域
+      img_http:  window.url_https_ajax //图片路径域
     };
   },
   methods: {
@@ -173,7 +173,7 @@ export default {
     }
   },
   mounted() {
-		this.img_http = window.url_https_ajax;
+		// this.img_http = window.url_https_ajax;
     // 判断验证码参数
     let SystemId = this.$public.getQueryString("id");
     let System = this.$public.getQueryString("code");