You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
import axios from "axios";
|
|
|
|
/** 与 szbd-visitor-web 门岗 visitlist.vue 一致:中控在线身份证扫描服务 */
|
|
const ZK_SCAN_READ_IDCARD_URL =
|
|
"https://127.0.0.1:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1";
|
|
|
|
/**
|
|
* 调用本地中控服务读取身份证(返回体为含 IDNumber 的字符串,需解析出号码)
|
|
*/
|
|
export function scanReadIdCardInfo() {
|
|
return axios.get(ZK_SCAN_READ_IDCARD_URL, {
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
});
|
|
}
|
|
|
|
/** 兼容旧版:本地 19196 读卡服务(可选) */
|
|
export function openDevice(data) {
|
|
console.log("连接读卡器");
|
|
return axios({
|
|
url: "http://127.0.0.1:19196/OpenDevice",
|
|
method: "GET",
|
|
});
|
|
}
|
|
|
|
export function readIdCard(data) {
|
|
console.log("读身份证");
|
|
return axios({
|
|
url: "http://127.0.0.1:19196/readcard",
|
|
method: "GET",
|
|
});
|
|
}
|
|
|
|
export function closeDevice(data) {
|
|
console.log("关闭读卡器");
|
|
return axios({
|
|
url: "http://127.0.0.1:19196/CloseDevice",
|
|
method: "GET",
|
|
});
|
|
} |