init

Signature.init()

功能说明

初始化电子签章配置项。默认配置为客户端读取硬件密钥盘模式

参数

参数名 类型 必填 说明
options Object 可配置属性参考:options属性。

options属性

属性名 类型 默认值 说明
documentid String 文档ID,必须设置
documentname String 文档名称,必须设置
moveable Boolean true 签章是否可以移动
signable Boolean true 是否含有数字签名功能
sealType String client可选【server/client】 设置印章读取来源
certType String client可选【server/client】 设置证书读取来源
clientUrl String http://127.0.0.1:9581 金格组件服务地址
serverUrl String sealType和certType设置为server需要设置H5签章云服务地址
clientConfig Object 设置客户端配置参数,参考“clientConfig属性说明”
imgtag Int 0 设置签章类型(0:无; 1:公章; 2:私章; 3:法人章; 4:法人签名; 5:手写签名)
delCallBack Object 删除签章回调函数
showSealsDlg Boolean true 是否显示选择签章界面
password String 签章密码设置(在不显示选择签章界面时,有效)
signdate Object { ischeck:true, fontFormat:‘yyyy-M-d‘’, fontFamily:‘宋体’, fontSize:12, fontColor:‘ #000000’, position:‘居中’} 设置日期在签章的位置和字体格式,详情请参照章节2.4日期设置
showNoPW Boolean false 设置选择签章对话框去掉密码输入显示
timestamp Boolean false 设置签章日期获取服务端日期
offsetX Int 印章X轴偏移量
offsetY Int 印章Y轴偏移量
batchSignature Object [{documentid: ‘KG20180307’, documentname: ‘测试文档KG20180307’},
{documentid: ‘KG20180308’, documentname: ‘测试文档KG20180308’}]
批量签章接口

clientConfig属性说明

属性名 类型 默认值 说明
SOFTTYPE String “1”,可选【0/1】 客户端类型:0:标准版;1:网络版/CA版/平台版

代码

Signature.init({
      documentid:´1234567890´,//设置文档ID
      documentname:´测试页面´//设置文档名称
})