 /*
  * 手太欠
  * 愿这世界都如故事里一样 美好而动人~
*/

import { req, upload } from "../request"

// 上传身份证
const updIdcard = (path, data) => upload({
    key : "upload",
    url : "user/certification/upload",
    path,
    data
})

// 提交身份信息
const ocr = data => {

    console.log(data)

    return req({
        url     : "user/certification",
        data,
        method  : "POST"
    })
}

// 获取认证信息
const getInfo = () => req({
    url     : "user/certification",
})

// 获取认证地址
const signUrl = data => req({
    url     : "user/certification/go_real",
    data
})

// 获取签约地址
const pactUrl = () => req({
    url     : "user/certification/go_contract"
})

export default ({
    updIdcard,
    ocr,
    getInfo,
    signUrl,
    pactUrl
})