1.1.7 • Published 4 years ago

vtm-hardware-equipment v1.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

VTM使用方法

    ├── readCard
    │  ├── index                               //身份证读取
    │  ├── http                                //Http通信相关类 
    ├── signName
    │  ├── index                               // 签字版
    ├── http.js                                // http,ajax请求通信
    ├── index.js                               //入口文件
    └── package.json                           //npm包描述文件
使用方式:

npm install vtm-hardware-equipment

import HARDWARE from '../vtm-hardware-equipment'

/*签字版****/

const signBoard = new HARDWARE.SIGN_NAME()

//初始化签字版 每个方法都需要请求方式和请求地址 signBoard.HWInitialize() 参数 params = { nPenwidth: 2, //笔宽值自定义设置,取值范围:0-4,取值类型:整数默认值:2 nOrgX: 0, //签名窗口弹出时显示在屏幕位置的X坐标值 nOrgY: 0, //签名窗口弹出时显示在屏幕位置的Y坐标值 //OrgX与OrgY不设置时,签名窗口弹出时,默认显示在屏幕正中间 width : 600, //签字区域宽度默认值 height: 400, //签字区域高度默认值 backcolor:'F0F6FF' //设置签字界面的背景色 }

//关闭设备 signBoard.HWFinalize()

//清除笔记 signBoard.HWClearPenSign()

//获取笔记 signBoard HWGetSign() 参数 params = { nImageType: 2, //生成签名图片的类型默认值:2 //BMP 1,JPG 2,PNG 3 nImageWidth: 600, //生成图片宽度默认值:600 nImageHeight:400 //生成图片高度默认值:400 }

/*身份证****/

const readCard = new HARDWARE.READ_CARD()

//开始读取身份证 readCard.ReadCard()

// 打印机 (用this的时候是在main.js通过原型放在里prototype里)

this.print.GetPrintDevices('GET','https://localhost:8081').then(res => { console.log('获取打印机>>>>>>>>>>',res) })

this.print.GetPrintDeviceStatus('GET','https://localhost:8081','USB001').then(res => { console.log('查询打印机状态>>>>>>>>>>',res) }).catch((error) => { console.log(error) }) this.print.GetConsumable('GET','https://localhost:8081','USB001').then(res => { console.log('查询打印机耗材剩余百分比>>>>>>>>>>',res) }).catch((error) => { console.log(error) }) // /如果检测缺纸状态,建议使用打印机状态的api/ this.print.GetMedia('GET','https://localhost:8081','USB001').then(res => { console.log('获取纸盒信息>>>>>>>>>>>>>>>>>>>>>>>>>>>>',res) }).catch((error) => { console.log(error) }) this.print.GetUsage('GET','https://localhost:8081','USB001').then(res => { console.log('获取打印机计数器内容>>>>>>>>>>>>>>>>>>>>>>>>>>>>',res) }).catch((error) => { console.log(error) })

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.0.1

4 years ago

1.1.2

4 years ago

1.0.0

4 years ago