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

5 months ago
import axios from "axios";
2 weeks ago
/** 与 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("连接读卡器");
5 months ago
return axios({
2 weeks ago
url: "http://127.0.0.1:19196/OpenDevice",
method: "GET",
});
5 months ago
}
2 weeks ago
export function readIdCard(data) {
console.log("读身份证");
5 months ago
return axios({
2 weeks ago
url: "http://127.0.0.1:19196/readcard",
method: "GET",
});
5 months ago
}
2 weeks ago
export function closeDevice(data) {
console.log("关闭读卡器");
5 months ago
return axios({
2 weeks ago
url: "http://127.0.0.1:19196/CloseDevice",
method: "GET",
});
5 months ago
}