Mobile端

>离线部署后,需要将js文件地址替换成自己的本地地址 https://dubbo.wellsign.cn/sdk/context/ws.mobile.write.js 替换成 http://ip地址+端口/sdk/context/ws.mobile.write.js demo如下,[点此下载](https://wellsign-public.oss-cn-hangzhou.aliyuncs.com/demo/%E5%85%A8%E6%96%87%E7%AD%BE%E6%89%B9%E6%8F%92%E4%BB%B6demo.zip) ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="Expires" content="0"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-control" content="no-cache"> <meta http-equiv="Cache" content="no-cache"> <meta name="renderer" content="webkit"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta name="viewport" content="width=device-width" /> <style> html, body { padding: 0; margin: 0; width: 100%; height: 100%; } table,table tr th, table tr td { border:1px solid #888888; } button { height: 30px; padding: 4px 10px; border: 1px solid #00a0ff; background-color: #ffffff; border-radius: 4px; color: #00a0ff; } </style> <title>:)</title> <script src="https://dubbo.wellsign.cn/sdk/context/ws.mobile.write.js" crossorigin="anonymous"></script> <!-- 测试自己服务器需修改成自己的js文件地址 --> </head> <body> <div style="height: 10px;"></div> <!-- --> 1.<button onclick="EnterSign1()">施工单位签字</button> 2.<button onclick="SaveSign1()">保存</button> 3.<button onclick="LoadAllSign()">加载所有签字签字</button> 4.<button onclick="EnterSign2()">建设单位签字</button> 5.<button onclick="SaveSign2()">保存</button> 6.<button onclick="LoadAllSign()">加载所有签字签字</button> <hr> 1.<button onclick="SearchSign1()">查询施工单位签字信息</button> 2.<button onclick="SearchSign2()">查询建设单位签字信息</button> 3.<button onclick="LoadSign1()">加载施工单位签字</button> 4.<button onclick="LoadSign2()">加载建设单位签字</button> <!-- --> <div id="ctx_wrap" style="width: 600px; height: 800px; margin: 0 auto;"> <!-- 可以在此处自定义表单内容 --> <!-- 建议内容保持宽高比和缩放比 --> <div style="width: 100%; height: 100%; box-shadow: 0 0 4px 0 #e8e8e8; border: 1px solid #e8e8e8;"> <div style="text-align: center; font-size: 18px; color: rgb(33, 33, 33); padding: 30px 0 14px;">工程验收单</div> <div style="font-size: 14px; color: rgb(33, 33, 33); padding: 0px 40px 4px;">工程名称</div> <table style="width: calc(100% - 80px); margin: 0px 40px; box-sizing: border-box; font-size: 12px; border-collapse: collapse; line-height: 30px;"> <tbody> <tr> <td>建设单位:屯昌宏基伟业地产发展有限公司</td> <td>工程名称:氧立方17#楼智能化工程</td> </tr> <tr> <td>甲方:屯昌宏基伟业地产发展有限公司</td> <td rowspan="2">工程地点:屯昌县</td> </tr> <tr> <td>乙方:海南金光阳科技有限公司</td> </tr> <tr> <td>验收地点:氧立方小区17#楼</td> <td>验收日期:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;年&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;日</td> </tr> <tr> <td colspan="2"> <div>验收项目:氧立方17#楼智能化工程</div> <div>(监控62台、背景音乐、楼宇对讲光纤到户)</div> <div style="height: 60px;"></div> <div style="text-align: right; margin-right: 80px;">日期:</div> </td> </tr> <tr> <td colspan="2"> <div>施工单位(盖章)签字:</div> <div style="height: 60px;"></div> <div style="text-align: right; margin-right: 80px;">日期:</div> </td> </tr> <tr> <td colspan="2"> <div>建设单位(盖章)签字:</div> <div style="height: 60px;"></div> <div style="text-align: right; margin-right: 80px;">日期:</div> </td> </tr> <tr> <td colspan="2"> <div>物业单位(盖章)签字:</div> <div style="height: 60px;"></div> <div style="text-align: right; margin-right: 80px;">日期:</div> </td> </tr> </tbody> </table> </div> <!-- end --> </div> <script> var _ctx = null var _seqId = 'xxxr' // 表单签字ID,可以用来获取签字数据、加载签字数据。 var _buildNo1 = null // 表单签字下某次签字的版本号。可以用来指定渲染某版本签字数据、获取指定某版本的签字数据 var _buileNo2 = null // 初始化签字容器 function InitWrap () { _ctx = new WSMobileWriteContext() _ctx.InitFullFormSign({ el: '#ctx_wrap', sequenceId: _seqId }) } // 开启施工单位签字 function EnterSign1 () { _ctx.StartFullFormSign() } // 保存施工单位签字 function SaveSign1 () { // 提交本次签字数据,会在异步方法中将 表单签字ID和版本号回调给开发者 _ctx.CommitSignData(function (sequenceId, buildNo) { _seqId = sequenceId _buildNo1 = buildNo alert('保存成功' + _seqId + '-' + _buildNo1) _ctx.EnterSignMode() // 不传参数会清空所有圈批数据 }) } // 加载所有圈批数据 function LoadAllSign () { _ctx.EnterSignMode(_seqId) // 不传参数会清空所有圈批数据 } // 开启建设单位签字 function EnterSign2 () { _ctx.StartFullFormSign() } // 保存建设单位签字 function SaveSign2 () { // 提交本次签字数据,会在异步方法中将 表单签字ID和版本号回调给开发者 _ctx.CommitSignData(function (sequenceId, buildNo) { _seqId = sequenceId _buileNo2 = buildNo alert('保存成功' + _seqId + '-' + _buileNo2) _ctx.EnterSignMode() // 不传参数会清空所有圈批数据 }) } // 查询施工单位签字信息 function SearchSign1 () { _ctx.GetSignData(_seqId, _buildNo1, function (svgStr) { alert(svgStr) }) } // 查询建设单位签字信息 function SearchSign2 () { _ctx.GetSignData(_seqId, _buileNo2, function (svgStr) { alert(svgStr) }) } // 加载施工单位签字 function LoadSign1 () { _ctx.EnterSignMode(_seqId, _buildNo1) // 不传参数会清空所有圈批数据 } // 加载建设单位签字 function LoadSign2 () { _ctx.EnterSignMode(_seqId, _buileNo2) // 不传参数会清空所有圈批数据 } // 页面加载完成就去初始化签字容器 window.onload = InitWrap() </script> </body> </html> ```