// 存放接口处
import http from './request.js';

// 获取用户信息
export const getUserInfo = () => http.request({
	method: "GET",
	url: '/user/get_info',
});

// 删除地址
export const delAddress = (data) => http.request({
	method: "POST",
	url: '/user/address_del',
	data
});

// 修改地址
export const editAddress = (data) => http.request({
	method: "POST",
	url: '/user/address_edit',
	data
});

// 添加地址
export const addAddress = (data) => http.request({
	method: "POST",
	url: '/user/address_add',
	data
});

// 收货地址列表
export const getAddressList = (data) => http.request({
	method: "GET",
	url: '/user/address_list',
	data
});


// 下单记录
export const getOrderList = (data) => http.request({
	method: "GET",
	url: '/order/list',
	data
})

// 订单详情
export const getOrderDetails = (data) => http.request({
	method: "GET",
	url: '/order/info',
	data
})

// 订单数量
export const getOrderNum = (data) => http.request({
	method: "GET",
	url: '/order/count',
	data
})

// 查询优惠券
export const getCouponList = (data) => http.request({
	method: "GET",
	url: '/coupon/list',
	data
})

// 重新支付
export const cancelPayment = (data) => http.request({
	method: "GET",
	url: '/order/close',
	data
})

// 重新支付
export const rePayment = (data) => http.request({
	method: "GET",
	url: '/order/pays',
	data
})

// 看守所列表
export const getJailListApi = (params) => http.request({
	method: "GET",
	url: '/index/city',
	params,
})

// 看守所详情
export const getAddrDetails = (params) => http.request({
	method: "GET",
	url: '/index/city_info',
	params,
})

// 看守所详情
export const onLogout = (params) => http.request({
	method: "POST",
	url: '/user/logout',
	params,
})

// 充值列表
export const getPayList = (params) => http.request({
	method: "POST",
	url: '/pay/list',
	params,
})

// 检查是否支付成功
export const checkPayStatus = (params) => http.request({
	method: "GET",
	url: '/pay/check',
	params,
})

// 下单
export const onPayment = (params) => http.request({
	method: "POST",
	url: '/pay/pay',
	params,
})