Browse Source

聊天修正

jack 7 years ago
parent
commit
44f18b551a
1 changed files with 10 additions and 11 deletions
  1. 10 11
      js/tidings.js

+ 10 - 11
js/tidings.js

@ -58,17 +58,11 @@ $(document).ready(function() {
58 58
						} else {
59 59
							var oNu = Number($(".list_body").find('.list_item .tips_num').eq(i).text()) + 1;
60 60
							$(".list_body").find('.list_item .tips_num').eq(i).text(oNu).show();
61
							if($(".badge").css("display")=="none") {
62
								$(".badge").show();
63
							}
64 61
							$('.badge').text(Number($('.badge').text())+1)
65 62
						}
66 63
					} else {
67 64
						var oNu = Number($(".list_body").find('.list_item .tips_num').eq(i).text()) + 1;
68 65
						$(".list_body").find('.list_item .tips_num').eq(i).text(oNu).show();
69
						if($(".badge").css("display")=="none") {
70
							$(".badge").show();
71
						}
72 66
						$('.badge').text(Number($('.badge').text())+1)
73 67
					}
74 68
					if(i > 0)
@ -96,6 +90,8 @@ $(document).ready(function() {
96 90
				var $str = $(ostr);
97 91
				$(".list_body").prepend($str);
98 92
				personMess($info.sender, $str.find('img'), $str.find(".user_name"), $str.find(".authiconNew"));
93
				
94
						$('.badge').text(Number($('.badge').text())+1)
99 95
			}
100 96
		};
101 97
		ws.onclose = function() {
@ -322,7 +318,7 @@ $(document).ready(function() {
322 318
					if($data.title) {
323 319
						if($data.orgName) {
324 320
							if($data.office) {
325
								str = $data.title + " " + $data.orgName + "," + $data.office;
321
								str = $data.title + " " + $data.orgName + "" + $data.office;
326 322
							} else {
327 323
								str = $data.title + " " + $data.orgName;
328 324
							}
@ -336,7 +332,7 @@ $(document).ready(function() {
336 332
					} else {
337 333
						if($data.orgName) {
338 334
							if($data.office) {
339
								str = $data.orgName + "," + $data.office;
335
								str = $data.orgName + "" + $data.office;
340 336
							} else {
341 337
								str = $data.orgName;
342 338
							}
@ -492,12 +488,14 @@ $(document).ready(function() {
492 488
		if($(this).find(".tips_num").css("display")=="block") {
493 489
			$('.badge').text(Number($('.badge').text())-Number($(this).find(".tips_num").text()));
494 490
			if($('.badge').text()==0) {
495
				$(".badge").hide();
491
				$(".badge").text("");
496 492
			}
497 493
		}
498 494
		$(this).find(".tips_num").text(0).hide();
499
		if($(this).find(".user_name").text() == $(".usepro .user_name").text()) {
500
			return;
495
		if($(".usepro .user_name").css("display")=="block") {
496
			if($(this).find(".user_name").text() == $(".usepro .user_name").text()) {
497
				return;
498
			}
501 499
		}
502 500
		$(".chat_content_nodata").hide();
503 501
		$(".chat_content").show();
@ -613,6 +611,7 @@ $(document).ready(function() {
613 611
					$(this).remove();
614 612
					$(".chat_content_nodata").show();
615 613
					$(".chat_content").hide();
614
					unReadedCount(userid);
616 615
				}
617 616
			},
618 617
			"error": function() {