import request from '../utils/request'

export function getRegisteredCards() {
    return request({
        url: '/electronicHealthCard/getRegisteredCards',
        method: 'get',
    })
}

export function linkHealthCard(healthCode) {
    return request({
        url: '/electronicHealthCard/linkHealthCard',
        method: 'get',
        params: { healthCode },
    })
}

export function register(data) {
    return request({
        url: '/electronicHealthCard/register',
        method: 'post',
        data,
    })
}

export function analyseIdCard(data) {
    return request({
        url: '/electronicHealthCard/analyseIdCard',
        method: 'post',
        data,
    })
}

export function getOrderIdByOutAppId(qrCodeText) {
    return request({
        url: '/electronicHealthCard/getOrderIdByOutAppId',
        method: 'get',
        params: { qrCodeText },
    })
}

export function getEncryptOpenid() {
    return request({
        url: '/electronicHealthCard/getEncryptOpenid',
        method: 'get',
    })
}
