import axios from '@/libs/api.request'

const upRandom = () => {
  return parseInt(Math.random() * 10000)
}
/**
 * 认证易身份证读卡数据
 * @returns {*|Promise|Promise<any>}
 */
export const idcard = () => {
  return axios.request({
    url: 'http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&common=1',
    params: { random: upRandom() },
    method: 'get',
    php: true
  })
}
/**
 * 捷宇科技身份证读取
 * @returns {*|Promise|Promise<any>}
 */
export const idcard2 = () => {
  return axios.request({
    url: 'http://127.0.0.1:17878/ReadCard',
    method: 'get',
    php: true
  })
}
