소스 검색

update chat

luke 6 년 전
부모
커밋
efd4ba43a6
1개의 변경된 파일9개의 추가작업 그리고 38개의 파일을 삭제
  1. 9 38
      chat/src/components/index.vue

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

@@ -23,7 +23,7 @@
 					<yd-button v-if="isExit" color="#fff" bgcolor="#1d57dd" class="exit" size="mini" type="primary"
 							   @click.native="is_exit()">退出聊天
 					</yd-button>
-					<img class="icon-msg" v-show="(chat.length -1) > chatNum || chatNum > 3 " @click="is_show_evaluate()" src="@/assets/Service2.png">
+					<img class="icon-msg" v-if="( chat.length -1 )  + hisLength > chatNum" @click="is_show_evaluate()" src="@/assets/Service2.png">
 					<!--<img class="icon-msg"  @click="is_show_evaluate()" src="@/assets/Service2.png">-->
 					<img class="icon-msg" @click="knowledge = true,flag = false" src="@/assets/leaveSwitch.png" v-if="!isExit">
 				</div>
@@ -267,38 +267,6 @@
 				</div>
 
 			</div>
-			<!-- 中间弹窗登录 -->
-			<!-- <yd-popup
-			  v-model="centerShow"
-			  position="center"
-			  width="6.9rem"
-			  height="8rem"
-			  :masker-opacity=".2"
-			>
-			  <div class="row rightAlignment" style="padding-top:.2rem;padding-right:.2rem;">
-			  <img
-				@click="centerShow = false"
-				style="width: 0.32rem;height: 0.32rem;"
-				src="@/assets/Service5.png"
-			  >
-			  </div>
-			  <div class="row center" style="font-size:.56rem;">
-			  <p style="color:#F04992;">HX</p>
-			  <span style="color:#5EA0F7;">669</span>
-			  </div>
-			  <input class="loginInput" type="text" placeholder="姓名">
-			  <input class="loginInput" type="text" placeholder="手机号">
-			  <input class="loginInput" type="email" placeholder="邮箱地址">
-			  <div class="row" style="margin:0 .2rem;">
-			  <input class="loginInput" placeholder="输入验证码" type="text" style="margin:.5rem 0 0 0;">
-			  <p
-				@click="initialLoginCode"
-				class="row center"
-				style="width:100%;height:.8rem;margin-top:.5rem;background:#F1E1E0;border-radius: .1rem;margin-left:.2rem;font-size:.3rem;color:#666;"
-			  >{{loginCode}}</p>
-			  </div>
-			  <div class="row center sub" style="margin:.5rem .2rem .2rem .2rem;">登录</div>
-			</yd-popup> -->
 
 			<!-- 底部弹窗评价 -->
 			<yd-popup v-model="bottomShow" position="bottom" height="6.5rem" :masker-opacity=".2">
@@ -583,6 +551,7 @@
 				waitingMsg: false, // 是否显示等待排队
 				serviceNotOnlineText: '',
 				comtSuccess:false,
+				hisLength:0,
 			};
 		},
 		// 方法
@@ -833,6 +802,7 @@
 					this.isTurnArtifcial = true;
 					localStorage.removeItem('comtSuccess');
 					this.comtSuccess = false;
+
 				}
 
 				if (redata.message_type == "changeKeFuSuccess") {
@@ -896,6 +866,7 @@
 						}
 					})
 					let historyTime = '';
+					this.hisLength =obj.data.chatLog.length
 					obj.data.chatLog.forEach(res => {
 						// console.log(res,'历史信息');
 						res.content = JSON.parse(res.content);
@@ -916,11 +887,11 @@
 						this.hisSviceChat.push(res);
 					})
 
-					if (obj.data.chatLog.length > 0 ) {
-						this.chatNum = 6;
-					} else {
-						this.chatNum = 0;
-					}
+					// if (obj.data.chatLog.length > 0 ) {
+					// 	this.chatNum = 6;
+					// } else {
+					// 	this.chatNum = 0;
+					// }
 
 				}