import {
	http
} from '@/request/index.js'

// 登录
export const loginApi = (params, config = {}) => http('/api/v0/login/loginByWx', params)
export const loginCodeApi = (params, config = {}) => http('/api/v0/login/loginByWxCode', params)
export const loginByZfbCode = (params, config = {}) => http('/api/v0/login/loginByZfbCode', params)


// 首页
// 获取附近站点
export const aroundAreaApi = (params, config = {}) => http('/api/v0/stations/aroundArea', params, 'GET')
export const infoAroundApi = (params, config = {}) => http('/api/v0/stations/info', params, 'GET')
export const listByStationId = (params, config = {}) => http('/api/v0/device/gun/listByStationId', params, 'GET')

// 开始充电
export const startCharging = (params, config = {}) => http('/api/v0/orders/startCharging', params)
//获取电枪详情
export const gunInfo = (params, config = {}) => http('/api/v0/device/gun/info', params, 'GET')

//用户信息
export const userInfo = (params, config = {}) => http('/api/v0/user/info', params, 'GET')


//订单
export const ordersList = (params, config = {}) => http('/api/v0/orders/list', params, 'GET')


// 开始充电-钱包
export const startChargingByWallet = (params, config = {}) => http('/api/v0/orders/startChargingByWallet', params)
// 开始充电-电卡
export const startChargingByCard = (params, config = {}) => http('/api/v0/orders/startChargingByCard', params)
// 开始充电-预付款-上海汇付
export const startChargingByAdaPay = (params, config = {}) => http('/api/v0/orders/startChargingByAdaPay', params)



// 结束停止充电
export const stopCharging = (params, config = {}) => http('/api/v0/orders/stopCharging', params)
// 轮播图
export const bannerList = (params, config = {}) => http('/api/v0/banner/list', params, 'GET')
// 修改用户昵称
export const updateNickName = (params, config = {}) => http('/api/v0/user/updateNickName', params)
// 修改用户头像
export const updateAvatar = (params, config = {}) => http('/api/v0/user/updateAvatar', params)
// 获取OSS
export const getOssUploadParams = (params, config = {}) => http('/api/v0/user/getOssUploadParams', params, 'GET')
// 实时充电详情
export const realtimeInfo = (params, config = {}) => http('/api/v0/orders/realtimeInfo', params, 'GET')
// 钱包记录
export const walletRecord = (params, config = {}) => http('/api/v0/wallet/record', params, 'GET')

export const userCardList = (params, config = {}) => http('/api/v0/card/userCardList', params, 'GET')
export const userCardRecord = (params, config = {}) => http('/api/v0/card/userCardRecord', params, 'GET')

// 充值
export const jqbPay = (params, config = {}) => http('/api/v0/wallet/charge/jqbPay', params)
// 汇付
export const adaPay = (params, config = {}) => http('/api/v0/wallet/charge/adaPay', params)




// 地图获取附近站点
export const aroundAreaMap = (params, config = {}) => http('/api/v0/stations/aroundAreaMap', params, 'GET')


// 协议详情获取
export const selectProtocolInfo = (params, config = {}) => http('/api/v0/protocol/info', params, 'GET')
//发票列表
export const invoiceList = (params, config = {}) => http('/api/v0/invoice/list', params, 'GET')
// 可开发票列表
export const orderList = (params, config = {}) => http('/api/v0/invoice/orderList', params, 'GET')
// 申请开具发票列表
export const preApply = (params, config = {}) => http('/api/v0/invoice/preApply', params)
// 申请开具发票请求
export const apply = (params, config = {}) => http('/api/v0/invoice/apply', params)
// 查询可用电卡
export const userCardUsableList = (params, config = {}) => http('/api/v0/card/userCardUsableList', params, 'GET')
// 退款
export const refund = (params, config = {}) => http('/api/v0/wallet/refund', params)
// 订单详情
export const ordersInfo = (params, config = {}) => http('/api/v0/orders/info', params,'GET')



