liuzhihui лет назад: 3
Родитель
Сommit
c8317bb022
3 измененных файлов с 156 добавлено и 188 удалено
  1. 146 110
      zmd/ZMDsipDemo/index.html
  2. 3 2
      zmd/ZMDsipDemo/js/main.js
  3. 7 76
      zmd/videoCallRecord/CallRecordVideo.html

+ 146 - 110
zmd/ZMDsipDemo/index.html

@@ -1,133 +1,131 @@
1 1
 <!DOCTYPE html>
2 2
 <html>
3 3
 
4
-  <head>
5
-    <meta charset="UTF-8">
6
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
-   <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
8
-    <meta name="viewport"
9
-      content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
10
-    <meta name="Author" content="foruok" />
11
-    <meta name="description" content="JsSIP based example web application." />
12
-    <link href="css/mui.min.css" rel="stylesheet" />
13
-    <link href="css/iconfont.css" rel="stylesheet" />
14
-    <script>
15
-    
16
-      if(!getParam("a")){       
17
-        window.location.href="index.html?a="+Math.random()               
18
-      }
19
-      function getParam(paramName) {
20
-          paramValue = "", isFound = !1;
21
-          if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
22
-              arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
23
-              while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
24
-          }
25
-          return paramValue == "" && (paramValue = null), paramValue
26
-      }
27
-
28
-    </script>
29
-    <script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
30
-    <link rel="stylesheet" type="text/css" href="css/mobileMeeting.css?v=1.2" />
31
-    <title>微信页</title>
32
-    
33
-  </head>
34
-  <body style="height: 100%; background: #000000;">
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+		<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
8
+		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
9
+		<meta name="Author" content="foruok" />
10
+		<meta name="description" content="JsSIP based example web application." />
11
+		<link href="css/mui.min.css" rel="stylesheet" />
12
+		<link href="css/iconfont.css" rel="stylesheet" />
13
+		<script>
14
+			if(!getParam("a")) {
15
+				window.location.href = "index.html?a=" + Math.random()
16
+			}
17
+
18
+			function getParam(paramName) {
19
+				paramValue = "", isFound = !1;
20
+				if(this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
21
+					arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
22
+					while(i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
23
+				}
24
+				return paramValue == "" && (paramValue = null), paramValue
25
+			}
26
+		</script>
27
+		<script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
28
+		<link rel="stylesheet" type="text/css" href="css/mobileMeeting.css?v=1.2" />
29
+		<title>微信页</title>
30
+
31
+	</head>
32
+
33
+	<body style="height: 100%; background: #000000;">
35 34
 		<input type="hidden" id="callId">
36
-    <div class="mui-content mui-input-group">
35
+		<div class="mui-content mui-input-group">
37 36
 
38
-      <div class="mui-logo-box">
39
-        <div class="img-box2">
40
-          <img src="img/logo_banner.png" alt="" />
41
-        </div>
37
+			<div class="mui-logo-box">
38
+				<div class="img-box2">
39
+					<img src="img/logo_banner.png" alt="" />
40
+				</div>
42 41
 				<div class="text-logo">驻马店12345</div>
43
-      </div>
44
-      
45
-      <div class="mui-input-row"  style="display: none;">
46
-        <label><span class="mui-icon iconfont icon-yonghu"></span></label>
47
-        <input id="account" value="" type="number" class="mui-input-clear mui-input accountNum" disabled="disabled"
48
-          placeholder="请输入账号">
49
-      </div>
50
-      
51
-      <div class="mui-input-row">
52
-        <label><span class="mui-icon iconfont icon-yonghu"></span></label>
53
-        <input id="telephone" value="" type="number" class="mui-input-clear mui-input" placeholder="请输入手机号">
54
-      </div>
42
+			</div>
55 43
 
56
-      <div class="registStatus" style="margin-top: 20px;">已注册</div>
44
+			<div class="mui-input-row" style="display: none;">
45
+				<label><span class="mui-icon iconfont icon-yonghu"></span></label>
46
+				<input id="account" value="" type="number" class="mui-input-clear mui-input accountNum" disabled="disabled" placeholder="请输入账号">
47
+			</div>
57 48
 
58
-      <div class="btnStyle">
59
-      	<div class="mui-content-padded">
60
-      		<button data-attr="0" class="mui-btn mui-btn-block mui-btn-warning loginbtn">督办专员登录</button>
61
-      	</div>
62
-      </div>
63
-      <div class="btnStyle">
64
-        <div class="mui-content-padded" style="margin-top: 30px;">
65
-          <button data-attr="1" class="mui-btn mui-btn-block mui-btn-warning videoCall">视频呼叫</button>
49
+			<div class="mui-input-row">
50
+				<label><span class="mui-icon iconfont icon-yonghu"></span></label>
51
+				<input id="telephone" value="" type="number" class="mui-input-clear mui-input" placeholder="请输入手机号">
52
+			</div>
53
+
54
+			<div class="registStatus" style="margin-top: 20px;">已注册</div>
55
+
56
+			<div class="btnStyle">
57
+				<div class="mui-content-padded">
58
+					<button data-attr="0" class="mui-btn mui-btn-block mui-btn-warning loginbtn">督办专员登录</button>
59
+				</div>
60
+			</div>
61
+			<div class="btnStyle">
62
+				<div class="mui-content-padded" style="margin-top: 30px;">
63
+					<button data-attr="1" class="mui-btn mui-btn-block mui-btn-warning videoCall">视频呼叫</button>
66 64
 					<!-- <button onclick="playAudio()" type="button">播放音频</button>
67
-					<button onclick="pauseAudio()" type="button">暂停音频</button> --> 
68
-        </div>
69
-      </div>
70
-      
71
-      <div class="reminderText">
72
-        视频诉求受理时间:每日8:00-12:00,14:30-17:30。<br>
73
-				其他时间您可致电12345,谢谢。
74
-      </div>
75
-      <a href="acceptingMan.html" class="aTextStyle superviseBtn" style="margin-top: 10px;">我是督办专员</a>
76
-    </div>
77
-		
65
+					<button onclick="pauseAudio()" type="button">暂停音频</button> -->
66
+				</div>
67
+			</div>
68
+
69
+			<div class="reminderText">
70
+				视频诉求受理时间:每日8:00-12:00,14:30-17:30。<br> 其他时间您可致电12345,谢谢。
71
+			</div>
72
+			<a href="acceptingMan.html" class="aTextStyle superviseBtn" style="margin-top: 10px;">我是督办专员</a>
73
+		</div>
74
+
78 75
 		<div class="internetSpeed">
79
-      <img class="refreshImg"  src="img/refresh.png"/>
80
-      <div class="receiverSpeedVideo">黑屏重置按钮</div>
81
-    </div>
82
-    <!-- 呼叫界面 -->
83
-    <div class="callHtml">
84
-           
85
-      <div class="customerImg">
86
-        <div class="leftText"></div>
87
-      </div>
88
-      
89
-      <div class="voiceBox muteBtn" style="display: block;">
90
-        <img src="img/muteIcon.png">
91
-      </div>
92
-      <div class="voiceBox unMuteBtn">
93
-        <img src="img/unMute.png">
94
-      </div>
95
-      
96
-      <!-- <div class="voiceBox cameraBtn" style="display: block;">
76
+			<img class="refreshImg" src="img/refresh.png" />
77
+			<div class="receiverSpeedVideo">黑屏重置按钮</div>
78
+		</div>
79
+		<!-- 呼叫界面 -->
80
+		<div class="callHtml">
81
+
82
+			<div class="customerImg">
83
+				<div class="leftText"></div>
84
+			</div>
85
+
86
+			<div class="voiceBox muteBtn" style="display: block;">
87
+				<img src="img/muteIcon.png">
88
+			</div>
89
+			<div class="voiceBox unMuteBtn">
90
+				<img src="img/unMute.png">
91
+			</div>
92
+
93
+			<!-- <div class="voiceBox cameraBtn" style="display: block;">
97 94
         <img src="img/cameraOff.png">
98 95
       </div>
99 96
       <div class="voiceBox unCameraBtn">
100 97
         <img src="img/cameraOn.png">
101 98
       </div> -->
102
-      
103
-      <div class="videoCutBtn shotCut" onclick="shotCut()">
104
-        <img src="img/shotCut.png">
105
-      </div>
106
-      <div class="buttonDiv">
107
-        <div onclick="hangupCall()" class="dropIcon" style="display: none;"><img src="img/dropCall.png"></div>
108
-        <div onclick="answerCall()" class="answerIcon" style="display: none;"><img src="img/answerCall.png"></div>
109
-				
99
+
100
+			<div class="videoCutBtn shotCut" onclick="shotCut()">
101
+				<img src="img/shotCut.png">
110 102
 			</div>
103
+			<div class="buttonDiv">
104
+				<div onclick="hangupCall()" class="dropIcon" style="display: none;"><img src="img/dropCall.png"></div>
105
+				<div onclick="answerCall()" class="answerIcon" style="display: none;"><img src="img/answerCall.png"></div>
111 106
 
112
-      <div class="showView">
113
-        <div class="videoYour">
114
-          <video id="yourVideo" autoplay></video>
115
-        </div>
116
-        <div class="videoMy">
117
-          <video id="myVideo" autoplay></video>
118
-        </div>
119
-      </div>
120
-      
121
-      <!-- <audio controls="controls" loop id="music_bg">
107
+			</div>
108
+
109
+			<div class="showView">
110
+				<div class="videoYour">
111
+					<video id="yourVideo" autoplay></video>
112
+				</div>
113
+				<div class="videoMy">
114
+					<video id="myVideo" autoplay></video>
115
+				</div>
116
+			</div>
117
+
118
+			<!-- <audio controls="controls" loop id="music_bg">
122 119
         <source src="img/incoming.mp3" type="audio/ogg" />
123 120
       </audio> -->
124 121
 			<audio controls="controls" loop id="music_bg">
125
-			  <source src="img/waiting.mp3" type="audio/ogg" />
122
+				<source src="img/waiting.mp3" type="audio/ogg" />
126 123
 			</audio>
127
-			
128
-    </div>
129 124
 
130
-  </body>
125
+		</div>
126
+
127
+	</body>
128
+
131 129
 </html>
132 130
 
133 131
 <script src="js/jquery-1.8.js"></script>
@@ -139,5 +137,43 @@
139 137
 <!--<script src="js/mobileSip.js"></script>-->
140 138
 
141 139
 <script>
142
-  document.write("<script src='js/mobileSip.js?ver="+Math.random()+"'><\/script>")
143
-</script> 
140
+	document.write("<script src='js/mobileSip.js?ver=" + Math.random() + "'><\/script>")
141
+</script>
142
+<!--<script>
143
+	var webLog = {}
144
+	var userAgent = navigator.userAgent
145
+	console.log(userAgent)
146
+	// 获取微信版本
147
+	var m1 = userAgent.match(/MicroMessenger.*?(?= )/)
148
+	if(m1 && m1.length > 0) {
149
+		webLog.wechat = m1[0]
150
+	}
151
+	// 苹果手机
152
+	if(userAgent.includes('iPhone') || userAgent.includes('iPad')) {
153
+		// 获取设备名
154
+		if(userAgent.includes('iPad')) {
155
+			webLog.device = 'iPad'
156
+		} else {
157
+			webLog.device = 'iPhone'
158
+		}
159
+		// 获取操作系统版本
160
+		m1 = userAgent.match(/iPhone OS .*?(?= )/)
161
+		if(m1 && m1.length > 0) {
162
+			webLog.system = m1[0]
163
+		}
164
+	}
165
+	// 安卓手机
166
+	if(userAgent.includes('Android')) {
167
+		// 获取设备名
168
+		m1 = userAgent.match(/Android.*; ?(.*(?= Build))/)
169
+		if(m1 && m1.length > 1) {
170
+			webLog.device = m1[1]
171
+		}
172
+		// 获取操作系统版本
173
+		m1 = userAgent.match(/Android.*?(?=;)/)
174
+		if(m1 && m1.length > 0) {
175
+			webLog.system = m1[0]
176
+		}
177
+	}
178
+	console.log(webLog)
179
+</script>-->

+ 3 - 2
zmd/ZMDsipDemo/js/main.js

@@ -248,11 +248,12 @@
248 248
  			data: {
249 249
  				ext: $("#account").val(),
250 250
  				telephone: $("#telephone").val(),
251
- 				signcode: $.md5(signcode).toUpperCase()
251
+ 				signcode: $.md5(signcode).toUpperCase(),
252
+ 				terminal: navigator.userAgent
252 253
  			},
253 254
  			success: function(data) {
254 255
  				if(data.state == "success") {
255
- 					videoReqIdeAgent()
256
+ 					//videoReqIdeAgent()
256 257
  				} else {
257 258
  					$(".registStatus").text("关联失败");
258 259
  					$(".registStatus").css("color", "red")

+ 7 - 76
zmd/videoCallRecord/CallRecordVideo.html

@@ -164,15 +164,6 @@
164 164
 
165 165
 	<body class="gray-bg">
166 166
 		<div class="wrapper wrapper-content animated fadeInRight">
167
-			<!--<div class="daoHang clearfix">
168
-            <div class="dhLeft">
169
-                <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a
170
-                        href="javaScript:;">话务管理</a>&gt;<a href="" class="nowPosition">通话记录查询</a></sapn>
171
-            </div>
172
-            <div class="dhRight">
173
-                <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
174
-            </div>
175
-        </div>-->
176 167
 			<div class="th-box">
177 168
 				<div class="box_content">
178 169
 					<table id="sqzx" style="width: 100%" border="0">
@@ -212,24 +203,17 @@
212 203
 					<thead>
213 204
 						<tr>
214 205
 							<th data-field="CallId" data-align="center">编号</th>
215
-							<th data-field="CallNumber" data-align="center" data-formatter="formatterCallNum">电话号码</th>
206
+							<th data-field="CallNumber" data-align="center">电话号码</th>
207
+							<th data-field="Terminal" data-align="center" data-formatter="formatterTerminal">设备信息</th>		
216 208
 							<th data-field="FilePath" data-formatter="setCode" data-align="center">音频</th>
217 209
 							<th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
218 210
 							<th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
219
-							<!--<th data-field="ActionType" data-formatter="ActionType" data-align="center">呼叫类型</th>-->
220
-							<!--<th data-field="MYD" data-align="center" data-formatter="MYD">满意度</th>-->
221 211
 							<th data-field="UserCode" data-align="center">坐席工号</th>
222
-							<th data-field="UserName1" data-align="center">坐席姓名</th>
223 212
 							<th data-field="ExtNumber" data-align="center">分机号</th>
224 213
 							<th data-field="BeginTime" data-align="center">开始时间</th>
225 214
 							<th data-field="TalkStartTime" data-align="center">通话开始时间</th>
226 215
 							<th data-field="TalkEndTime" data-align="center">通话结束时间</th>
227 216
 							<th data-field="EndTime" data-align="center">结束时间</th>
228
-							<!--<th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
229
-                        <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
230
-                        <th data-field="WaitTime" data-align="center">等待时长</th>
231
-                        <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
232
-                        <th data-field="Business" data-align="center" data-formatter="formatBusinessType">电话方式</th>-->
233 217
 						</tr>
234 218
 					</thead>
235 219
 				</table>
@@ -403,34 +387,15 @@
403 387
 			function Code(val, row, index) {
404 388
 				return index + 1;
405 389
 			}
406
-
407
-			// 电话号码
408
-			function formatterCallNum(val, row) {
409
-				var phoneNumber
390
+			//设备信息
391
+			function formatterTerminal(val,row){
410 392
 				if(!val) {
411
-					return
393
+					return '-'
412 394
 				}
413
-				if(val.length === 12) {
414
-					phoneNumber = val.slice(1)
415
-				} else if(val.length === 13) {
416
-					phoneNumber = val.slice(2)
417
-				} else {
418
-					phoneNumber = val
395
+				if(val){
396
+					return '<p title="'+val+'">'+val.substring(0,30)+'...'+'</p>'
419 397
 				}
420
-				return '<div class="imgs" ><p class="" onclick="viewList(\'' + phoneNumber + '\')" >' + phoneNumber +
421
-					'</p></div>';
422 398
 			}
423
-
424
-			// 查看列表
425
-			//      function viewList(phoneNumber) {
426
-			//          layer.open({
427
-			//              type: 2,
428
-			//              content: "./CallRecordList.html?phoneNumber=" + phoneNumber, //iframe的url,no代表不显示滚动条
429
-			//              title: '通话记录',
430
-			//              area: ['90%', '90%'], //宽高
431
-			//          });
432
-			//      }
433
-
434 399
 			//方向呼出
435 400
 			function callType(val) {
436 401
 				if(val == 0) {
@@ -439,29 +404,6 @@
439 404
 					return '<div class="imgs">呼出</div>';
440 405
 				}
441 406
 			}
442
-			//满意度
443
-			function MYD(val, row) {
444
-				var html = '';
445
-				switch(val + '') {
446
-					case '0':
447
-						html = '未评价';
448
-						break;
449
-					case '1':
450
-						html = '满意';
451
-						if(row.CallState == 0) {
452
-							html = '';
453
-						}
454
-						break;
455
-					case '2':
456
-						html = '一般';
457
-						break;
458
-					case '3':
459
-						html = '不满意';
460
-						break;
461
-				}
462
-				return html;
463
-			}
464
-
465 407
 			function states(val, row) {
466 408
 				if(val == 0) { //CallState
467 409
 					if(row.CallType == 0) { //呼入
@@ -481,17 +423,6 @@
481 423
 					return '<div class="imgs">接通未达</div>';
482 424
 				}
483 425
 			}
484
-
485
-			function ActionType(val) {
486
-				if(val == 2) {
487
-					return '<div class="imgs">转移</div>';
488
-				} else if(val == 3) {
489
-					return '<div class="imgs">三方通话</div>';
490
-				} else {
491
-					return '<div class="imgs">正常通话</div>';
492
-				}
493
-			}
494
-
495 426
 			//处理
496 427
 			function isDeal(val) {
497 428
 				if(val == 0) {