瀏覽代碼

优化聊天

wkw 6 月之前
父節點
當前提交
1cc362c122
共有 3 個文件被更改,包括 5 次插入22 次删除
  1. 3 3
      src/components/messageCom/messageCom.vue
  2. 2 1
      src/views/jilu/myCollect.vue
  3. 0 18
      src/views/message/index.vue

+ 3 - 3
src/components/messageCom/messageCom.vue

@@ -1182,9 +1182,9 @@
 			},
 			//关闭弹窗的回调
 			closeShow() {
-				if (this.webSco) {
-					this.webSco.close()
-				}
+				// if (this.webSco) {
+				// 	this.webSco.close()
+				// }
 				//给父组件传递值关闭该组件
 				this.show = false
 				this.$emit('closeMeg', this.show)

+ 2 - 1
src/views/jilu/myCollect.vue

@@ -14,6 +14,7 @@
 				<div v-show="isNoList == false" class="content-l" v-loading="loading">
 					<div class="content-l-item flex justify-between" @click="goDetailst(item,index)"
 						v-for="(item,index) in jobDataList" :key="index">
+						<template v-if="item.resumesListDto.length > 0">
 						<div class="content-l-item-l">
 							<div class="content-l-item-title flex align-center">
 								<img style="width: 50px;height: 50px;border-radius: 50%;margin-right: 10px;"
@@ -68,7 +69,7 @@
 								</div>
 							</div>
 						</div>
-
+						</template>
 					</div>
 					<!-- 分页 -->
 					<div class="content-l-item-pag flex align-center justify-center">

+ 0 - 18
src/views/message/index.vue

@@ -590,15 +590,6 @@
 				return this.$store.state.avatar;
 			}
 		},
-		//离开页面
-		beforeRouteLeave(to, from, next) {
-			//关闭scoket
-			if (this.webSco) {
-				this.webSco.close()
-				this.webSco = null
-			}
-			next();
-		},
 		mounted() {
 			this.screenHeight = window.innerHeight
 			this.userId = localStorage.getItem('userId')
@@ -795,10 +786,6 @@
 				if (type) {
 					this.sysPgae = 1
 				}
-				if (this.webSco) {
-					this.webSco.close()
-					this.webSco = null
-				}
 				this.liftIndex = -1
 				this.loading = true
 				let data = {
@@ -863,11 +850,6 @@
 			//开始聊天
 			startMsg(item, index) {
 				this.ruleClassifyName = item.stationName;//岗位名称
-				//关闭scoket
-				if (this.webSco) {
-					this.webSco.close()
-					this.webSco = null
-				}
 				this.liftIndex = index
 
 				this.czList = [{