Przeglądaj źródła

软电话修改

miaofuhao 6 lat temu
rodzic
commit
24cba43c6f

+ 1 - 0
CallCenterWeb.UI/callScreen/callScreen.html

@@ -988,6 +988,7 @@
988 988
 		<script src="../js/comboSelect/jquery.combo.select.js"></script>
989 989
 		<script src="./../js/main.js?v=1.5"></script>
990 990
 		<script src="call.js"></script>
991
+		
991 992
 	</body>
992 993
 
993 994
 </html>

+ 6 - 4
CallCenterWeb.UI/index.html

@@ -545,7 +545,6 @@
545 545
                         <button class="btnn" id="rotateLeft" type="button">左旋转</button>
546 546
                         <button class="btnn" id="rotateRight" type="button">右旋转</button>
547 547
                         <button class="btnn" id="setDrag" type="button">确定保存</button>
548
-
549 548
                     </div>
550 549
                 </div>
551 550
             </div>
@@ -594,13 +593,16 @@
594 593
         </div>
595 594
         <div class="phone_btn_bot">
596 595
     		<div class="posbtn1 testCall" onclick="testCall()"><img src="img/call_out-icon.png"/></div>
597
-    		<div class="posbtn2 phoneNum_clear">清除</div>
598
-    		<div class="posbtn3 hangup" onclick="hangup()"><img src="img/hangu-iconp.png"/></div>
596
+    		
597
+    		<div class="posbtn2 phoneNum_clear" style="left: 45%;">清除</div>
598
+    		<div class="posbtn3 testCall" style="right: 24%;" onclick="inCall()"><img src="img/call_out-icon.png"/></div>
599
+    		<div class="posbtn3 hangup" style="right: 7%;" onclick="hangup()"><img src="img/hangu-iconp.png"/></div>
599 600
     	</div>
600 601
     </div>
602
+    <video id="videoView" hidden="hidden" width="420px" height="320px" autoplay></video>
601 603
     <div class="stringData"></div>
602 604
     <div class="stringData1"></div>
603
-     <div class="stringData2"></div>
605
+    <div class="stringData2"></div>
604 606
     <script src="./js/plugins/pace/pace.min.js"></script>
605 607
     <script src="./js/plugins/iCheck/icheck.min.js"></script>
606 608
     <script src="./css/laydate/laydate.js"></script>

+ 4 - 4
CallCenterWeb.UI/js/index.js

@@ -977,10 +977,10 @@ $('.open-softphone').click(function () {
977 977
     	$(".softphone-box").css("display","none");
978 978
     	$(".softphone-box").removeClass("active fadeInRight animated");
979 979
     }else{
980
-    	testStart();
981
-		setTimeout(function () {
982
-			reg();
983
-		}, 2000)
980
+//  	testStart();
981
+//		setTimeout(function () {
982
+//			reg();
983
+//		}, 2000)
984 984
     	$(".td-call").hide();
985 985
     	$(".tooltip_text").text("分机号:"+$.cookie("extno"))
986 986
 		$(".softphone-box").css("display","block");

+ 7 - 1
CallCenterWeb.UI/js/main.js

@@ -282,7 +282,13 @@ function DropCallBack() {
282 282
 	if(window.frames['iframe'+ hidCallID +'']){
283 283
 		 window.frames['iframe'+ hidCallID +''].$(".td-call").hide();
284 284
 	}
285
-
285
+	$(".tooltip_text").text("通话结束...");
286
+//	timeStrart=true;
287
+//	timeReg=true;
288
+//	testStart();
289
+//	setTimeout(function () {
290
+//		reg();
291
+//	}, 2000)
286 292
 
287 293
 }
288 294
 //线路状态通知

+ 42 - 32
CallCenterWeb.UI/js/softphone.js

@@ -98,6 +98,7 @@
98 98
  		});
99 99
  		data.session.on('confirmed', function(data) {
100 100
  			$(".tooltip_text").text("通话中...") //呼入建立
101
+ 			$(".hwzt").text('通话中');
101 102
  			thjsTel=true;
102 103
  			calling();
103 104
 // 			if(stringHr_1){
@@ -159,16 +160,20 @@
159 160
  		debugger
160 161
  		$(".tooltip_text").text("通话结束...");
161 162
  		clearInter();
162
- 		//layer.msg('呼叫结束', e); //对方挂机,通话结束
163
+// 		timeStrart=true;
164
+// 		timeReg=true;
165
+// 		testStart();
166
+//		setTimeout(function () {
167
+//			reg();
168
+//		}, 2000)
169
+ 		
163 170
  	},
164 171
  	'confirmed': function(e) {
165 172
  		$(".tooltip_text").text("呼叫建立...");
166 173
  		//layer.msg('呼叫建立');
167 174
  	}
168 175
  };
169
-
170
- function testCall() {
171
- 	//呼入接听
176
+function inCall () {
172 177
 	if (incomingSession) {
173 178
 		incomingSession.answer({
174 179
 			'mediaConstraints': {
@@ -182,30 +187,32 @@
182 187
 			'mediaStream': localStream
183 188
 		});
184 189
 		incomingSession = null;
185
-	}else{
186
-//		外呼拨打
187
-		var sip_phone_number_ = document.getElementById("sip_phone_number").value.toString();
188
-	 	var options = {
189
-	 		'eventHandlers': eventHandlers,
190
-	 		'mediaConstraints': {
191
-	 			'audio': true,
192
-	 			'video': false,
193
-	 			mandatory: {
194
-	 				maxWidth: 640,
195
-	 				maxHeight: 360
196
-	 			}
197
-	 		},
198
-	 		'mediaStream': localStream
199
-	 	};
200
-	 	outgoingSession = userAgent.call(sip_phone_number_, options);
201
-	 	
202
-	 	var p = '<a  style="background: #24c792; color: #FFFFFF;" href="javascript:;" class="active J_menuTab" data-id="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'">外呼弹屏<i class="fa fa-times-circle"></i></a>';
203
-		$(".J_menuTab").removeClass("active");
204
-		var nif = '<iframe class="J_iframe J_iframeNew" name="iframe"  width="100%" height="100%" src="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'"></iframe>';
205
-		$(".J_mainContent").find("iframe.J_iframe").hide().parents(".J_mainContent").append(nif);
206
-		$(".J_menuTabs .page-tabs-content").append(p);
207 190
 	}
208 191
 	
192
+}	
193
+ function testCall() {
194
+//		外呼拨打
195
+	var sip_phone_number_ = document.getElementById("sip_phone_number").value.toString();
196
+ 	var options = {
197
+ 		'eventHandlers': eventHandlers,
198
+ 		'mediaConstraints': {
199
+ 			'audio': true,
200
+ 			'video': false,
201
+ 			mandatory: {
202
+ 				maxWidth: 640,
203
+ 				maxHeight: 360
204
+ 			}
205
+ 		},
206
+ 		'mediaStream': localStream
207
+ 	};
208
+ 	outgoingSession = userAgent.call(sip_phone_number_, options);
209
+ 	
210
+ 	var p = '<a  style="background: #24c792; color: #FFFFFF;" href="javascript:;" class="active J_menuTab" data-id="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'">外呼弹屏<i class="fa fa-times-circle"></i></a>';
211
+	$(".J_menuTab").removeClass("active");
212
+	var nif = '<iframe class="J_iframe J_iframeNew" name="iframe"  width="100%" height="100%" src="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'"></iframe>';
213
+	$(".J_mainContent").find("iframe.J_iframe").hide().parents(".J_mainContent").append(nif);
214
+	$(".J_menuTabs .page-tabs-content").append(p);
215
+	
209 216
  }
210 217
 
211 218
  function reg() {
@@ -222,11 +229,12 @@
222 229
  	setInterval(function() {
223 230
  		timeStrart=true;
224 231
  		timeReg=true;
225
- 		testStart();
226
-		setTimeout(function () {
227
-			reg();
228
-		}, 2000)
229
-	}, 1000*30);
232
+ 		//testStart();
233
+ 		reg();
234
+//		setTimeout(function () {
235
+//			reg();
236
+//		}, 2000)
237
+	}, 1000*60);
230 238
  }
231 239
 	
232 240
 
@@ -239,10 +247,12 @@
239 247
 
240 248
  function hangup() {
241 249
  	debugger
242
- 	clearInter();
250
+ 	//clearInter();
243 251
  	//window.frames[1].clearInter();
244 252
  	$(".tooltip_text").text("挂断...");
245 253
  	//console.log('hangup----------->');
254
+ 	obj.Type = "DropCall";
255
+ 	Send();
246 256
  	userAgent.terminateSessions();
247 257
  }
248 258
  

+ 1 - 0
CallCenterWeb.UI/login.html

@@ -7,6 +7,7 @@
7 7
     <meta name="keywords">
8 8
     <meta name="description">
9 9
     <meta name="renderer" content="webkit|ie-comp|ie-stand" />
10
+    <meta name="format-detection" content="telephone=no">
10 11
     <link rel="shortcut icon" href="img/32.ico" />
11 12
     <script src="Script/Common/huayi.load.js"></script>
12 13
     <script src="Script/Common/huayi.config.js"></script>