iv-npm 1.7.68 → 1.7.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,694 +1,739 @@
1
- <!DOCTYPE html
2
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
2
  <html xmlns="http://www.w3.org/1999/xhtml">
4
-
5
- <head>
6
- <title>文豆高拍仪多浏览器V1.26.2版测试Demo</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
- </head>
9
-
10
- <!-- 引入高拍仪JS接口-->
11
- <script src="wdgpy.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="postMessage.js" type="text/javascript" charset="utf-8"></script>
13
-
14
- <script type="text/javascript">
15
- var fileBase64Str = "";
16
- var file_path = "";
17
-
18
- //时间格式化显示
19
- function formatDate(time) {
20
- var date = new Date(time);
21
- var year = date.getFullYear(),
22
- month = date.getMonth() + 1,
23
- day = date.getDate(),
24
- hour = date.getHours(),
25
- min = date.getMinutes(),
26
- sec = date.getSeconds();
27
- var newTime = year +
28
- (month < 10 ? '0' + month : month) +
29
- (day < 10 ? '0' + day : day) +
30
- (hour < 10 ? '0' + hour : hour) +
31
- (min < 10 ? '0' + min : min) +
32
- (sec < 10 ? '0' + sec : sec);
33
- return newTime;
34
- }
35
-
36
-
37
- function sleep(milliSeconds) {
38
- var startTime = new Date().getTime();
39
- while (new Date().getTime() < startTime + milliSeconds);
40
- }
41
-
42
- function ShowInfo(op) {
43
- console.log(op)
44
- }
45
-
46
-
47
- /*----------------------------------------------------
3
+ <head>
4
+ <title>文豆高拍仪多浏览器V1.26.2版测试Demo</title>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ </head>
7
+
8
+ <!-- 引入高拍仪JS接口-->
9
+ <script src="wdgpy.js" type="text/javascript" charset="utf-8"></script>
10
+ <script src="postMessage.js" type="text/javascript" charset="utf-8"></script>
11
+
12
+ <script type="text/javascript">
13
+ function getMessageId(length, chars) {
14
+ var result = "";
15
+ for (var i = length; i > 0; --i)
16
+ result += chars[Math.floor(Math.random() * chars.length)];
17
+ return result;
18
+ }
19
+ var messageId = getMessageId(
20
+ 10,
21
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
22
+ );
23
+
24
+ var fileBase64Str = "";
25
+ var file_path = "";
26
+
27
+ //时间格式化显示
28
+ function formatDate(time) {
29
+ var date = new Date(time);
30
+ var year = date.getFullYear(),
31
+ month = date.getMonth() + 1,
32
+ day = date.getDate(),
33
+ hour = date.getHours(),
34
+ min = date.getMinutes(),
35
+ sec = date.getSeconds();
36
+ var newTime =
37
+ year +
38
+ (month < 10 ? "0" + month : month) +
39
+ (day < 10 ? "0" + day : day) +
40
+ (hour < 10 ? "0" + hour : hour) +
41
+ (min < 10 ? "0" + min : min) +
42
+ (sec < 10 ? "0" + sec : sec);
43
+ return newTime;
44
+ }
45
+
46
+ function sleep(milliSeconds) {
47
+ var startTime = new Date().getTime();
48
+ while (new Date().getTime() < startTime + milliSeconds);
49
+ }
50
+
51
+ function ShowInfo(op) {
52
+ console.log(op);
53
+ }
54
+
55
+ /*----------------------------------------------------
48
56
  ---(必须重写该函数)返回获取的设备数目及设备名称 ---
49
57
  -----------------------------------------------------*/
50
- function GetDevCountAndNameResultCB(devCount, devNameArr) {
51
-
52
- if (devCount > 0) {
53
-
54
- var obj = document.getElementById("DevName");
55
- obj.options.length = 0;
56
- for (var i = 0; i < devCount; i++) {
57
- var objOption = document.createElement("option");
58
- objOption.text = devNameArr[i];
59
- objOption.value = i;
60
- obj.options.add(objOption);
58
+ function GetDevCountAndNameResultCB(devCount, devNameArr) {
59
+ if (devCount > 0) {
60
+ var obj = document.getElementById("DevName");
61
+ obj.options.length = 0;
62
+ for (var i = 0; i < devCount; i++) {
63
+ var objOption = document.createElement("option");
64
+ objOption.text = devNameArr[i];
65
+ objOption.value = i;
66
+ obj.options.add(objOption);
67
+ }
68
+ obj.selectedIndex = 0;
69
+ var CamID = obj.selectedIndex;
70
+
71
+ //获取分辨率
72
+ Cam_GetDevResolution(CamID);
73
+ } else {
74
+ window.parent.postMessage(
75
+ { error: "没有发现合适的设备!", messageId: messageId },
76
+ "*"
77
+ );
61
78
  }
62
- obj.selectedIndex = 0;
63
- var CamID = obj.selectedIndex;
64
-
65
- //获取分辨率
66
- Cam_GetDevResolution(CamID);
67
-
68
- }
69
- else {
70
- window.parent.postMessage({ error: "没有发现合适的设备!" }, '*')
71
79
  }
72
- }
73
80
 
74
- /*---------------------------------------------------
81
+ /*---------------------------------------------------
75
82
  --- (必须重写该函数)返回获取的设备分辨率信息 ---
76
83
  ----------------------------------------------------*/
77
- function GetResolutionResultCB(resCount, resArr) {
78
-
79
- if (resCount > 0) {
80
- var selectIndex = 0;
81
- var obj = document.getElementById("DevResolution");
82
- obj.options.length = 0;
83
- for (var i = 0; i < resCount; i++) {
84
- var objOption = document.createElement("option");
85
- objOption.text = resArr[i];
86
- objOption.value = i;
87
- obj.options.add(objOption);
88
- //默认1000万分辨率打开
89
- if (resArr[i] == "3672*2856") {
90
- selectIndex = i;
84
+ function GetResolutionResultCB(resCount, resArr) {
85
+ if (resCount > 0) {
86
+ var selectIndex = 0;
87
+ var obj = document.getElementById("DevResolution");
88
+ obj.options.length = 0;
89
+ for (var i = 0; i < resCount; i++) {
90
+ var objOption = document.createElement("option");
91
+ objOption.text = resArr[i];
92
+ objOption.value = i;
93
+ obj.options.add(objOption);
94
+ //默认1000万分辨率打开
95
+ if (resArr[i] == "3672*2856") {
96
+ selectIndex = i;
97
+ }
91
98
  }
99
+ obj.selectedIndex = selectIndex;
100
+
101
+ //打开摄像头
102
+ Cam_Close();
103
+ var restr = obj[obj.selectedIndex].text;
104
+ var pos = restr.lastIndexOf("*");
105
+ var width = parseInt(restr.substring(0, pos));
106
+ var height = parseInt(restr.substring(pos + 1, restr.length));
107
+ var CamID = document.getElementById("DevName").selectedIndex;
108
+ Cam_Open(CamID, width, height);
109
+ } else {
110
+ window.parent.postMessage({ error: "获取分辨率信息失败!" , messageId: messageId}, "*");
92
111
  }
93
- obj.selectedIndex = selectIndex;
94
-
95
- //打开摄像头
96
- Cam_Close();
97
- var restr = obj[obj.selectedIndex].text;
98
- var pos = restr.lastIndexOf("*");
99
- var width = parseInt(restr.substring(0, pos));
100
- var height = parseInt(restr.substring(pos + 1, restr.length));
101
- var CamID = document.getElementById("DevName").selectedIndex;
102
- Cam_Open(CamID, width, height);
103
- }
104
- else {
105
- window.parent.postMessage({ error: "获取分辨率信息失败!" }, '*')
106
112
  }
107
- }
108
113
 
109
-
110
- /*---------------------------------------------------
114
+ /*---------------------------------------------------
111
115
  --- (必须重写该函数)返回摄像头开启状态 ---
112
116
  ----------------------------------------------------*/
113
- function GetCameraOnOffStatus(status) {
114
- if (status == 0) {
115
- window.parent.postMessage({ message: "设备开启成功" }, '*')
116
- Cam_SetCutMode(1); //设备开启后自动裁剪
117
- }
118
- else {
119
- window.parent.postMessage({ error: "设备开启失败" }, '*')
117
+ function GetCameraOnOffStatus(status) {
118
+ if (status == 0) {
119
+ window.parent.postMessage({ message: "设备开启成功", messageId: messageId }, "*");
120
+ Cam_SetCutMode(1); //设备开启后自动裁剪
121
+ } else {
122
+ window.parent.postMessage({ error: "设备开启失败", messageId: messageId }, "*");
123
+ }
120
124
  }
121
125
 
122
- }
123
-
124
-
125
- /*---------------------------------------------------
126
+ /*---------------------------------------------------
126
127
  -------- (必须重写该函数)拍照结果 ---------
127
128
  ----------------------------------------------------*/
128
- function GetCaptrueImgResultCB(flag, path, base64Str) {
129
- if (flag == 0) {
130
- file_path = path;
131
- fileBase64Str = base64Str;
132
- var obj = document.getElementById("CameraPhoto");
133
- obj.src = "data:;base64," + base64Str;
134
- if (path == "") {
135
- window.parent.postMessage({ message: "拍照成功" }, '*')
136
- }
137
- else {
138
- window.parent.postMessage({ message: "拍照成功,图片保存位置:" + path, GetCaptrueImgResultCB: "data:;base64," + base64Str }, '*')
129
+ function GetCaptrueImgResultCB(flag, path, base64Str) {
130
+ if (flag == 0) {
131
+ file_path = path;
132
+ fileBase64Str = base64Str;
133
+ var obj = document.getElementById("CameraPhoto");
134
+ obj.src = "data:;base64," + base64Str;
135
+ if (path == "") {
136
+ window.parent.postMessage({ message: "拍照成功", messageId: messageId }, "*");
137
+ } else {
138
+ window.parent.postMessage(
139
+ {
140
+ message: "拍照成功,图片保存位置:" + path,
141
+ GetCaptrueImgResultCB: "data:;base64," + base64Str,
142
+ messageId: messageId
143
+ },
144
+ "*"
145
+ );
146
+ }
147
+ } else {
148
+ window.parent.postMessage({ error: "拍照失败", messageId: messageId }, "*");
139
149
  }
140
150
  }
141
- else {
142
- window.parent.postMessage({ error: "拍照失败" }, '*')
143
- }
144
-
145
- }
146
-
147
151
 
148
- /*---------------------------------------------------
152
+ /*---------------------------------------------------
149
153
  ------ (必须重写该函数)身份证信息返回结果 ------
150
154
  ----------------------------------------------------*/
151
- function GetIdCardInfoResultCB(flag, Name, Sex, Nation, Born, Address, CardNum, IssuedAt, EffectedDate, CardImgPath, CardImgBase64) {
152
- if (flag == 0) {
153
- document.getElementById("CardName").value = Name;
154
- document.getElementById("CardSex").value = Sex;
155
- document.getElementById("CardNation").value = Nation;
156
- document.getElementById("CardBorn").value = Born;
157
- document.getElementById("CardAddress").value = Address;
158
- document.getElementById("CardNum").value = CardNum;
159
- document.getElementById("CardIssuedAt").value = IssuedAt;
160
- document.getElementById("CardEffectDate").value = EffectedDate;
161
- var obj = document.getElementById("IdCardPhoto");
162
- obj.src = "data:;base64," + CardImgBase64;
163
- window.parent.postMessage({ message: "读卡成功" }, '*')
164
- }
165
- else {
166
- window.parent.postMessage({ error: "读卡失败" }, '*')
155
+ function GetIdCardInfoResultCB(
156
+ flag,
157
+ Name,
158
+ Sex,
159
+ Nation,
160
+ Born,
161
+ Address,
162
+ CardNum,
163
+ IssuedAt,
164
+ EffectedDate,
165
+ CardImgPath,
166
+ CardImgBase64
167
+ ) {
168
+ if (flag == 0) {
169
+ document.getElementById("CardName").value = Name;
170
+ document.getElementById("CardSex").value = Sex;
171
+ document.getElementById("CardNation").value = Nation;
172
+ document.getElementById("CardBorn").value = Born;
173
+ document.getElementById("CardAddress").value = Address;
174
+ document.getElementById("CardNum").value = CardNum;
175
+ document.getElementById("CardIssuedAt").value = IssuedAt;
176
+ document.getElementById("CardEffectDate").value = EffectedDate;
177
+ var obj = document.getElementById("IdCardPhoto");
178
+ obj.src = "data:;base64," + CardImgBase64;
179
+ window.parent.postMessage({ message: "读卡成功", messageId: messageId }, "*");
180
+ } else {
181
+ window.parent.postMessage({ error: "读卡失败" , messageId: messageId}, "*");
182
+ }
167
183
  }
168
184
 
169
- }
170
-
171
-
172
- /*---------------------------------------------------
185
+ /*---------------------------------------------------
173
186
  ------ (必须重写该函数)条码二维码识别返回结果------
174
187
  ----------------------------------------------------*/
175
- function QrBarCodeRecogResultCB(flag, codeStr) {
176
- if (flag == 0)
177
- window.parent.postMessage({ message: "条码/二维码识别结果:" + codeStr }, '*')
178
- else
179
- window.parent.postMessage({ error: "未识别到内容" }, '*')
180
- }
181
-
182
-
183
-
184
- /*********************
185
- *** 初始化操作 ***
186
- **********************/
187
-
188
-
189
- function LoadCameraDocument() {
190
-
191
- if (!window.WebSocket) {
192
- alert("浏览器不支持HTML5,请更新或者使用其它浏览器!");
188
+ function QrBarCodeRecogResultCB(flag, codeStr) {
189
+ if (flag == 0)
190
+ window.parent.postMessage(
191
+ { message: "条码/二维码识别结果:" + codeStr, messageId: messageId },
192
+ "*"
193
+ );
194
+ else window.parent.postMessage({ error: "未识别到内容", messageId: messageId }, "*");
193
195
  }
194
- //console.log("LoadCameraDocument");
195
- var obj = document.getElementById("CameraCtl");
196
- Cam_ControlInit(obj, 0, 0, 600, 400);
197
- }
198
-
199
-
200
- window.onload = function () {
201
- console.log("window.onload");
202
- }
203
196
 
197
+ /*********************
198
+ *** 初始化操作 ***
199
+ **********************/
204
200
 
205
- /*********************
206
- *** 打开摄像头 ***
207
- **********************/
208
- function toOpenCamera() {
209
- var CamID = document.getElementById("DevName").selectedIndex;
210
- var obj = document.getElementById("DevResolution");
211
- var restr = obj[obj.selectedIndex].text;
212
- var pos = restr.lastIndexOf("*");
213
- var width = parseInt(restr.substring(0, pos));
214
- var height = parseInt(restr.substring(pos + 1, restr.length));
215
- Cam_Open(CamID, width, height);
216
- }
201
+ function LoadCameraDocument() {
202
+ if (!window.WebSocket) {
203
+ alert("浏览器不支持HTML5,请更新或者使用其它浏览器!");
204
+ }
205
+ //console.log("LoadCameraDocument");
206
+ var obj = document.getElementById("CameraCtl");
207
+ Cam_ControlInit(obj, 0, 0, 600, 400);
208
+ }
217
209
 
218
- /*********************
219
- *** 关闭摄像头 ***
220
- **********************/
221
- function toCloseCamera() {
222
- Cam_Close();
223
- }
210
+ window.onload = function () {
211
+ console.log("window.onload");
212
+ };
224
213
 
225
214
  /*********************
226
- *** 关闭弹窗 ***
227
- **********************/
228
- function toCloseModal() {
229
- window.onbeforeunload()
230
- }
231
-
232
-
233
- /*********************
234
- *** 切换摄像头 ***
235
- **********************/
236
- function SelectDevice() {
237
- var CamID = document.getElementById("DevName").selectedIndex;
238
- //获取分辨率
239
- Cam_GetDevResolution(CamID);
240
- }
241
-
242
-
243
- /*********************
244
- *** 切换分辨率 ***
245
- **********************/
246
- function SelectResolution() {
247
- var obj = document.getElementById("DevResolution");
248
- var restr = obj[obj.selectedIndex].text;
249
- var pos = restr.lastIndexOf("*");
250
- var width = parseInt(restr.substring(0, pos));
251
- var height = parseInt(restr.substring(pos + 1, restr.length));
252
- var CamID = document.getElementById("DevName").selectedIndex;
253
- Cam_Open(CamID, width, height);
254
- }
255
-
256
-
257
- /*********************
258
- *** 拍照 ***
259
- **********************/
260
- function TakePhoto() {
261
-
262
- var name = formatDate(new Date().getTime());
263
-
264
- var obj = document.getElementById("FileType");
265
- var path;
266
- Cam_SetFileType(obj.selectedIndex); //设置文件格式
267
- if (obj.selectedIndex == 0) {
268
- path = "D:\\" + name + ".jpg";
269
- }
270
- else if (obj.selectedIndex == 1) {
271
- path = "D:\\" + name + ".png";
272
- }
273
- else if (obj.selectedIndex == 2) {
274
- path = "D:\\" + name + ".tif";
275
- }
276
- else if (obj.selectedIndex == 3) {
277
- path = "D:\\" + name + ".pdf";
278
- }
279
- else {
280
- path = "D:\\" + name + ".jpg";
281
- }
282
-
283
- Cam_Photo(path); //主摄像头拍照
284
- //Cam_Photo(""); //传空路径拍照获取Base64
285
-
286
-
287
- }
288
-
289
-
290
- function SetCameraCutMode() {
291
- Cam_SetCutMode(1);
292
- // if (document.getElementById("Radio1").checked) {
293
- // Cam_SetCutMode(0);
294
- // }
295
- // if (document.getElementById("Radio3").checked) {
296
- // Cam_SetCutMode(1);
297
- // }
298
- // if (document.getElementById("Radio2").checked) {
299
- // Cam_SetCutMode(2);
300
- // }
301
- // if (document.getElementById("Radio4").checked) {
302
-
303
- // Cam_SetCutMode(3);
304
- // //设置裁剪区域
305
- // //toSleep(100);
306
- // //console.log("SetCustomArea");
307
- // SetCustomArea(3000, 3000, 9000, 9000);
308
- // }
309
- }
310
-
311
-
312
- /*********************
313
- *** 读取身份证 ***
314
- **********************/
315
- function GetIdCardInfo() {
316
- var path = "D:\\IdCard.jpg";
317
- Cam_ReadIdCard(path);
318
- //Cam_ReadIdCard("");
319
- }
215
+ *** 打开摄像头 ***
216
+ **********************/
217
+ function toOpenCamera() {
218
+ var CamID = document.getElementById("DevName").selectedIndex;
219
+ var obj = document.getElementById("DevResolution");
220
+ var restr = obj[obj.selectedIndex].text;
221
+ var pos = restr.lastIndexOf("*");
222
+ var width = parseInt(restr.substring(0, pos));
223
+ var height = parseInt(restr.substring(pos + 1, restr.length));
224
+ Cam_Open(CamID, width, height);
225
+ }
320
226
 
227
+ /*********************
228
+ *** 关闭摄像头 ***
229
+ **********************/
230
+ function toCloseCamera() {
231
+ Cam_Close();
232
+ }
321
233
 
322
- /*********************
323
- *** 设置文件格式 ***
324
- **********************/
325
- function toSetFileType() {
326
- var obj = document.getElementById("FileType");
327
- Cam_SetFileType(obj.selectedIndex);
328
- }
234
+ /*********************
235
+ *** 关闭弹窗 ***
236
+ **********************/
237
+ function toCloseModal() {
238
+ window.onbeforeunload();
239
+ }
329
240
 
241
+ /*********************
242
+ *** 切换摄像头 ***
243
+ **********************/
244
+ function SelectDevice() {
245
+ var CamID = document.getElementById("DevName").selectedIndex;
246
+ //获取分辨率
247
+ Cam_GetDevResolution(CamID);
248
+ }
330
249
 
331
- /*********************
332
- *** 设置色彩模式 ***
333
- **********************/
334
- function toSetColorModel() {
335
- var obj = document.getElementById("ColorMode");
336
- Cam_SetColorMode(obj.selectedIndex);
337
- }
250
+ /*********************
251
+ *** 切换分辨率 ***
252
+ **********************/
253
+ function SelectResolution() {
254
+ var obj = document.getElementById("DevResolution");
255
+ var restr = obj[obj.selectedIndex].text;
256
+ var pos = restr.lastIndexOf("*");
257
+ var width = parseInt(restr.substring(0, pos));
258
+ var height = parseInt(restr.substring(pos + 1, restr.length));
259
+ var CamID = document.getElementById("DevName").selectedIndex;
260
+ Cam_Open(CamID, width, height);
261
+ }
338
262
 
263
+ /*********************
264
+ *** 拍照 ***
265
+ **********************/
266
+ function TakePhoto() {
267
+ var name = formatDate(new Date().getTime());
268
+
269
+ var obj = document.getElementById("FileType");
270
+ var path;
271
+ Cam_SetFileType(obj.selectedIndex); //设置文件格式
272
+ if (obj.selectedIndex == 0) {
273
+ path = "D:\\" + name + ".jpg";
274
+ } else if (obj.selectedIndex == 1) {
275
+ path = "D:\\" + name + ".png";
276
+ } else if (obj.selectedIndex == 2) {
277
+ path = "D:\\" + name + ".tif";
278
+ } else if (obj.selectedIndex == 3) {
279
+ path = "D:\\" + name + ".pdf";
280
+ } else {
281
+ path = "D:\\" + name + ".jpg";
282
+ }
339
283
 
340
- /*********************
341
- *** 设置JPG图像质量 ***
342
- **********************/
343
- function toSetJpgQuality() {
344
- var obj = document.getElementById("JpgQuality");
345
- var val = obj[obj.selectedIndex].text;
346
- Cam_SetJpgQuality(parseInt(val));
347
- }
284
+ Cam_Photo(path); //主摄像头拍照
285
+ //Cam_Photo(""); //传空路径拍照获取Base64
286
+ }
348
287
 
288
+ function SetCameraCutMode() {
289
+ Cam_SetCutMode(1);
290
+ // if (document.getElementById("Radio1").checked) {
291
+ // Cam_SetCutMode(0);
292
+ // }
293
+ // if (document.getElementById("Radio3").checked) {
294
+ // Cam_SetCutMode(1);
295
+ // }
296
+ // if (document.getElementById("Radio2").checked) {
297
+ // Cam_SetCutMode(2);
298
+ // }
299
+ // if (document.getElementById("Radio4").checked) {
349
300
 
350
- /*********************
351
- *** 设置去黑边 ***
352
- **********************/
353
- function toSetDeleteBlackEdge() {
354
- var obj = document.getElementById("Checkbox1");
355
- if (obj.checked) {
356
- Cam_SetDeleteBlackEdge(1);
357
- }
358
- else {
359
- Cam_SetDeleteBlackEdge(0);
301
+ // Cam_SetCutMode(3);
302
+ // //设置裁剪区域
303
+ // //toSleep(100);
304
+ // //console.log("SetCustomArea");
305
+ // SetCustomArea(3000, 3000, 9000, 9000);
306
+ // }
360
307
  }
361
- }
362
308
 
363
- /*********************
364
- *** 设置去底色 ***
365
- **********************/
366
- function toSetDeleteBgColor() {
367
- var obj = document.getElementById("Checkbox2");
368
- if (obj.checked) {
369
- Cam_SetDeleteBgColor(1);
309
+ /*********************
310
+ *** 读取身份证 ***
311
+ **********************/
312
+ function GetIdCardInfo() {
313
+ var path = "D:\\IdCard.jpg";
314
+ Cam_ReadIdCard(path);
315
+ //Cam_ReadIdCard("");
370
316
  }
371
- else {
372
- Cam_SetDeleteBgColor(0);
317
+
318
+ /*********************
319
+ *** 设置文件格式 ***
320
+ **********************/
321
+ function toSetFileType() {
322
+ var obj = document.getElementById("FileType");
323
+ Cam_SetFileType(obj.selectedIndex);
373
324
  }
374
- }
375
325
 
326
+ /*********************
327
+ *** 设置色彩模式 ***
328
+ **********************/
329
+ function toSetColorModel() {
330
+ var obj = document.getElementById("ColorMode");
331
+ Cam_SetColorMode(obj.selectedIndex);
332
+ }
376
333
 
334
+ /*********************
335
+ *** 设置JPG图像质量 ***
336
+ **********************/
337
+ function toSetJpgQuality() {
338
+ var obj = document.getElementById("JpgQuality");
339
+ var val = obj[obj.selectedIndex].text;
340
+ Cam_SetJpgQuality(parseInt(val));
341
+ }
377
342
 
378
- /*********************
379
- ****** 上传方法2 ******
380
- **********************/
343
+ /*********************
344
+ *** 设置去黑边 ***
345
+ **********************/
346
+ function toSetDeleteBlackEdge() {
347
+ var obj = document.getElementById("Checkbox1");
348
+ if (obj.checked) {
349
+ Cam_SetDeleteBlackEdge(1);
350
+ } else {
351
+ Cam_SetDeleteBlackEdge(0);
352
+ }
353
+ }
381
354
 
382
- function HttpUploadFile() {
383
- //fileBase64Str在拍照回调函数中赋值,用于测试上传方法2
384
- if (fileBase64Str != "") {
385
- var pos = file_path.lastIndexOf("\\");
386
- var filename = file_path.substring(pos + 1, file_path.length);
387
- //UpladFile方法在upload.js实现
388
- // UpladFile("http://localhost:/api/contract-management/upload/contract", fileBase64Str, filename, HttpResultCallBak);
389
- }
390
- }
391
-
392
-
393
- //从摄像头中识别二维码
394
- function RecogQrCodeFromCamera(type) {
395
- Cam_RecogQrBarCodeFromCamera(type)
396
- }
397
-
398
- //从图片文件中识别二维码
399
- function RecogBarCodeFromFile(type) {
400
- var imgpath = "D:\\123.jpg";
401
- Cam_RecogQrBarCodeFromFile(type, imgpath)
402
- }
355
+ /*********************
356
+ *** 设置去底色 ***
357
+ **********************/
358
+ function toSetDeleteBgColor() {
359
+ var obj = document.getElementById("Checkbox2");
360
+ if (obj.checked) {
361
+ Cam_SetDeleteBgColor(1);
362
+ } else {
363
+ Cam_SetDeleteBgColor(0);
364
+ }
365
+ }
403
366
 
367
+ /*********************
368
+ ****** 上传方法2 ******
369
+ **********************/
370
+
371
+ function HttpUploadFile() {
372
+ //fileBase64Str在拍照回调函数中赋值,用于测试上传方法2
373
+ if (fileBase64Str != "") {
374
+ var pos = file_path.lastIndexOf("\\");
375
+ var filename = file_path.substring(pos + 1, file_path.length);
376
+ //UpladFile方法在upload.js实现
377
+ // UpladFile("http://localhost:/api/contract-management/upload/contract", fileBase64Str, filename, HttpResultCallBak);
378
+ }
379
+ }
404
380
 
381
+ //从摄像头中识别二维码
382
+ function RecogQrCodeFromCamera(type) {
383
+ Cam_RecogQrBarCodeFromCamera(type);
384
+ }
405
385
 
386
+ //从图片文件中识别二维码
387
+ function RecogBarCodeFromFile(type) {
388
+ var imgpath = "D:\\123.jpg";
389
+ Cam_RecogQrBarCodeFromFile(type, imgpath);
390
+ }
406
391
 
407
- //添加要合并的PDF文件
408
- function ToAddPDFFile() {
409
- // Cam_AddImgFileToPDF("D:\\1.jpg");
410
- // sleep(100);
411
- // Cam_AddImgFileToPDF("D:\\2.jpg");
412
- // sleep(100);
413
- // Cam_AddImgFileToPDF("D:\\3.jpg");
414
- // sleep(100);
392
+ //添加要合并的PDF文件
393
+ function ToAddPDFFile() {
394
+ // Cam_AddImgFileToPDF("D:\\1.jpg");
395
+ // sleep(100);
396
+ // Cam_AddImgFileToPDF("D:\\2.jpg");
397
+ // sleep(100);
398
+ // Cam_AddImgFileToPDF("D:\\3.jpg");
399
+ // sleep(100);
415
400
 
416
- Cam_AddImgFileToPDF("");
417
- sleep(100);
418
- }
401
+ Cam_AddImgFileToPDF("");
402
+ sleep(100);
403
+ }
419
404
 
420
- /*---------------------------------------------------
405
+ /*---------------------------------------------------
421
406
  -------- 添加合并的PDF文件返回结果 ---------
422
407
  ----------------------------------------------------*/
423
- function AddImgFileToPDFResultCB(flag, base64Str) {
424
- if (flag == 0) {
425
- window.parent.postMessage({ message: "添加合并的PDF文件成功" }, '*')
426
- var obj = document.getElementById("CameraPhoto");
427
- obj.src = "data:;base64," + base64Str;
428
- }
429
- else {
430
- window.parent.postMessage({ error: "添加合并的PDF文件失败" }, '*')
408
+ function AddImgFileToPDFResultCB(flag, base64Str) {
409
+ if (flag == 0) {
410
+ window.parent.postMessage({ message: "添加合并的PDF文件成功", messageId: messageId }, "*");
411
+ var obj = document.getElementById("CameraPhoto");
412
+ obj.src = "data:;base64," + base64Str;
413
+ } else {
414
+ window.parent.postMessage({ error: "添加合并的PDF文件失败", messageId: messageId }, "*");
415
+ }
431
416
  }
432
- }
433
-
434
417
 
435
- //PDF合并测试
436
- function ToCombinePDF() {
437
- Cam_CombinePDF("D:\\test.pdf");
438
- //Cam_CombinePDF("");
439
- }
418
+ //PDF合并测试
419
+ function ToCombinePDF() {
420
+ Cam_CombinePDF("D:\\test.pdf");
421
+ //Cam_CombinePDF("");
422
+ }
440
423
 
441
- /*---------------------------------------------------
424
+ /*---------------------------------------------------
442
425
  -------- (必须重写该函数)合并PDF结果 ---------
443
426
  ----------------------------------------------------*/
444
- function PdfCombineResultCB(flag, PdfBase64Str) {
445
- if (flag == 0) {
446
- window.parent.postMessage({ message: "合并PDF完成" }, '*')
447
- console.log(PdfBase64Str);
448
- }
449
- else {
450
- window.parent.postMessage({ error: "合并PDF失败" }, '*')
427
+ function PdfCombineResultCB(flag, PdfBase64Str) {
428
+ if (flag == 0) {
429
+ window.parent.postMessage({ message: "合并PDF完成, messageId: messageId" }, "*");
430
+ console.log(PdfBase64Str);
431
+ } else {
432
+ window.parent.postMessage({ error: "合并PDF失败", messageId: messageId }, "*");
433
+ }
451
434
  }
452
- }
453
435
 
454
-
455
- //添加要合并的图像文件
456
- var MergeCount = 0;
457
- function ToAddMergeImageFile() {
458
- MergeCount++;
459
- if (MergeCount > 4) {
460
- window.parent.postMessage({ error: "提示:图像合并最多支持四页合并" }, '*')
461
- return;
436
+ //添加要合并的图像文件
437
+ var MergeCount = 0;
438
+ function ToAddMergeImageFile() {
439
+ MergeCount++;
440
+ if (MergeCount > 4) {
441
+ window.parent.postMessage(
442
+ { error: "提示:图像合并最多支持四页合并", messageId: messageId },
443
+ "*"
444
+ );
445
+ return;
446
+ }
447
+ Cam_AddMergeImageFile("");
448
+ sleep(100);
462
449
  }
463
- Cam_AddMergeImageFile("");
464
- sleep(100);
465
- }
466
450
 
467
- /*---------------------------------------------------
451
+ /*---------------------------------------------------
468
452
  -------- 添加合并图像文件返回结果 ---------
469
453
  ----------------------------------------------------*/
470
- function AddMergeImageFileResultCB(flag, base64Str) {
471
- if (flag == 0) {
472
- window.parent.postMessage({ message: "添加合并图像文件成功" }, '*')
473
- var obj = document.getElementById("CameraPhoto");
474
- obj.src = "data:;base64," + base64Str;
475
- }
476
- else {
477
- window.parent.postMessage({ error: "添加合并图像文件失败" }, '*')
454
+ function AddMergeImageFileResultCB(flag, base64Str) {
455
+ if (flag == 0) {
456
+ window.parent.postMessage({ message: "添加合并图像文件成功", messageId: messageId }, "*");
457
+ var obj = document.getElementById("CameraPhoto");
458
+ obj.src = "data:;base64," + base64Str;
459
+ } else {
460
+ window.parent.postMessage({ error: "添加合并图像文件失败", messageId: messageId }, "*");
461
+ }
478
462
  }
479
- }
480
463
 
464
+ //图像合并测试
465
+ function ToMergeImages() {
466
+ MergeCount = 0;
467
+ Cam_MergeImages("D:\\merge.jpg", 0);
468
+ }
481
469
 
482
- //图像合并测试
483
- function ToMergeImages() {
484
- MergeCount = 0;
485
- Cam_MergeImages("D:\\merge.jpg", 0);
486
- }
487
-
488
- /*---------------------------------------------------
470
+ /*---------------------------------------------------
489
471
  -------- (必须重写该函数)图像合并结果 ---------
490
472
  ----------------------------------------------------*/
491
- function MergeImagesResultCB(flag, base64Str) {
492
- if (flag == 0) {
493
- window.parent.postMessage({ message: "图像合并完成" }, '*')
494
- var obj = document.getElementById("CameraPhoto");
495
- obj.src = "data:;base64," + base64Str;
496
- }
497
- else {
498
- window.parent.postMessage({ error: "图像合并失败" }, '*')
473
+ function MergeImagesResultCB(flag, base64Str) {
474
+ if (flag == 0) {
475
+ window.parent.postMessage({ message: "图像合并完成" , messageId: messageId}, "*");
476
+ var obj = document.getElementById("CameraPhoto");
477
+ obj.src = "data:;base64," + base64Str;
478
+ } else {
479
+ window.parent.postMessage({ error: "图像合并失败", messageId: messageId }, "*");
480
+ }
499
481
  }
500
- }
501
-
502
-
503
482
 
504
-
505
- /*---------------------------------------------------
483
+ /*---------------------------------------------------
506
484
  -------(必须重写该函数)获取驱动盘符返回结果--------
507
485
  ----------------------------------------------------*/
508
- function GetDriveResultCB(driveStr) {
509
- if (driveStr == "") {
510
- window.parent.postMessage({ error: "获取盘符失败" }, '*')
511
- }
512
- else {
513
- window.parent.postMessage({ message: "获取盘符:" + driveStr }, '*')
514
- }
515
- }
516
-
517
-
518
- //设置水印
519
- function toSetWaterMarkParams() {
520
- var isAddMark;
521
- var isAddTime;
522
- var wTransp;
523
- var wPos;
524
- var wSize;
525
- var wColor;
526
- var szInfo;
527
- var obj = document.getElementById("Checkbox3");
528
- if (obj.checked)
529
- isAddMark = 1;
530
- else
531
- isAddMark = 0;
532
- obj = document.getElementById("Checkbox4");
533
- if (obj.checked)
534
- isAddTime = 1;
535
- else
536
- isAddTime = 0;
537
- szInfo = document.getElementById("Text1").value; //水印内容
538
- wTransp = parseInt(document.getElementById("Text2").value); //透明度
539
- wSize = parseInt(document.getElementById("Text3").value); //水印大小
540
- wPos = document.getElementById("Select1").selectedIndex; //水印位置
541
- wColor = document.getElementById("Select2").selectedIndex; //水印颜色
542
- SetWaterMark(isAddMark, 0, isAddTime, wTransp, wPos, wSize, wColor, szInfo); //生效水印设置
543
- }
544
-
545
-
546
-
547
- //删除文件
548
- function ToDeleteFile() {
549
- var path = "D:\\20220623140215.jpg";
550
- DeleteFile(path);
551
- }
552
-
553
- //删除文件返回结果
554
- function GetDeleteFileResultCB(flag) {
555
- if (flag == 0) {
556
- window.parent.postMessage({ message: "删除文件成功" }, '*')
557
- }
558
- else {
559
- window.parent.postMessage({ error: "删除文件失败!" }, '*')
560
- }
561
- }
562
-
563
-
564
- </script>
565
-
566
- <body onload="LoadCameraDocument()">
567
-
568
- <div style="width:602px; height: 400px; border: 1px solid white; background:#DEDEBE; font-size:14px; float:left;">
569
-
570
- <div id='Div1' style="width:600px; height: 300px">
571
- <div id='CameraCtl' style="width:600px; height: 300px; float:left"> </div>
572
- </div>
573
- <div style="visibility: hidden;" >
574
- 设备
575
- <select style="width:140px" id="DevName" onchange="SelectDevice()"></select>
576
- 分辨率
577
- <select style="width:140px" id="DevResolution" onchange="SelectResolution()"></select>
578
- <input type="button" value=" 打开设备 " onclick="toOpenCamera();" />
579
- <input type="button" id="closeDeviceButton" onclick="toCloseModal()" />
580
- <br />
486
+ function GetDriveResultCB(driveStr) {
487
+ if (driveStr == "") {
488
+ window.parent.postMessage({ error: "获取盘符失败", messageId: messageId }, "*");
489
+ } else {
490
+ window.parent.postMessage({ message: "获取盘符:" + driveStr , messageId: messageId}, "*");
491
+ }
492
+ }
581
493
 
582
- 裁切模式:
583
- <input id="Radio1" name="R1" type="radio" value="V1" onclick="SetCameraCutMode()" checked="checked" />不裁切
584
- <input id="Radio2" name="R1" type="radio" value="V2" onclick="SetCameraCutMode()" />手动裁切
585
- <input id="Radio3" name="R1" type="radio" value="V3" onclick="SetCameraCutMode()" />自动裁切
586
- <input id="Radio4" name="R1" type="radio" value="V4" onclick="SetCameraCutMode()" />自定义
494
+ //设置水印
495
+ function toSetWaterMarkParams() {
496
+ var isAddMark;
497
+ var isAddTime;
498
+ var wTransp;
499
+ var wPos;
500
+ var wSize;
501
+ var wColor;
502
+ var szInfo;
503
+ var obj = document.getElementById("Checkbox3");
504
+ if (obj.checked) isAddMark = 1;
505
+ else isAddMark = 0;
506
+ obj = document.getElementById("Checkbox4");
507
+ if (obj.checked) isAddTime = 1;
508
+ else isAddTime = 0;
509
+ szInfo = document.getElementById("Text1").value; //水印内容
510
+ wTransp = parseInt(document.getElementById("Text2").value); //透明度
511
+ wSize = parseInt(document.getElementById("Text3").value); //水印大小
512
+ wPos = document.getElementById("Select1").selectedIndex; //水印位置
513
+ wColor = document.getElementById("Select2").selectedIndex; //水印颜色
514
+ SetWaterMark(
515
+ isAddMark,
516
+ 0,
517
+ isAddTime,
518
+ wTransp,
519
+ wPos,
520
+ wSize,
521
+ wColor,
522
+ szInfo
523
+ ); //生效水印设置
524
+ }
525
+
526
+ //删除文件
527
+ function ToDeleteFile() {
528
+ var path = "D:\\20220623140215.jpg";
529
+ DeleteFile(path);
530
+ }
531
+
532
+ //删除文件返回结果
533
+ function GetDeleteFileResultCB(flag) {
534
+ if (flag == 0) {
535
+ window.parent.postMessage({ message: "删除文件成功", messageId: messageId }, "*");
536
+ } else {
537
+ window.parent.postMessage({ error: "删除文件失败!", messageId: messageId }, "*");
538
+ }
539
+ }
540
+ </script>
541
+
542
+ <body onload="LoadCameraDocument()">
543
+ <div
544
+ style="
545
+ width: 602px;
546
+ height: 400px;
547
+ border: 1px solid white;
548
+ background: #dedebe;
549
+ font-size: 14px;
550
+ float: left;
551
+ "
552
+ >
553
+ <div id="Div1" style="width: 600px; height: 300px">
554
+ <div
555
+ id="CameraCtl"
556
+ style="width: 600px; height: 300px; float: left"
557
+ ></div>
558
+ </div>
559
+ <div style="visibility: hidden">
560
+ 设备
561
+ <select
562
+ style="width: 140px"
563
+ id="DevName"
564
+ onchange="SelectDevice()"
565
+ ></select>
566
+ 分辨率
567
+ <select
568
+ style="width: 140px"
569
+ id="DevResolution"
570
+ onchange="SelectResolution()"
571
+ ></select>
572
+ <input type="button" value=" 打开设备 " onclick="toOpenCamera();" />
573
+ <input type="button" id="closeDeviceButton" onclick="toCloseModal()" />
574
+ <br />
575
+
576
+ 裁切模式:
577
+ <input
578
+ id="Radio1"
579
+ name="R1"
580
+ type="radio"
581
+ value="V1"
582
+ onclick="SetCameraCutMode()"
583
+ checked="checked"
584
+ />不裁切
585
+ <input
586
+ id="Radio2"
587
+ name="R1"
588
+ type="radio"
589
+ value="V2"
590
+ onclick="SetCameraCutMode()"
591
+ />手动裁切
592
+ <input
593
+ id="Radio3"
594
+ name="R1"
595
+ type="radio"
596
+ value="V3"
597
+ onclick="SetCameraCutMode()"
598
+ />自动裁切
599
+ <input
600
+ id="Radio4"
601
+ name="R1"
602
+ type="radio"
603
+ value="V4"
604
+ onclick="SetCameraCutMode()"
605
+ />自定义
606
+ <br />
607
+
608
+ 文件格式:
609
+ <select id="FileType" onchange="toSetFileType()">
610
+ <option value="0">jpg</option>
611
+ <option value="1">png</option>
612
+ <option value="2">tif</option>
613
+ <option value="3">pdf</option>
614
+ </select>
615
+
616
+ 色彩模式:
617
+ <select id="ColorMode" onchange="toSetColorModel()">
618
+ <option value="0">彩色</option>
619
+ <option value="1">灰度</option>
620
+ <option value="2">黑白</option>
621
+ </select>
622
+
623
+ 图像质量:
624
+ <select id="JpgQuality" onchange="toSetJpgQuality()">
625
+ <option value="0">10</option>
626
+ <option value="1">20</option>
627
+ <option value="2">30</option>
628
+ <option value="3">40</option>
629
+ <option value="4">50</option>
630
+ <option value="5" selected="true">60</option>
631
+ <option value="6">70</option>
632
+ <option value="7">80</option>
633
+ <option value="8">90</option>
634
+ <option value="9">100</option>
635
+ </select>
636
+
637
+ <input
638
+ id="Checkbox1"
639
+ type="checkbox"
640
+ onclick="toSetDeleteBlackEdge()"
641
+ />
642
+ 去黑边
643
+ <input id="Checkbox2" type="checkbox" onclick="toSetDeleteBgColor()" />
644
+ 去底色
645
+ </div>
587
646
  <br />
588
647
 
589
- 文件格式:
590
- <select id="FileType" onchange="toSetFileType()">
591
- <option value="0">jpg</option>
592
- <option value="1">png</option>
593
- <option value="2">tif</option>
594
- <option value="3">pdf</option>
595
- </select>
596
-
597
- 色彩模式:
598
- <select id="ColorMode" onchange="toSetColorModel()">
599
- <option value="0">彩色</option>
600
- <option value="1">灰度</option>
601
- <option value="2">黑白</option>
602
- </select>
603
-
604
- 图像质量:
605
- <select id="JpgQuality" onchange="toSetJpgQuality()">
606
- <option value="0">10</option>
607
- <option value="1">20</option>
608
- <option value="2">30</option>
609
- <option value="3">40</option>
610
- <option value="4">50</option>
611
- <option value="5" selected="true">60</option>
612
- <option value="6">70</option>
613
- <option value="7">80</option>
614
- <option value="8">90</option>
615
- <option value="9">100</option>
616
- </select>
617
-
618
- <input id="Checkbox1" type="checkbox" onclick="toSetDeleteBlackEdge()" /> 去黑边
619
- <input id="Checkbox2" type="checkbox" onclick="toSetDeleteBgColor()" /> 去底色
648
+ <div style="border: 1px dashed #000; visibility: hidden; height: 0">
649
+ <input id="Checkbox3" type="checkbox" /> 添加水印 水印内容<input
650
+ id="Text1"
651
+ type="text"
652
+ value="水印测试"
653
+ />
654
+ 透明度<input id="Text2" type="text" value="127" style="width: 40px" />
655
+ 大小<input id="Text3" type="text" value="80" style="width: 40px" />
656
+ <br />
657
+ 位置
658
+ <select id="Select1">
659
+ <option value="0">左上</option>
660
+ <option value="1">右上</option>
661
+ <option value="2">左下</option>
662
+ <option value="3">右下</option>
663
+ <option value="4">中间</option>
664
+ </select>
665
+ 颜色
666
+ <select id="Select2">
667
+ <option value="0">红色</option>
668
+ <option value="1">绿色</option>
669
+ <option value="2">蓝色</option>
670
+ <option value="3">青色</option>
671
+ <option value="4">黄色</option>
672
+ <option value="5">白色</option>
673
+ <option value="6">黑色</option>
674
+ </select>
675
+ <input id="Checkbox4" type="checkbox" /> 添加时间水印
676
+ <input
677
+ type="button"
678
+ value="生效水印参数设置"
679
+ onclick="toSetWaterMarkParams()"
680
+ />
681
+ </div>
620
682
 
621
- </div>
622
- <br />
623
-
624
- <div style="border:1px dashed #000;visibility: hidden;height:0;">
625
- <input id="Checkbox3" type="checkbox" /> 添加水印
626
- 水印内容<input id="Text1" type="text" value="水印测试" />
627
- 透明度<input id="Text2" type="text" value="127" style="width:40px" />
628
- 大小<input id="Text3" type="text" value="80" style="width:40px" /> <br />
629
- 位置
630
- <select id="Select1">
631
- <option value="0">左上</option>
632
- <option value="1">右上</option>
633
- <option value="2">左下</option>
634
- <option value="3">右下</option>
635
- <option value="4">中间</option>
636
- </select>
637
- 颜色
638
- <select id="Select2">
639
- <option value="0">红色</option>
640
- <option value="1">绿色</option>
641
- <option value="2">蓝色</option>
642
- <option value="3">青色</option>
643
- <option value="4">黄色</option>
644
- <option value="5">白色</option>
645
- <option value="6">黑色</option>
646
- </select>
647
- <input id="Checkbox4" type="checkbox" /> 添加时间水印
648
- <input type="button" value="生效水印参数设置" onclick="toSetWaterMarkParams()" />
649
- </div>
683
+ <br />
650
684
 
651
- <br />
652
-
653
- <div style="visibility: hidden;height:0;margin-bottom: 20px;" >
654
- <input type="button" value="获取盘符" onclick="GetDrives();" />
655
- <input type="button" value="放大" onclick="Cam_ZoomIn();" />
656
- <input type="button" value="缩小" onclick="Cam_ZoomOut();" />
657
- <input type="button" value="适屏" onclick="Cam_BestSize();" />
658
- <input type="button" value="1:1" onclick="Cam_TrueSize();" />
659
- <input type="button" value="左旋" onclick="Cam_RotateLeft();" />
660
- <input type="button" value="右旋" onclick="Cam_RotateRight();" />
661
- <input type="button" value="对焦" onclick="Cam_Focus();" />
662
- <input type="button" value="设置" onclick="Cam_ShowVideoProp();" />
663
- <input type="button" value="拍照" onclick="TakePhoto();" />
664
- <!-- <input type="button" value="读身份证" onclick="GetIdCardInfo();" /> -->
665
- <input type="button" value="从摄像头中识别二维码" onclick="RecogQrCodeFromCamera(1);" />
666
- <!-- <input type="button" value="从图片中识别二维码" onclick="RecogBarCodeFromFile(1);" /> -->
667
- <input type="button" value="添加合并PDF文件" onclick="ToAddPDFFile();" />
668
- <input type="button" value="合并PDF" onclick="ToCombinePDF();" />
669
- <!-- <input type="button" value="添加合并图像文件" onclick="ToAddMergeImageFile();" />
685
+ <div style="visibility: hidden; height: 0; margin-bottom: 20px">
686
+ <input type="button" value="获取盘符" onclick="GetDrives();" />
687
+ <input type="button" value="放大" onclick="Cam_ZoomIn();" />
688
+ <input type="button" value="缩小" onclick="Cam_ZoomOut();" />
689
+ <input type="button" value="适屏" onclick="Cam_BestSize();" />
690
+ <input type="button" value="1:1" onclick="Cam_TrueSize();" />
691
+ <input type="button" value="左旋" onclick="Cam_RotateLeft();" />
692
+ <input type="button" value="右旋" onclick="Cam_RotateRight();" />
693
+ <input type="button" value="对焦" onclick="Cam_Focus();" />
694
+ <input type="button" value="设置" onclick="Cam_ShowVideoProp();" />
695
+ <input type="button" value="拍照" onclick="TakePhoto();" />
696
+ <!-- <input type="button" value="读身份证" onclick="GetIdCardInfo();" /> -->
697
+ <input
698
+ type="button"
699
+ value="从摄像头中识别二维码"
700
+ onclick="RecogQrCodeFromCamera(1);"
701
+ />
702
+ <!-- <input type="button" value="从图片中识别二维码" onclick="RecogBarCodeFromFile(1);" /> -->
703
+ <input
704
+ type="button"
705
+ value="添加合并PDF文件"
706
+ onclick="ToAddPDFFile();"
707
+ />
708
+ <input type="button" value="合并PDF" onclick="ToCombinePDF();" />
709
+ <!-- <input type="button" value="添加合并图像文件" onclick="ToAddMergeImageFile();" />
670
710
  <input type="button" value="合并图像" onclick="ToMergeImages();" /> -->
671
- <!-- <input type="button" value="删除文件" onclick="ToDeleteFile();" /> -->
672
- <!-- <input type="button" value="上传" onclick="HttpUploadFile();" /> -->
711
+ <!-- <input type="button" value="删除文件" onclick="ToDeleteFile();" /> -->
712
+ <!-- <input type="button" value="上传" onclick="HttpUploadFile();" /> -->
713
+ </div>
714
+ <input
715
+ style="width: 100%; height: 30px"
716
+ type="button"
717
+ value="拍照"
718
+ onclick="TakePhoto();"
719
+ />
720
+
721
+ <div></div>
673
722
  </div>
674
- <input style="width: 100%;height: 30px;" type="button" value="拍照" onclick="TakePhoto();" />
675
-
676
- <div>
677
723
 
724
+ <div
725
+ style="
726
+ width: 202px;
727
+ border: 1px solid white;
728
+ background: #dedebe;
729
+ font-size: 14px;
730
+ float: left;
731
+ display: none;
732
+ "
733
+ >
734
+ 拍照图片
735
+ <br />
736
+ <img id="CameraPhoto" src="" style="width: 200px" />
678
737
  </div>
679
-
680
- </div>
681
-
682
-
683
- <div style="width:202px; border: 1px solid white; background:#DEDEBE; font-size:14px; float:left;display: none;">
684
- 拍照图片
685
- <br />
686
- <img id="CameraPhoto" src="" style="width: 200px;" />
687
- </div>
688
-
689
- </body>
690
-
691
-
692
-
693
-
694
- </html>
738
+ </body>
739
+ </html>