瀏覽代碼

增加消息提醒

fanlongfei 6 年之前
父節點
當前提交
7ad4645e8f
共有 2 個文件被更改,包括 221 次插入64 次删除
  1. 112 17
      CallCenterWeb.UI/index.html
  2. 109 47
      CallCenterWeb.UI/js/index.js

+ 112 - 17
CallCenterWeb.UI/index.html

@@ -1,4 +1,4 @@
1
-<!DOCTYPE html>
1
+<!DOCTYPE html>
2 2
 <html>
3 3
 
4 4
 	<head>
@@ -134,19 +134,95 @@
134 134
 			}
135 135
 			
136 136
 			.closed div {
137
-				overflow: hidden;
137
+				/* overflow: hidden; */
138 138
 			}
139 139
 			
140 140
 			.closed ul {
141 141
 				margin-bottom: 0px;
142 142
 			}
143 143
 			
144
-			.closed li {
144
+/* 			.closed li {
145 145
 				float: left;
146 146
 				margin-right: 20px;
147
+			} */
148
+			.closed li {
149
+				display: inline-block;
150
+				overflow: visible;
147 151
 			}
148 152
 			
149
-			.closed i {
153
+			.closed .top_notices{
154
+				position: relative;
155
+				
156
+			}
157
+			.closed .top_notices .top_notices_num{
158
+				position: absolute;
159
+				top: -5px;
160
+				left: 7px;
161
+				line-height: 12px;
162
+				padding: 1px 5px;
163
+				background-color: #f8ac59;
164
+				color: #FFF;
165
+				font-size: 10px;
166
+				font-weight: 600;
167
+				text-shadow: none;
168
+				text-align: center;
169
+				white-space: normal;
170
+				vertical-align: baseline;
171
+				border-radius: .25em;
172
+				margin-right: 0;
173
+			}
174
+			.top_notices_lists{
175
+				display: none;
176
+				position: absolute;
177
+				top: 24px;
178
+				background-color: #ecfeff;
179
+				width: 310px;
180
+				z-index: 1000;
181
+				border-radius: 0;
182
+				padding: 10px;
183
+				border-radius: 2px;
184
+				box-shadow: 0 0 3px rgba(86,96,117,.3);
185
+				overflow-y: auto;
186
+				max-height: 500px;
187
+			}
188
+			
189
+/* 			.top_notices_lists:before{
190
+				content: '';
191
+				position: absolute;
192
+				left: 4px;
193
+				top: -10px;
194
+				width: 0;
195
+				height: 0;
196
+				border-width: 5px;
197
+				border-style: solid;
198
+				border-color: transparent transparent #ecfeff transparent;
199
+				display: inline-block;
200
+			} */
201
+			.top_notices_lists .top_notices_item{
202
+				display: block;
203
+				line-height: 30px;
204
+				color: #676a6c;
205
+				padding-right: 50px;
206
+				position: relative;
207
+				text-align: left;
208
+			}
209
+			.top_notices_lists .divider {
210
+				width: 100%;
211
+				height: 1px;
212
+				margin: 9px 0;
213
+				overflow: hidden;
214
+				background-color: #e5e5e5;
215
+			}
216
+			.top_notices_item .top_notices_con{
217
+				margin: 0;
218
+			}
219
+			.top_notices_item .btn{
220
+				position: absolute;
221
+				right: 0;
222
+				top: 4px;
223
+				padding: 1px 10px;
224
+			}
225
+			.closed i.top_icon {
150 226
 				display: inline-block;
151 227
 				background: url(./img/chilun.png) no-repeat;
152 228
 				margin-right: 5px;
@@ -155,12 +231,16 @@
155 231
 				vertical-align: middle;
156 232
 			}
157 233
 			
234
+			.closed i.fa-envelope{
235
+				margin-right: 5px;
236
+			}
237
+			
158 238
 			.ga {
159 239
 				background-position: 0 0 !important;
160 240
 			}
161 241
 			
162 242
 			.sz {
163
-				background-position: 0 -15px !important;
243
+				background-position: 0 -16px !important;
164 244
 			}
165 245
 			
166 246
 			.tc {
@@ -878,17 +958,32 @@
878 958
 									<span class="quan zxzt lx br" style="display: inline-block;height: 20px;line-height: 20px;"></span>
879 959
 									<span class="hwzt" style="color:red;"></span>
880 960
 								</div>
881
-								<div class="ls" style="margin-top: 10px;">
882
-									<span class="size-12 min-right" onclick="Jumps()">
883
-                                    <i class="ga"></i>&nbsp;管理中心
884
-                                </span>
885
-									<span class="size-12 shezhi">
886
-                                    <i class="sz"></i>&nbsp;设置
887
-                                </span>
888
-									<span class="size-12" onclick="logout()">
889
-                                    <i class="tc"></i>退出
890
-                                </span>
891
-								</div>
961
+								<ul class="ls" style="margin-top: 10px;">
962
+									<li class="size-14 min-right top_notices" onclick="showTopMsgs()">
963
+										<i class="fa fa-envelope"></i>
964
+										<span class="top_notices_num" id="top_notices_num">0</span>&nbsp;消息
965
+										<ul class="top_notices_lists"  id="top_notices_lists">
966
+											<!-- <li class="top_notices_item">
967
+												<span class="top_notices_con">机读好书大家说道具卡</span>
968
+												<button type="button" class="btn btn-primary btn-sm">已读</button>
969
+											</li>
970
+											<li class="divider"></li>
971
+											<li class="top_notices_item">
972
+												<span class="top_notices_con">机读好书大家说道具卡</span>
973
+												<button type="button" class="btn btn-primary btn-sm">已读</button>
974
+											</li> -->
975
+										</ul>
976
+									</li>
977
+									<li class="size-12 min-right" onclick="Jumps()">
978
+										<i class="top_icon ga"></i>&nbsp;管理中心
979
+									</span>
980
+									<li class="size-12 shezhi min-right">
981
+										<i class="top_icon sz"></i>&nbsp;设置
982
+									</span>
983
+									<li class="size-12" onclick="logout()">
984
+										<i class="top_icon tc"></i>退出
985
+									</li>
986
+								</ul>
892 987
 							</div>
893 988
 						</div>
894 989
 
@@ -1251,7 +1346,7 @@
1251 1346
 
1252 1347
 		<script src="./js/plugins/pace/pace.min.js"></script>
1253 1348
 		<script src="./js/main.js?v=1.5"></script>
1254
-		<script src="./js/index.js?v=2.0"></script>
1349
+		<script src="./js/index.js?v=201903181117"></script>
1255 1350
 		<!--<script src="./js/bootstrap-select/js/bootstrap-select.js"></script>-->
1256 1351
 		<script src="./js/plugins/cropper/cropper.min.js"></script>
1257 1352
 		<script src="./js/guid.js"></script>

+ 109 - 47
CallCenterWeb.UI/js/index.js

@@ -1,44 +1,47 @@
1 1
 $(document).ready(function() {
2 2
 
3
-	if(/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
3
+	if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
4 4
 		$(".title-box").hide();
5 5
 	}
6 6
 
7
-	if($.cookie("token") == null) {
7
+	if ($.cookie("token") == null) {
8 8
 		window.location.href = "login.html";
9 9
 	}
10 10
 
11 11
 	obj.AgentExten = $.cookie("extno");
12
-	if(obj.AgentExten == undefined) {
12
+	if (obj.AgentExten == undefined) {
13 13
 		$(".Gnumbox").hide();
14 14
 	}
15 15
 	$(".Gnum").text(obj.AgentExten);
16
+	// 获取顶部获取消息
17
+	getTopMsgs();
16 18
 	$.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
17 19
 		"token": $.cookie("token")
18 20
 	}, function(result) {
19
-		if(result.state.toLowerCase() == "success") {
21
+		if (result.state.toLowerCase() == "success") {
20 22
 			// console.log(result);
21 23
 			$.cookie("userType", result.data.usertype, {
22 24
 				expires: 7
23 25
 			});
24
-			
26
+
25 27
 			$.cookie("userRoleId", result.data.role.F_RoleId, {
26 28
 				expires: 7
27 29
 			});
28
-			
30
+
29 31
 			$(".username").text(result.data.user.F_UserName);
30 32
 			$('.user_code').text(result.data.user.F_UserCode);
31 33
 			localStorage.setItem('F_UserCode', result.data.user.F_UserCode)
32 34
 			$('.group').text(result.data.user.F_SeartGroup);
33
-			if(result.data.role) {
35
+			if (result.data.role) {
34 36
 				// console.log(result.data);
35 37
 				$(".rolename").text(result.data.role.F_RoleName);
36 38
 			}
37
-			$(".yhtx").attr("src", huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + result.data.user.F_See);
39
+			$(".yhtx").attr("src", huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + result.data
40
+				.user.F_See);
38 41
 			obj.AgentGroup = result.data.user.F_SeartGroupID;
39 42
 			obj.AgentID = result.data.user.F_UserCode;
40 43
 			//obj.AgentExten = result.data.user.F_WorkNumber;
41
-			if(result.data.user.F_SeatFlag) {
44
+			if (result.data.user.F_SeatFlag) {
42 45
 				Connect();
43 46
 				$("#top-search").show();
44 47
 				$(".phoneBZ").show();
@@ -50,11 +53,11 @@ $(document).ready(function() {
50 53
 	//分机号
51 54
 	//话务相关
52 55
 	$("#top-search li").click(function() {
53
-		if($(this).find("i").hasClass("active")) {
54
-			if(obj.AgentID) {
56
+		if ($(this).find("i").hasClass("active")) {
57
+			if (obj.AgentID) {
55 58
 				var fun = $(this).attr("datafun");
56 59
 				obj.Type = fun;
57
-				switch(fun) {
60
+				switch (fun) {
58 61
 					case "Login":
59 62
 						//									obj.AgentGroup = "364";
60 63
 						obj.AgentType = "0";
@@ -96,14 +99,14 @@ $(document).ready(function() {
96 99
 	document.onkeydown = function(e) {
97 100
 		var theEvent = window.event || e;
98 101
 		var code = theEvent.keyCode || theEvent.which;
99
-		if(code == 13) {
102
+		if (code == 13) {
100 103
 			$(".CallOut").click();
101 104
 		}
102 105
 	}
103 106
 	//外呼呼出
104 107
 	$(".CallOut").click(function(event) {
105 108
 		event.stopPropagation();
106
-		if($("#Result").val()) {
109
+		if ($("#Result").val()) {
107 110
 			$.ajax({
108 111
 				type: "get",
109 112
 				url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
@@ -115,7 +118,7 @@ $(document).ready(function() {
115 118
 				},
116 119
 				success: function(result) {
117 120
 					//                		result = $.parseJSON(result);
118
-					if(result.state.toLowerCase() == "success") {
121
+					if (result.state.toLowerCase() == "success") {
119 122
 						var guid = uuid();
120 123
 						obj.Type = $("#hidwhtype").val();
121 124
 						obj.DestinationNumber = result.data.phone;
@@ -146,7 +149,7 @@ $(document).ready(function() {
146 149
 	//外呼弹屏数字键盘号码输入
147 150
 	$(".Num_ul li div").click(function() {
148 151
 		var rt = $("#Result").val() + "";
149
-		if(rt.length < 18) {
152
+		if (rt.length < 18) {
150 153
 			rt = rt + $(this).find("a").text();
151 154
 			$("#Result").val(rt);
152 155
 		}
@@ -156,7 +159,7 @@ $(document).ready(function() {
156 159
 		var Result = $("#Result").val() + "";
157 160
 		Result = Result.substr(0, Result.length - 1);
158 161
 		$("#Result").val(Result);
159
-		if(Result.length == 0) {
162
+		if (Result.length == 0) {
160 163
 			$(".img").addClass("hidens");
161 164
 		}
162 165
 	})
@@ -183,7 +186,7 @@ $(document).ready(function() {
183 186
 		showDialog();
184 187
 		//侦听浏览器窗口大小变化
185 188
 		window.onresize = function() {
186
-			if($('#dialogMove').is(':visible')) {
189
+			if ($('#dialogMove').is(':visible')) {
187 190
 				showDialog();
188 191
 			}
189 192
 		}
@@ -197,7 +200,7 @@ $(document).ready(function() {
197 200
 			},
198 201
 			success: function(result) {
199 202
 
200
-				if(result.state.toLowerCase() == "success") {
203
+				if (result.state.toLowerCase() == "success") {
201 204
 					var con = result.data.user;
202 205
 					// console.log(con)
203 206
 					$('.mgh').val(con.F_UserId);
@@ -233,7 +236,6 @@ $(document).ready(function() {
233 236
 	//关闭按钮
234 237
 	$('.ptr').click(function() {
235 238
 		hideDialog();
236
-
237 239
 	})
238 240
 	$('.grbtn').click(function() {
239 241
 		var gh = $('.mgh').val();
@@ -241,11 +243,11 @@ $(document).ready(function() {
241 243
 		var ymm = $('.spwd').val();
242 244
 		var xmm = $('.npwd').val();
243 245
 		var qmm = $('.epwd').val();
244
-		if(xmm !== qmm) {
246
+		if (xmm !== qmm) {
245 247
 			$('.wrong').show();
246 248
 			$('.npwd').val('')
247 249
 			$('.epwd').val('')
248
-		} else if(xmm == '') {
250
+		} else if (xmm == '') {
249 251
 			layer.msg("密码不允许为空!");
250 252
 		} else {
251 253
 			$('.wrong').hide();
@@ -265,7 +267,7 @@ $(document).ready(function() {
265 267
 				},
266 268
 				success: function(result) {
267 269
 					//                		result = $.parseJSON(result);
268
-					if(result.state.toLowerCase() == "success") {
270
+					if (result.state.toLowerCase() == "success") {
269 271
 						layer.msg("修改成功!");
270 272
 					}
271 273
 				}
@@ -283,11 +285,11 @@ $(document).ready(function() {
283 285
 		done: function() {}
284 286
 	});
285 287
 	var r = $("#inputImage");
286
-	if(window.FileReader) {
288
+	if (window.FileReader) {
287 289
 		r.change(function() {
288 290
 			var e, i = new FileReader,
289 291
 				t = this.files;
290
-			if(t.length && (e = t[0], /^image\/\w+$/.test(e.type))) {
292
+			if (t.length && (e = t[0], /^image\/\w+$/.test(e.type))) {
291 293
 				i.readAsDataURL(e);
292 294
 				i.onload = function() {
293 295
 					r.val("");
@@ -306,8 +308,9 @@ $(document).ready(function() {
306 308
 				"token": $.cookie("token")
307 309
 			}, function(result) {
308 310
 				result = $.parseJSON(result);
309
-				if(result.state.toLowerCase() == "success") {
310
-					$(".yhtx").attr("src", huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + result.data);
311
+				if (result.state.toLowerCase() == "success") {
312
+					$(".yhtx").attr("src", huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) +
313
+						result.data);
311 314
 					layer.msg("上传成功");
312 315
 					hideDialog();
313 316
 				}
@@ -335,7 +338,7 @@ function workcount() {
335 338
 	$.getJSON(huayi.config.callcenter_url + 'Index/GetWorkOrderCount', {
336 339
 		"token": $.cookie("token")
337 340
 	}, function(result) {
338
-		if(result.state.toLowerCase() == "success") {
341
+		if (result.state.toLowerCase() == "success") {
339 342
 			$(".dpd").text(result.data.dpd); //待指派
340 343
 			$(".djd").text(result.data.djd); //待接单
341 344
 			$(".dcl").text(result.data.dcl); //待处理
@@ -349,7 +352,7 @@ function workcount() {
349 352
 }
350 353
 //上传头像
351 354
 function uploadtx() {
352
-	if(document.getElementById("upFile").files.length > 0) {
355
+	if (document.getElementById("upFile").files.length > 0) {
353 356
 		var formData = new FormData();
354 357
 		formData.append("upFile", document.getElementById("upFile").files[0]);
355 358
 		formData.append("token", $.cookie("token"));
@@ -372,7 +375,7 @@ function uploadtx() {
372 375
 					uploadtx();
373 376
 				});
374 377
 				var r = $.parseJSON(result);
375
-				if(r.state.toLowerCase() == "success") {
378
+				if (r.state.toLowerCase() == "success") {
376 379
 					$(".yhtx").attr("src", huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + r.data);
377 380
 
378 381
 					layer.msg("上传成功");
@@ -387,7 +390,7 @@ function uploadtx() {
387 390
 }
388 391
 //格式化呼叫状态
389 392
 function GetCallState(val) {
390
-	if(val == '1') {
393
+	if (val == '1') {
391 394
 		return '已接通';
392 395
 	} else {
393 396
 		return '未接通';
@@ -397,7 +400,7 @@ function GetCallState(val) {
397 400
 //外呼弹屏
398 401
 function whtp() {
399 402
 	$("#Result").val("");
400
-	if($(".WH").hasClass("fadeOutUp")) {
403
+	if ($(".WH").hasClass("fadeOutUp")) {
401 404
 		$(".WH").removeClass("fadeOutUp").addClass("fadeInDown");
402 405
 	}
403 406
 	$(".WH").removeClass("hidens");
@@ -411,7 +414,7 @@ function whtp() {
411 414
 function loadWH() {
412 415
 	$(".phonediv").hide();
413 416
 	var n = $(".bg_title .lactive").attr("itemid");
414
-	switch(n) {
417
+	switch (n) {
415 418
 		case '0':
416 419
 			var obj = $(".phonediv").eq(0);
417 420
 			obj.show();
@@ -543,7 +546,7 @@ function loadWH() {
543 546
 function formatterDealType(val, row) {
544 547
 	//处理方式0:IVR处理1骚扰电话2自助服务3转值班电话4留言5呼损6人工处理
545 548
 	var str = '-';
546
-	switch(val) {
549
+	switch (val) {
547 550
 		case 0:
548 551
 			str = 'IVR处理';
549 552
 			break;
@@ -573,7 +576,7 @@ function getDepts() {
573 576
 	$.getJSON(huayi.config.callcenter_url + "SeatGroup/GetList", {
574 577
 		token: $.cookie("token"),
575 578
 	}, function(data) {
576
-		if(data.rows && data.rows.length > 0) {
579
+		if (data.rows && data.rows.length > 0) {
577 580
 			$('#s_department').html('');
578 581
 			$('#s_department').append('<option value="">请选择</option>');
579 582
 			$.each(data.rows, function(i, v) {
@@ -585,7 +588,7 @@ function getDepts() {
585 588
 //格式化 电话号码 分机号
586 589
 function view(val) {
587 590
 	var str = '';
588
-	if(val) {
591
+	if (val) {
589 592
 		str = '<a onclick="call(\'' + val + '\')">' + val + '</a>';
590 593
 	}
591 594
 	return str;
@@ -597,7 +600,7 @@ function call(val) {
597 600
 }
598 601
 
599 602
 function logout() {
600
-	if(!$('.Logout').hasClass('active')) {
603
+	if (!$('.Logout').hasClass('active')) {
601 604
 		$.ajax({
602 605
 			url: huayi.config.callcenter_url + "Login/Logout",
603 606
 			data: {
@@ -605,7 +608,7 @@ function logout() {
605 608
 			},
606 609
 			dataType: "json",
607 610
 			success: function(res) {
608
-				if(res.state) {
611
+				if (res.state) {
609 612
 					location.href = "./login.html";
610 613
 				}
611 614
 			}
@@ -623,23 +626,25 @@ function loadMenu() {
623 626
 		"token": $.cookie("token")
624 627
 	}, function(result) {
625 628
 		$.ajaxSettings.async = true;
626
-		if(result.state.toLowerCase() == "success") {
629
+		if (result.state.toLowerCase() == "success") {
627 630
 			var data = result.data;
628 631
 
629 632
 			var _html = "";
630 633
 			$.each(data, function(i) {
631 634
 				var row = data[i];
632
-				if(row.F_ParentID == "0") {
635
+				if (row.F_ParentID == "0") {
633 636
 					_html += '<li>';
634
-					_html += '<a  class="Click"data-id="Menu_' + row.F_ModuleId + '" href="' + row.F_OptUrl + '"><i class="fa iconfont">' + row.F_ImgUrl + '</i><span class="nav-label">' + row.F_ModuleName + '</span><span class="fa arrow"></span></a>';
637
+					_html += '<a  class="Click"data-id="Menu_' + row.F_ModuleId + '" href="' + row.F_OptUrl +
638
+						'"><i class="fa iconfont">' + row.F_ImgUrl + '</i><span class="nav-label">' + row.F_ModuleName +
639
+						'</span><span class="fa arrow"></span></a>';
635 640
 					var childNodes = row.ChildNodes; //二级
636
-					if(childNodes.length > 0) {
641
+					if (childNodes.length > 0) {
637 642
 						_html += '<ul class="nav nav-second-level">';
638 643
 						$.each(childNodes, function(i) {
639 644
 							var subrow = childNodes[i];
640 645
 
641 646
 							var childNodsThird = subrow.ChildNodes; //三级
642
-							if(childNodsThird.length > 0) {
647
+							if (childNodsThird.length > 0) {
643 648
 								_html += '<li>';
644 649
 								_html += '<a href="' + subrow.F_OptUrl + '">';
645 650
 								_html += '<span class="nav-label">' + subrow.F_ModuleName + '</span>';
@@ -649,14 +654,16 @@ function loadMenu() {
649 654
 								$.each(childNodsThird, function(i) {
650 655
 									var subrowThird = childNodsThird[i];
651 656
 									_html += '<li>';
652
-									_html += '<a class="J_menuItem" data-id="Menu_' + subrowThird.F_ModuleId + '" href="' + subrowThird.F_OptUrl + '" >' + subrowThird.F_ModuleName + '</a>';
657
+									_html += '<a class="J_menuItem" data-id="Menu_' + subrowThird.F_ModuleId + '" href="' + subrowThird.F_OptUrl +
658
+										'" >' + subrowThird.F_ModuleName + '</a>';
653 659
 									_html += '</li>';
654 660
 								});
655 661
 								_html += '</ul>';
656 662
 							} else {
657 663
 								_html += '<li>';
658
-								_html += '<a class="J_menuItem" data-id="Menu_' + subrow.F_ModuleId + '" href="' + subrow.F_OptUrl + '" >' + subrow.F_ModuleName + '</a>';
659
-								if(subrow.F_Button != '') {
664
+								_html += '<a class="J_menuItem" data-id="Menu_' + subrow.F_ModuleId + '" href="' + subrow.F_OptUrl +
665
+									'" >' + subrow.F_ModuleName + '</a>';
666
+								if (subrow.F_Button != '') {
660 667
 									_html += '<span class="' + subrow.F_Button + '"></span>';
661 668
 								}
662 669
 								_html += '</li>';
@@ -687,4 +694,59 @@ function Jumps() {
687 694
 	$(".J_menuTab").eq(0).addClass("active").text('首页');
688 695
 	$(".J_menuTab").eq(0).attr("data-id", 'widgets.html');
689 696
 	$(".J_mainContent .J_iframe0").attr("data-id", "widgets.html");
690
-}
697
+}
698
+
699
+// 顶部消息
700
+function showTopMsgs() {
701
+	if ($('#top_notices_lists').is(':visible')) {
702
+		$('#top_notices_lists').hide();
703
+	} else {
704
+		$('#top_notices_lists').show();
705
+	}
706
+}
707
+
708
+// 获取顶部消息(只展示未读消息 0未读 1已读)
709
+function getTopMsgs() {
710
+	$.getJSON(huayi.config.callcenter_url + 'Msg/GetServerMsg', {
711
+		token: $.cookie("token")
712
+	}, function(result) {
713
+		if(result.state.toLowerCase() === 'success'){
714
+			$('#top_notices_lists').empty();
715
+			result = result.data;
716
+			var str = '';
717
+			if (result && result.length) {
718
+				$('#top_notices_num').text(result.length);
719
+				for (var i = 0; i < result.length; i++) {
720
+					str += '<li class="top_notices_item">' +
721
+						'<span class="top_notices_con">'+ result[i].Detail +'</span>' +
722
+						'<button type="button" class="btn btn-primary btn-sm" onclick="signRead('+ result[i].ID +')">已读</button>' +
723
+						'</li>' +
724
+						'<li class="divider"></li>';
725
+				}
726
+			} else {
727
+				str = '<li class="top_notices_item">' +
728
+						'<span class="top_notices_con">暂无消息!</span>' +
729
+						'</li>';
730
+				$('#top_notices_num').text(0);
731
+			}
732
+			$('#top_notices_lists').append(str);
733
+			$('#top_notices_lists').find('.divider:last').remove();
734
+		}
735
+	});
736
+}
737
+
738
+// 标记消息状态
739
+function signRead(signid) {
740
+	$.post(huayi.config.callcenter_url + 'Msg/UpdateState', {
741
+		ids: signid,
742
+		state: 1, //状态,0未读 1已读
743
+		token: $.cookie("token")
744
+	}, function(result) {
745
+		result = $.parseJSON(result);
746
+		if (result.state.toLowerCase() === "success") {
747
+			// 更新顶部消息内容和数量
748
+			getTopMsgs();
749
+			$('#top_notices_lists').hide();
750
+		}
751
+	})
752
+}