Mobile端

>离线部署后,需要将js文件地址替换成自己的本地地址 http://dubbo.wellsign.cn/sdk/context/ws.mobile.plugin.min.js 替换成 http://ip地址+端口/sdk/context/ws.mobile.plugin.min.js demo如下,[点此下载](https://wellsign-public.oss-cn-hangzhou.aliyuncs.com/demo/%E7%AD%BE%E5%90%8D%E6%9D%BF%E6%8F%92%E4%BB%B6demo.zip) ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <title>wspaintingdemo</title> <script src="http://dubbo.wellsign.cn/sdk/context/ws.mobile.plugin.min.js"></script> </head> <body> <div>请在手机端调试,或者浏览器F12 开发者模式,开启手机调试模式</div> <button id="dom-id-btn" style="padding: 10px; width: 100%; background-color: #00a0ff; border: 0; border-radius: 6px; color: white">点我获取</button> <hr> <div id="dom-id-signSvg-container" style="border: 1px solid #00a0ff; height: 200px; width: 200px;"></div> <img id="dom-id-sign-img" style="border: 1px solid #00a0ff;float: left;height: 200px; width: 200px "/> </body> <script> window.onload = function () { var btn = window.document.getElementById('dom-id-btn'); btn.onclick = function () { // 实例化 var plugin = new WSMobilePlugin(); // 配置 var pluginOption = { // 设置返回签名svg数据的style属性,默认{ height: '100%', width: '100%' } svgStyle: { height: '200px', width: '200px' }, // 成功获取签字数据的回调 IE8不支持svg 所以 base64 是返回的图片 OnSuccess: function (svgStr,imgBase64) { window.document.getElementById('dom-id-signSvg-container').innerHTML = svgStr console.log(777,"fdsf") window.document.getElementById('dom-id-sign-img').setAttribute('src', imgBase64) }, // 发生错误的回调 OnError: function (err) { console.log(err) }, // 关闭的回调,包括超时 OnClose: function () { // console.log('关闭了') } }; // 初始化 plugin.Init(pluginOption); // 销毁 // plugin.Destroy() // end } } </script> </html> ```