Explorar el Código

视频通话代码整理,以及来电弹屏增加自动派单

miaofuhao %!s(int64=2) %!d(string=hace) años
padre
commit
d84c7d47a0

+ 16 - 9
WebUI/CallCenterWeb.UI/calloutNew/js/pcSip备份.js

@@ -119,6 +119,19 @@ function closeMediaVideo() {
119 119
 	}
120 120
 
121 121
 }
122
+// 监听挂断事件
123
+function monitorDropcall(data){
124
+	
125
+	timeOut = setInterval(function() {
126
+		console.log("isEnded"+data.isEnded())
127
+		if(data.isEnded()) {
128
+			console.log("isEnded"+data.isEnded())
129
+			dropCall()
130
+			clearTimeout(timeOut)
131
+		}
132
+	}, 2000)
133
+}
134
+
122 135
 
123 136
 function testStart() {
124 137
 
@@ -189,13 +202,6 @@ function testStart() {
189 202
 			if(!nativeStream) {
190 203
 				captureLocalMediaVideo()
191 204
 			}
192
-			timeOut = setInterval(function() {
193
-				if(incomingSession.isEnded()) {
194
-					$(".videoBtn").hide();
195
-					$(".videoCall").hide();
196
-					clearTimeout(timeOut)
197
-				}
198
-			}, 2000)
199 205
 			localMediaStream()
200 206
 			// sipIncomingRTCSession(incomingSession) confirmed
201 207
 		}
@@ -265,7 +271,7 @@ var eventHandlers = {
265 271
 function sipCallRTCSession(e, state) {
266 272
 	console.log(e.session)
267 273
 	console.log(state) // 1是呼出,2是呼入
268
-	
274
+	monitorDropcall(e.session)
269 275
 	e.session.on("confirmed", function(data) {
270 276
 		console.log("confirmed")
271 277
 		console.log(data)
@@ -338,7 +344,7 @@ function sipCallVideo() {
338 344
 function answerCall() {
339 345
 	$(".callStyle").text("连接中")
340 346
 	$(".videoCall").hide();
341
-	clearTimeout(timeOut)
347
+	
342 348
 	inComing = true;
343 349
 	if(incomingSession) {
344 350
 		incomingSession.answer({
@@ -359,6 +365,7 @@ function unReg() {
359 365
 //挂断
360 366
 function dropCall() {
361 367
 	userAgent.terminateSessions();
368
+	clearTimeout(timeOut)
362 369
 	$(".callStyle").text("")
363 370
 	resScreen()
364 371
 	closeMediaVideo();

+ 2 - 1
WebUI/CallCenterWeb.UI/calloutNew/videoCall.html

@@ -72,7 +72,8 @@
72 72
 		<script>
73 73
 			var selectExten
74 74
 			$(document).ready(function() {
75
-				selectExten =$.cookie("extno")
75
+//				selectExten =$.cookie("extno")
76
+				selectExten =1016
76 77
 				testStart(selectExten); //初始化
77 78
 			})
78 79
 		</script>

+ 7 - 6
WebUI/CallCenterWeb.UI/calloutNew/weChatVideo/acceptingMan.html

@@ -22,19 +22,19 @@
22 22
         <div class="img-box2">
23 23
           <img src="img/logo_banner.png" alt="" />
24 24
         </div>
25
-				
25
+				<div class="text-logo">安阳市12345</div>
26 26
       </div>
27 27
 			
28 28
       <!--<div class="text-logo">驻马店12345</div>-->
29 29
 			
30 30
       <div class="mui-input-row">
31
-        <label><span class="mui-icon iconfont icon-yonghu"></span></label>
32
-        <input id="account" value="" type="number" class="mui-input-clear mui-input accountNum"
31
+        <label><span class="mui-icon iconfont icon-yonghu" onclick="trunPage()"></span></label>
32
+        <input id="account" value=""  type="number" class="mui-input-clear mui-input accountNum"
33 33
           placeholder="请输入账号">
34 34
       </div>
35 35
       
36 36
       <div class="mui-input-row">
37
-        <label><span class="mui-icon iconfont icon-yonghu"></span></label>
37
+        <label><span class="mui-icon iconfont icon-yonghu" onclick="trunPage()"></span></label>
38 38
         <input id="telephone" value="" type="number" class="mui-input-clear mui-input" placeholder="请输入手机号">
39 39
       </div>
40 40
 
@@ -52,9 +52,10 @@
52 52
       </div>
53 53
       
54 54
       <div class="reminderText">
55
-        (正在内部测试中,有需要请直接电话拨打12345 )
55
+        (视频诉求受理时间: 每日8:00-12:00,14:30-17:30<br />
56
+        其他时间您可致电12345,谢谢。)
56 57
       </div>
57
-      <a href="index.html" class="aTextStyle superviseBtn" style="margin-top: 10px;">我是市民</a>
58
+      <a href="index.html" class="aTextStyle superviseBtn" style="margin-top: 10px;  display: none;">我是市民</a>
58 59
 	  
59 60
 			
60 61
 			

+ 14 - 2
WebUI/CallCenterWeb.UI/calloutNew/weChatVideo/css/mobileMeeting.css

@@ -102,9 +102,21 @@ input {
102 102
   /* margin-bottom: 20px; */
103 103
   width: 80%;
104 104
   margin: 0 auto;
105
-  border-top: 1px solid #d9d9d9;
105
+  /*border-bottom: 1px solid #d9d9d9;*/
106
+}
107
+.mui-input-row .mui-input {
108
+	border-bottom: 1px solid #d9d9d9;
109
+}
110
+.mui-input-row label {
111
+    width: 20%;
112
+}
113
+.mui-input-row label~input {
114
+    float: left;
115
+    width: 73%;
116
+    margin-bottom: 0;
117
+    padding-left: 15px;
118
+    border: 0;
106 119
 }
107
-
108 120
 .mui-input-group:before {
109 121
   height: 0px;
110 122
 }

+ 5 - 4
WebUI/CallCenterWeb.UI/calloutNew/weChatVideo/index.html

@@ -38,6 +38,7 @@
38 38
         <div class="img-box2">
39 39
           <img src="img/logo_banner.png" alt="" />
40 40
         </div>
41
+        <div class="text-logo">安阳市12345</div>
41 42
       </div>
42 43
       
43 44
       <div class="mui-input-row"  style="display: none;">
@@ -47,7 +48,7 @@
47 48
       </div>
48 49
       
49 50
       <div class="mui-input-row">
50
-        <label><span class="mui-icon iconfont icon-yonghu"></span></label>
51
+        <label><span class="mui-icon iconfont icon-yonghu"  onclick="trunPage()"></span></label>
51 52
         <input id="telephone" value="" type="number" class="mui-input-clear mui-input" placeholder="请输入手机号">
52 53
       </div>
53 54
 
@@ -67,10 +68,10 @@
67 68
       </div>
68 69
       
69 70
       <div class="reminderText">
70
-        (正在内部测试中,有需要请直接电话拨打12345 )
71
+        ( (视频诉求受理时间: 每日8:00-12:00,14:30-17:30<br />
72
+        其他时间您可致电12345,谢谢。) )
71 73
       </div>
72
-      <a href="acceptingMan.html" class="aTextStyle superviseBtn" style="margin-top: 10px;">我是督办专员</a>
73
-      <a href="ceshi.html" class="aTextStyle " style="margin-top: 10px;">测试摄像头</a>
74
+      <a href="acceptingMan.html" class="aTextStyle superviseBtn" style="margin-top: 10px; display: none;">我是督办专员</a>
74 75
     </div>
75 76
 		
76 77
 		<div class="internetSpeed">

+ 2 - 0
WebUI/CallCenterWeb.UI/calloutNew/weChatVideo/js/huayi.config.js

@@ -9,7 +9,9 @@ huayi.config = {
9 9
 	//	socket_ip: "12345sp.jbdu.cn",
10 10
 	//	socket_port: "8082",
11 11
 	//	ws_uri_: "wss://12345sp1.jbdu.cn:7443", //端口   
12
+	callcenter_url: "https://docking.zwfw.anyang.gov.cn:8999/", //生产环境
12 13
 	socket_url: "wss://12345rx.zwfw.anyang.gov.cn:8082",
14
+	sip_password_:'123456',
13 15
 	ws_uri_: "wss://12345sp.zwfw.anyang.gov.cn:7443", //端口  
14 16
 	contact_uri:"@12345sp.zwfw.anyang.gov.cn;transport=wss",  //
15 17
 	

+ 24 - 24
WebUI/CallCenterWeb.UI/calloutNew/weChatVideo/js/main.js

@@ -174,7 +174,7 @@
174 174
  		extenNum = data.AgentExten
175 175
  		$("#account").val(extenNum)
176 176
  		sip_uri_ = "sip:" + extenNum + "@" + huayi.config.socket_ip;
177
- 		sip_password_ = "123456";
177
+ 		sip_password_ = huayi.config.sip_password_;
178 178
  		ws_uri_ = huayi.config.ws_uri_; //wss://sip.800100.com.cn:7443  218.29.229.185:8011
179 179
  		contact_uri =  huayi.config.contact_uri
180 180
  		testStart();
@@ -229,34 +229,34 @@
229 229
 
230 230
  //手机号与分机号关联
231 231
  function extenBind() {
232
-
233
- 	var signcode = "api/addrelation+" + formatDateTime()
232
+ 	var signcode = "index/addrelation+" + formatDateTime()
234 233
  	var telPhone = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
235 234
  	if(!telPhone.test($("#telephone").val())) {
236 235
  		$(".registStatus").text("手机号格式不正确");
237 236
  		$(".registStatus").css("color", "red")
238 237
  	} else {
239
-// 		$.ajax({
240
-// 			type: "get",
241
-// 			url: "http://222.143.106.45:65525/Api/AddRelation",
242
-// 			dataType: "json",
243
-// 			async: true,
244
-// 			data: {
245
-// 				ext: $("#account").val(),
246
-// 				telephone: $("#telephone").val(),
247
-// 				signcode: $.md5(signcode).toUpperCase()
248
-// 			},
249
-// 			success: function(data) {
250
-// 				if(data.state == "success") {
251
-// 					videoReqIdeAgent()
252
-// 				} else {
253
-// 					$(".registStatus").text("关联失败");
254
-// 					$(".registStatus").css("color", "red")
255
-// 				}
256
-//
257
-// 			}
258
-// 		})
259
- 		videoReqIdeAgent()
238
+   		$.ajax({
239
+   			type: "get",
240
+   			url: huayi.config.callcenter_url +"index/addrelation",
241
+   			dataType: "json", 
242
+   			async: true,
243
+   			data: {
244
+   				ext: $("#account").val(),
245
+   				telephone: $("#telephone").val(),
246
+   				signcode: $.md5(signcode).toUpperCase(),
247
+   				terminal: navigator.userAgent
248
+   			},
249
+   			success: function(data) {
250
+   				if(data.state == "success") {
251
+   					videoReqIdeAgent()
252
+   				} else {
253
+   					$(".registStatus").text("关联失败");  //toLowerCase  toUpperCase
254
+   					$(".registStatus").css("color", "red")
255
+   				}
256
+
257
+   			}
258
+   		})
259
+// 		videoReqIdeAgent()
260 260
  	}
261 261
 
262 262
  }

+ 10 - 2
WebUI/CallCenterWeb.UI/calloutNew/weChatVideo/js/mobileSip.js

@@ -42,7 +42,13 @@ $(function() {
42 42
 	//yourVideoView.load()
43 43
 	mediumInfo() //获取摄像头信息
44 44
 })
45
-
45
+function trunPage(){
46
+	if($(".superviseBtn").text() == "我是市民") {
47
+		window.location.href = "index.html"
48
+	} else if($(".superviseBtn").text() == "我是督办专员") {
49
+		window.location.href = "acceptingMan.html"
50
+	}
51
+}
46 52
 //视频窗口大小调整
47 53
 function videoSize() {
48 54
 	if(meetingState) {
@@ -395,8 +401,11 @@ function unReg() {
395 401
 	// window.localStorage.setItem('mathRanDom',Math.random())
396 402
 	if(!superviseMan) {
397 403
 		userAgent.unregister(true);
404
+		clearInterval(timer)
398 405
 		$(".registStatus").html("已注销")
399 406
 		$(".mui-content").show();
407
+		$(".refreshImg").hide()
408
+		$(".receiverSpeedVideo").hide()
400 409
 		$(".callHtml").hide();
401 410
 		$(".dropIcon").hide();
402 411
 		$(".answerIcon").hide();
@@ -581,7 +590,6 @@ function testStart() {
581 590
 		var session = data.session;
582 591
 		var request = data.request;
583 592
 		if(data.originator == 'remote') {
584
-			
585 593
 			console.log("电话呼入----------->"); //电话呼入
586 594
 			sipCallRTCSession(data, 2)
587 595
 			incomingSession = data.session;

+ 34 - 35
WebUI/CallCenterWeb.UI/calloutNew/weChatVideo/js/superviseMan.js

@@ -55,46 +55,45 @@ function loginSuper(){
55 55
 	  $(".registStatus").html('账号不正确');
56 56
 	}else{
57 57
 	  
58
-		  var signcode ="api/addrelation+"+formatDateTime()
59
-      console.log(signcode)
58
+		  var signcode = "index/addrelation+" + formatDateTime()
59
+      		console.log(signcode)
60 60
 		  var telPhone = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
61 61
 		  if (!telPhone.test($("#telephone").val())) {
62 62
 		    $(".registStatus").text("手机号格式不正确");
63 63
 		    
64 64
 		  } else {
65
-		    $(".registStatus").text("登录成功");
66
-			$(".loginbtn").hide()
67
-			$(".superviseVideoCall").show()
68
-			$(".superviseVideoMeetCall").show()
69
-			sip_uri_ = "sip:"+$("#account").val()+"@"+huayi.config.socket_ip;
70
-			sip_password_ = "123456";
71
-			ws_uri_ = huayi.config.ws_uri_;    //wss://sip.800100.com.cn:7443  218.29.229.185:8011
72
-			contact_uri =  huayi.config.contact_uri
73
-			testStart();
74
-//		    $.ajax({
75
-//		      type: "get",      
76
-//		      url: "https://12345sp.jbdu.cn:9002/Api/AddRelation",
77
-//		      dataType: "json",
78
-//		      async: true,
79
-//		      data: {
80
-//		        ext:$("#account").val(),
81
-//		        telephone: $("#telephone").val(),
82
-//		        signcode: $.md5(signcode).toUpperCase()
83
-//		      },
84
-//		      success: function(data) {
85
-//		        if (data.state =="success") {
86
-//							
87
-//						
88
-//						
89
-//		        }else{
90
-//            
91
-//		          $(".registStatus").text("关联失败");
92
-//		          
93
-//		        } 
94
-//		        
95
-//		        	
96
-//		      }
97
-//		    })
65
+		   
66
+			
67
+		    $.ajax({
68
+		      type: "get",      
69
+		      url: huayi.config.callcenter_url +"index/addrelation",,
70
+		      dataType: "json",
71
+		      async: true,
72
+		      data: {
73
+		        ext:$("#account").val(),
74
+		        telephone: $("#telephone").val(),
75
+		        signcode: $.md5(signcode).toUpperCase()
76
+		      },
77
+		      success: function(data) {
78
+		        if (data.state =="success") {
79
+						$(".registStatus").text("登录成功");
80
+						$(".loginbtn").hide()
81
+						$(".superviseVideoCall").show()
82
+						$(".superviseVideoMeetCall").show()
83
+						sip_uri_ = "sip:"+$("#account").val()+"@"+huayi.config.socket_ip;
84
+						sip_password_ = huayi.config.sip_password_;
85
+						ws_uri_ = huayi.config.ws_uri_;    //wss://sip.800100.com.cn:7443  218.29.229.185:8011
86
+						contact_uri =  huayi.config.contact_uri
87
+						testStart();
88
+		        }else{
89
+              
90
+		          $(".registStatus").text("关联失败");
91
+		          
92
+		        } 
93
+		        
94
+		        	
95
+		      }
96
+		    })
98 97
 		    
99 98
 		  }
100 99
 		  

+ 9 - 0
WebUI/CallCenterWeb.UI/home.html

@@ -421,6 +421,15 @@
421 421
 														</ul>
422 422
 													</div>
423 423
 												</div>
424
+											
425
+												<div class="labelTit listW15">自动派单:</div>
426
+												<div class="labelContent listW35">
427
+													<select class="form-control" id="automaticDispatch">
428
+														<option value="">请选择</option>
429
+														<option value="1">是</option>
430
+														<option value="0" selected="">否</option>
431
+													</select>
432
+												</div>
424 433
 											</div>
425 434
 											<div class="form-group clearfix">
426 435
 												<div class="labelTit listW15">电话类别:</div>

+ 13 - 9
WebUI/CallCenterWeb.UI/js/index.js

@@ -256,19 +256,21 @@ $(document).ready(function() {
256 256
 				$(".settingTelephone").val(result.data.user.F_Telephone);
257 257
 				if(result.data.user.F_SeatFlag) {
258 258
 					Connect();
259
-					
260 259
 					if($.cookie("code") == "spdbzy") {
261
-						layer.open({
262
-							type: 2,
263
-							content: "./calloutNew/videoCall.html", //iframe的url,no代表不显示滚动条
264
-							title: "视频通话窗口",
265
-							shade: 0,
266
-							offset: "rb",
267
-							area: ["22%", "65%"], //宽高
268
-						});
260
+						//layer.open({
261
+							//type: 2,
262
+							//content: "./calloutNew/videoCall.html", //iframe的url,no代表不显示滚动条
263
+							//title: "视频通话窗口",
264
+							//shade: 0,
265
+							//offset: "rb",
266
+							//area: ["22%", "65%"], //宽高
267
+						//});
269 268
 					}else{
270 269
 						connectVoice(1); //创建连接 
271 270
 					}
271
+					//if($.cookie("code") != "spdbzy") {
272
+						//connectVoice(1); //创建连接 
273
+					//}
272 274
 					//CreateWebSockets();
273 275
 					//$(".open_chat").show();
274 276
 					//heartbeat = setInterval(function() {
@@ -1093,6 +1095,7 @@ $(document).ready(function() {
1093 1095
 function Adds() {
1094 1096
 	var callid = $(".hidCallID").val();
1095 1097
 	var value = $(' input[name="banli"]:checked ').val();
1098
+	var ispd = $("#automaticDispatch").val() === "1" ? "1" : "0" // 自动派单
1096 1099
 	var threeWayCall;
1097 1100
 	if($("#threeWayCall").is(":checked")) {
1098 1101
 		threeWayCall = 1;
@@ -1140,6 +1143,7 @@ function Adds() {
1140 1143
 			zipcode: $("#zipcode").val(),
1141 1144
 			conphone: $("#conphone").val(),
1142 1145
 			title: $("#title").val(),
1146
+			ispd:ispd,
1143 1147
 			content: $("#content").val(),
1144 1148
 			callid: callid,
1145 1149
 			sourcearea: $("#sourcearea").val(), //=事发地域id

+ 87 - 40
WebUI/CallCenterWeb.UI/js/main.js

@@ -28,10 +28,11 @@ function createWebSocket() {
28 28
 function Connect() {
29 29
 //	ws = new WebSocket("ws://" + huayi.config.socket_ip + ":" + huayi.config.socket_port);
30 30
 	if($.cookie("code")!="spdbzy"){
31
-		ws = new WebSocket(huayi.config.socket_url);
31
+		ws = new WebSocket("ws://" + huayi.config.socket_ip + ":" + huayi.config.socket_port);
32 32
 	} else {
33 33
 		ws = new WebSocket(huayi.config.videoSocket_url);
34 34
 	}
35
+	console.log(ws)
35 36
     ws.onopen = function () {
36 37
         console.log(new Date() + "    " + "建立连接");
37 38
         //心跳检测重置
@@ -262,6 +263,7 @@ function LogoutBack() {
262 263
 
263 264
 //来电
264 265
 function IncomingBack(data) {
266
+	
265 267
 	$(".voiceToTextContext").html('')
266 268
     $(".ldhm").val(data.Number);
267 269
     $(".hidTel").val(data.Number);
@@ -274,29 +276,7 @@ function IncomingBack(data) {
274 276
     	$("#phonetype1").show();
275 277
     	$("#phonetype2").show();   	
276 278
     }
277
-    //获取电话所属地
278
-    $.getJSON(huayi.config.callcenter_url + 'CallInScreen/GetPhoneLocation', {
279
-        "tel": $(".hidTel").val(),
280
-        "token": $.cookie("token")
281
-    }, function (result) {
282
-        if (result.state.toLowerCase() == "success") {
283
-            $(".ldlocation").text(result.data[0].F_Name);
284
-            $(".khgsd").text(result.data[0].F_Name);
285
-        }
286
-    })
287
-    $.getJSON(huayi.config.callcenter_url + 'Callrecords/GetCallRecords', {
288
-        "callid": $(".hidCallID").val(),  //679066   $(".hidCallID").val()
289
-        "token": $.cookie("token")
290
-    }, function (result) {
291
-        if (result.state.toLowerCase() == "success") {
292
-        	if (result.data&&result.data.Business) {
293
-        		$('#businessType').val(1)
294
-        	} else{
295
-        		$('#businessType').val(0)
296
-        	}
297
-        }
298
-    })
299
-
279
+    
300 280
     //获取客户信息
301 281
     console.log($(".hidTel").val())
302 282
     $(".ttsdh").text($(".hidTel").val());
@@ -341,9 +321,71 @@ function IncomingBack(data) {
341 321
     */
342 322
     $("#bounceScreenStatus").val("1")
343 323
     // 历史记录 历史工单
344
-    loadOld()
345
-}
346 324
 
325
+	if($.cookie("code")!="spdbzy"){
326
+    	 //获取电话所属地
327
+	    $.getJSON(huayi.config.callcenter_url + 'CallInScreen/GetPhoneLocation', {
328
+	        "tel": $(".hidTel").val(),
329
+	        "token": $.cookie("token")
330
+	    }, function (result) {
331
+	        if (result.state.toLowerCase() == "success") {
332
+	            $(".ldlocation").text(result.data[0].F_Name);
333
+	            $(".khgsd").text(result.data[0].F_Name);
334
+	        }
335
+	    })
336
+	    $.getJSON(huayi.config.callcenter_url + 'Callrecords/GetCallRecords', {
337
+	        "callid": $(".hidCallID").val(),  //679066   $(".hidCallID").val()
338
+	        "token": $.cookie("token")
339
+	    }, function (result) {
340
+	        if (result.state.toLowerCase() == "success") {
341
+	        	if (result.data&&result.data.Business) {
342
+	        		$('#businessType').val(1)
343
+	        	} else{
344
+	        		$('#businessType').val(0)
345
+	        	}
346
+	        }
347
+	    })
348
+	  loadOld()
349
+    }else{
350
+    	getTelephone(data.Number)
351
+    }
352
+}
353
+var formatDateTime = function(date) {
354
+	var date = new Date();
355
+	var y = date.getFullYear().toString();
356
+	var m = date.getMonth() + 1;
357
+	m = m < 10 ? ('0' + m) : m;
358
+	var d = date.getDate();
359
+	d = d < 10 ? ('0' + d) : d;
360
+	console.log(y + m + d)
361
+	return y + m + d
362
+	// +' '+h+':'+minute+':'+second;
363
+};
364
+var signcode = "index/gettelephone+" + formatDateTime()
365
+function getTelephone(number){
366
+	$.ajax({
367
+   			type: "get",
368
+   			url: huayi.config.callcenter_url +"index/gettelephone",
369
+   			dataType: "json", 
370
+   			async: true,
371
+   			data: {
372
+   				ext: number,
373
+   				signcode: $.md5(signcode).toUpperCase(),
374
+   			},
375
+   			success: function(data) {
376
+   				if(data.state == "success") {
377
+   					$(".ldhm").val(data.data);
378
+				    $(".hidTel").val(data.data);
379
+				    $(".tel").text(data.data);
380
+				    $(".ttsdh").text(data.data);
381
+    				$(".tsdh").val(data.data);
382
+   				} else {
383
+   					console.log("查询失败")
384
+   				}
385
+
386
+   			}
387
+   		})
388
+}
347 389
 //挂断
348 390
 function DropCallBack() {
349 391
 //  $("#top-search li i").removeClass("active");
@@ -468,13 +510,15 @@ function LineStateAgentBack(data) {
468 510
         $(".hwzt").text('来电振铃'); //左下角状态显示
469 511
         $(".fwzt").removeClass("bl").addClass("br");
470 512
         if ($(".hidTel").val() && $(".hidCallID").val()) {
471
-            $.post(huayi.config.callcenter_url + 'CallInScreen/UpdateZL', {
472
-                callid: $(".hidCallID").val(),
473
-                "token": $.cookie("token")
474
-            }, function (result) {
475
-                result = JSON.parse(result);
476
-                if (result.state.toLowerCase() == "success") { }
477
-            })
513
+        	if($.cookie("code")!="spdbzy"){
514
+	            $.post(huayi.config.callcenter_url + 'CallInScreen/UpdateZL', {
515
+	                callid: $(".hidCallID").val(),
516
+	                "token": $.cookie("token")
517
+	            }, function (result) {
518
+	                result = JSON.parse(result);
519
+	                if (result.state.toLowerCase() == "success") { }
520
+	            })
521
+            }
478 522
         }
479 523
     }
480 524
     if (data.State == '6') {
@@ -482,13 +526,16 @@ function LineStateAgentBack(data) {
482 526
         $(".fwzt").removeClass("bl").addClass("br");
483 527
         $(".zxzt").removeClass("bl").addClass("br");
484 528
         if ($(".hidTel").val() && $(".hidCallID").val()) {
485
-            $.post(huayi.config.callcenter_url + 'CallInScreen/UpdateZJ', {
486
-                callid: $(".hidCallID").val(),
487
-                "token": $.cookie("token")
488
-            }, function (result) {
489
-                result = JSON.parse(result);
490
-                if (result.state.toLowerCase() == "success") { }
491
-            })
529
+        	if($.cookie("code")!="spdbzy"){
530
+        		$.post(huayi.config.callcenter_url + 'CallInScreen/UpdateZJ', {
531
+	                callid: $(".hidCallID").val(),
532
+	                "token": $.cookie("token")
533
+	            }, function (result) {
534
+	                result = JSON.parse(result);
535
+	                if (result.state.toLowerCase() == "success") { }
536
+	            })
537
+        	}
538
+            
492 539
         }
493 540
         $(".td-call").show();
494 541
         n = 0;

+ 35 - 6
WebUI/CallCenterWeb.UI/login.html

@@ -476,7 +476,8 @@
476 476
 									$.cookie("zx_user", zx_user, {
477 477
 										expires: 7
478 478
 									});
479
-									window.location.href = "home.html";
479
+									loginHref()
480
+									
480 481
 								}
481 482
 
482 483
 							}
@@ -542,9 +543,6 @@
542 543
 							mode: CryptoJS.mode.ECB,
543 544
 							padding: CryptoJS.pad.Pkcs7
544 545
 						});
545
-						//						var decrypt = CryptoJS.AES.decrypt(encrypted, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
546
-						//						console.log(CryptoJS.enc.Utf8.stringify(decrypt).toString());
547
-						//						return false;
548 546
 						/*请求后台*/
549 547
 						$.ajax({
550 548
 							type: "post",
@@ -566,7 +564,8 @@
566 564
 									$.cookie("zx_user", gl_user, {
567 565
 										expires: 7
568 566
 									});
569
-									window.location.href = "home.html";
567
+									loginHref()
568
+									
570 569
 								}
571 570
 								//else{
572 571
 								//	$(".gl_user").val('');
@@ -577,7 +576,37 @@
577 576
 					}
578 577
 
579 578
 				})
580
-
579
+				
580
+				function  loginHref(){
581
+					var thisUrl = window.document.location.href
582
+					var toHrefUrl =""
583
+					
584
+					if (thisUrl.indexOf("127.0.0.1") >0) {
585
+						toHrefUrl = "home.html"
586
+					} else{
587
+						toHrefUrl = thisUrl.split('/')
588
+						toHrefUrl.pop();
589
+						toHrefUrl = toHrefUrl.join("/")+ "/home.html"
590
+					}
591
+					if (huayi.config.callcenter_url.indexOf("https") !==-1) {
592
+						$.getJSON(
593
+							huayi.config.callcenter_url + "UserAccount/GetNowUser", {
594
+								token: $.cookie("token"),
595
+							},
596
+							function(result) {
597
+								if(result.state.toLowerCase() == "success") {
598
+									if (result.data.role.F_RoleCode ==="spdbzy") {
599
+										toHrefUrl = "https://12345rx.zwfw.anyang.gov.cn/home.html"
600
+									}else{
601
+										toHrefUrl = "http://12345rx.zwfw.anyang.gov.cn/home.html"
602
+									}
603
+									window.location.href = toHrefUrl;
604
+								}
605
+						})
606
+					}else{
607
+						window.location.href = toHrefUrl;
608
+					}
609
+				}
581 610
 			})
582 611
 		</script>
583 612
 	</body>