import axios from 'axios'
import config from '../apiConfig'
import url from '../baseUrl'
let baseUrl = url.baseUrl




//按订单号查询背调信息
const $axiosResearch = params => axios.get('/examine/selectByOrderNo', { params })


//图片上传 POST /storage/addFile
const $axiosFileUpload = params => axios.post('/storage/addFile', params)
// 新增背调信息 POST /examine/insertNewServantExmaine
const $axiosAddResearch = params => axios.post('/examine/insertNewServantExmaine',  params )

// 更新背调信息 POST /examine/updateBackExamine
const $axiosUpdateResearch = params => axios.post( '/examine/updateBackExamine', { params })





// 登陆/auth/chargelogin
const $axioslogin = params => axios.post('/auth/chargelogin', params, config)
// 发送验证码GET /send/chargesendmessage
const $axiosSendMessage = params => axios.get('/send/chargesendmessage', { params })
// 保险查询
const $axiosInsurance = params => axios.post('/insurance/selectBpInsuranceByOrderNo', params )
// 投保 POST /insure/qjbPayInsuranceApply
const $axiosAddBpCustomer = params => axios.post('/insure/qjbPayInsuranceApply', params )
//预览合同/contract/previewFile
const $axiosContractPreview = params => axios.post('/contract/previewFile', params )
//生成合同 POST /contract/createContract
const $axiosCreateContract = params => axios.post('/contract/createContract', params )
//按订单号查询合同GET /contract/selectContractByOrderNo
const $axiosSelectContractByOrderNo = params => axios.get('/contract/selectContractByOrderNo', { params })
//去实名认证 GET /contract/goVerify
const $axiosGoVerify = params => axios.get('/contract/goVerify', { params })
//是否实名认证 GET  contract/verify
const $axiosVerify = params => axios.get('contract/verify', { params })

//插入日志 POST /visitlog/insertAccessLog
const $axiosInsertAccessLog = params => axios.post('/visitlog/insertAccessLog', params )

// 查询是否已签署合同

//根据手机查询订单
const $axiosGetOrderByPhone = params => axios.get('telecomCard/getOrderByPhone', { params })
//下单接口
const $axiosSaveOrder = params => axios.post('telecomCard/saveOrder',  params )
//宽带信息收集
const $axiossaveKdOrder = params => axios.post('telecomCard/saveKdOrder',  params )
//选择手机号接口
const $axiosSelectNumber = params => axios.get('telecomCard/selectNumber', { params })
export default {
    $axiosSendMessage,
    $axioslogin,
    $axiosInsurance,
    $axiosResearch,
    $axiosFileUpload,
    $axiosAddResearch,
    $axiosUpdateResearch,
    $axiosAddBpCustomer,
    $axiosContractPreview,
    $axiosCreateContract,
    $axiosSelectContractByOrderNo,
    $axiosGoVerify,
    $axiosVerify,
    $axiosInsertAccessLog,
    $axiosGetOrderByPhone,
    $axiosSaveOrder,
    $axiosSelectNumber,
    $axiossaveKdOrder
}
