🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
~~~ 加载插件代码后,handSign.showSignPage()可以唤醒签字版,签完字后可以获取笔迹数据; 这个功能只能在手机浏览器才能正常运行;PC浏览器不能使用; ~~~ | options参数 | 说明 | | --- | --- | | width | 表单页面的宽度 | | height | 表单页面的高度 | | fixed |{x:0.1,y:0.1}; 笔迹固话到文件后,在页面的位置 , x为占表单宽度的比值,y为占表单高度的比值 | | signCallback | 签字点确定后的回调,具体见下方 | | signCallback参数 | 说明 | | --- | --- | | bethelNote | 第一个参数,获取笔迹的数据 | | base64Image | 第二个参数,获取笔迹图片的base64数据 | [获取笔迹数据和笔迹图片demo](https://www.dandanqian.com/guotai/write/signdemo.html) 示例代码 ~~~ <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <meta name="keywords" content=""> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="x5-orientation" content="portrait"> <meta name="x5-fullscreen" content="true"> <meta name="full-screen" content="yes"> <meta name="format-detection" content="telephone=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta content="black" name="apple-mobile-web-app-status-bar-style"> <link href="../css/handSign.css?v=06121637" rel="stylesheet"> <script src="//pub.wellsign.cn/javascript/jquery.min.js"></script> <script src="//pub.wellsign.cn/javascript/vue/vue.js"></script> <script src="../js/readingv4_min.js"></script> <script src="../js/handSign-min.js"></script> </head> <body> <div id="WSSignPage"></div> <div> <input type="button" value="点击签名" onclick="handSign.showSignPage()" /> </div> <div> 签名处: </div> <img width="100" height="100" id='img' src=""/> </body> <script> var options = { width: 850, height: 792, fixed: { x: 0.5, y: 0.5 }, signCallback: function(bethelNote, base64Image) { console.log(bethelNote); var img = new Image(); $('#img').attr('src', base64Image); }, } var handSign = new handSign(options); </script> </html> ~~~