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')


export const findSignInRecord = (params, config = {}) => http('/api/v0/user/findSignInRecord', params, 'GET')
export const signIn = (params, config = {}) => http('/api/v0/user/signIn')


export const getMerchantSelect = (params, config = {}) => http('/user/article/getMerchantSelect', params, 'POST')

export const articleAdd = (params, config = {}) => http('/user/article/add', params, 'POST')
// 文章编辑
export const articleUpdate = (params, config = {}) => http('/user/article/update', params,'POST')
// 文章详情
export const articleDetails = (params, config = {}) => http('/user/article/details', params,'GET')
// 删除文章
export const articleDelete = (params, config = {}) => http('/user/article/deleteBatchByIds', params,'POST')
// 获取用户新闻列表
export const getUserArticleList = (params, config = {}) => http('/user/article/getUserArticleList', params,'GET')


export const carAdd = (params, config = {}) => http('/user/car/add', params, 'POST')
export const carList = (params, config = {}) => http('/user/car/list', params, 'POST')
export const carDel = (params, config = {}) => http(`/user/car/deleteById?id=${params}`, params, 'DELETE')

export const shareMiniProgram = (params, config = {}) => http('/api/v0/user/fenxiangGetPoint', params,'POST')


// =========================
// 投资者平台
// =========================
// 商品列表
export const goodsList = (params, config = {}) => http('/user/goods/list', params, 'GET')
export const categoryList = (params, config = {}) => http('/user/goods/categoryList', params, 'GET')
export const shopInfo = (params, config = {}) => http('/user/goods/details', params, 'GET')
export const addGoodsOrders = (params, config = {}) => http('/api/invest/orders/submit', params)

export const orderPage = (params, config = {}) => http('/api/invest/orders/list', params, 'GET')
export const payAllinPay = (params, config = {}) => http('/api/v0/payment/order/pay/allinPay', params)
export const payMoney = (params, config = {}) => http('/api/v0/payment/order/pay/money', params)
export const handleSubmit = (params, config = {}) => http('/api/invest/orders/handleSubmit', params)
export const getDeviceInfo = (params, config = {}) => http('/invest/user/device/query/user/deviceInfo', params, 'GET')


export const addUsersAccountInfo = (params, config = {}) => http('/api/v0/extract/account/add', params)
export const getUsersAccountInfo = (params, config = {}) => http('/api/v0/extract/account/list', params, 'GET')

// 用户提现
export const pointsExtract = (params, config = {}) => http('/api/v0/extract/pointsExtract', params,'POST')
// 提现列表
export const extractList = (params, config = {}) => http('/api/v0/extract/list', params,'GET')
// 用户收益记录
export const extractRecordList = (params, config = {}) => http('/api/v0/extract/recordList', params,'GET')
// 配置列表
export const getAppConfig = (params, config = {}) => http('/api/v0/config/list', params,'GET')

export const loginByPassword = (params, config = {}) => http('/api/v0/invest/user/loginByPassword', params)
export const saveOpenIdByWxCode = (params, config = {}) => http('/api/v0/invest/user/saveOpenIdByWxCode', params)
export const registerApi = (params, config = {}) => http('/api/v0/invest/user/register', params)
export const findUserName = (params, config = {}) => http('/api/v0/invest/user/findUserName', params)
export const findPassword = (params, config = {}) => http('/api/v0/invest/user/findPassword', params)
export const smsCode = (params, config = {}) => http('/api/v0/invest/user/sendSmsCode', params)

export const userInfoIsInvest = (params, config = {}) => http('/api/v0/invest/user/info', params, 'GET')

export const rechargeAllinPay = (params, config = {}) => http('/api/v0/payment/money/recharge/allinPay', params)

export const investUserModify = (params, config = {}) => http('/api/v0/invest/user/modify', params, 'POST')
