身份认证
Showing
3 changed files
with
25 additions
and
4 deletions
staticJs/jquery.webcam.min.js
0 → 100644
This diff is collapsed.
Click to expand it.
| 1 | $(function () { | 1 | $(function () { |
| 2 | layui.use('element', function () { | 2 | layui.use('element', function () { |
| 3 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 | 3 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 |
| 4 | //监听导航点击 | ||
| 5 | element.on('nav(demo)', function (elem) { | ||
| 6 | layer.msg(elem.text()); | ||
| 7 | }); | ||
| 8 | }); | 4 | }); |
| 9 | addTabs('#wssq') | 5 | addTabs('#wssq') |
| 10 | // 业务 | 6 | // 业务 |
| ... | @@ -56,4 +52,23 @@ $(function () { | ... | @@ -56,4 +52,23 @@ $(function () { |
| 56 | element.init(); | 52 | element.init(); |
| 57 | }); | 53 | }); |
| 58 | }); | 54 | }); |
| 55 | |||
| 56 | |||
| 57 | // //// | ||
| 58 | Webcam.set({ | ||
| 59 | width: 320, | ||
| 60 | height: 240, | ||
| 61 | image_format: 'jpeg', | ||
| 62 | jpeg_quality: 90 | ||
| 63 | }); | ||
| 64 | Webcam.attach( '#my_camera' ); | ||
| 65 | function take_snapshot() { | ||
| 66 | // take snapshot and get image data | ||
| 67 | Webcam.snap( function(data_uri) { | ||
| 68 | // display results in page | ||
| 69 | document.getElementById('results').innerHTML = | ||
| 70 | '<h2>Here is your image:</h2>' + | ||
| 71 | '<img src="'+data_uri+'"/>'; | ||
| 72 | } ); | ||
| 73 | } | ||
| 59 | }) | 74 | }) | ... | ... |
| ... | @@ -37,6 +37,10 @@ | ... | @@ -37,6 +37,10 @@ |
| 37 | </div> | 37 | </div> |
| 38 | <div class="video_authentication"> | 38 | <div class="video_authentication"> |
| 39 | 视频认证 | 39 | 视频认证 |
| 40 | <div id="my_camera"></div> | ||
| 41 | <form> | ||
| 42 | <input type=button value="Take Snapshot" onClick="take_snapshot()"> | ||
| 43 | </form> | ||
| 40 | </div> | 44 | </div> |
| 41 | </div> | 45 | </div> |
| 42 | <div class="next_button"> | 46 | <div class="next_button"> |
| ... | @@ -48,6 +52,7 @@ | ... | @@ -48,6 +52,7 @@ |
| 48 | </body> | 52 | </body> |
| 49 | <script type="text/javascript" src="../staticJs/common.js"></script> | 53 | <script type="text/javascript" src="../staticJs/common.js"></script> |
| 50 | <script type="text/javascript" src="../staticJs/down.js"></script> | 54 | <script type="text/javascript" src="../staticJs/down.js"></script> |
| 55 | <script type="text/javascript" src="../staticJs/jquery.webcam.min.js"></script> | ||
| 51 | <script type="text/javascript" src="../staticJs/sfrz.js"></script> | 56 | <script type="text/javascript" src="../staticJs/sfrz.js"></script> |
| 52 | <script id="progress" type="text/html"> | 57 | <script id="progress" type="text/html"> |
| 53 | {{# layui.each(d.progressList, function(index, item){ }} | 58 | {{# layui.each(d.progressList, function(index, item){ }} |
| ... | @@ -84,4 +89,5 @@ | ... | @@ -84,4 +89,5 @@ |
| 84 | {{# } }} | 89 | {{# } }} |
| 85 | {{# }); }} | 90 | {{# }); }} |
| 86 | </script> | 91 | </script> |
| 92 | |||
| 87 | </html> | 93 | </html> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment