import request from '@/utils/request'

// 订单统计信息
export function orderData(data) {
	return request({
		url: '/api/order/data',
		method: 'get',
		data
	});
}
// 实名认证
export function real_name(data) {
	return request({
		url: '/api/real_name',
		method: 'post',
		data
	});
}

// 获取用户信息
export function getUserInfo(data) {
	return request({
		url: '/api/user/userInfo',
		method: 'get',
		data
	});
}
// 个人中心页数据
export function getUser(data) {
	return request({
		url: '/api/user/userInfo',
		method: 'get',
		data
	});
}

// 用户分享图
export function spreadBanner(data) {
	return request({
		url: '/api/spread/banner',
		method: 'get',
		data
	});
}

// 获取地址列表
export function getAddressList(data) {
	return request({
		url: '/api/address/list',
		method: 'get',
		data
	});
}
// 修改地址
export function addressEdit(data) {
	return request({
		url: '/api/address/edit',
		method: 'post',
		data
	});
}
// 删除地址
export function addressDel(data) {
	return request({
		url: '/api/address/del',
		method: 'post',
		data
	});
}
// 设为默认地址
export function setAddressDefault(data) {
	return request({
		url: '/api/address/default/set',
		method: 'post',
		data
	});
}
// 购物车列表
export function getCartList(data) {
	return request({
		url: '/api/cart/list',
		method: 'get',
		data
	});
}

// 修改购物车数量
export function getCartNum(data) {
	return request({
		url: '/api/cart/num',
		method: 'post',
		data
	});
}
//删除购物车
export function cartDel(data) {
	return request({
		url: '/api/cart/del',
		method: 'post',
		data
	});
}
//获取收藏夹列表
export function getcollectList(data) {
	return request({
		url: '/api/collect/user',
		method: 'get',
		data
	});
}
// 取消收藏
export function delcollect(data) {
	return request({
		url: '/api/collect/del',
		method: 'post',
		data
	});
}
// 获取我的团队
export function spreadPeople(data) {
	return request({
		url: '/api/spread/people',
		method: 'post',
		data
	});
}
// 获取我的所有车辆包含被授权车辆
export function mycar(data) {
	return request({
		url: '/api/car/mycar',
		method: 'get',
		data
	});
}
// 获取我的车辆
export function carList(data) {
	return request({
		url: '/api/car/lst',
		method: 'get',
		data
	});
}
// 获取授权车辆
export function get_touid_car(data) {
	return request({
		url: '/api/car/get_touid_car',
		method: 'post',
		data
	});
}
// 获取车辆详情
export function getCarInfo(data) {
	return request({
		url: '/api/car/info',
		method: 'get',
		data
	});
}
// 获取车辆行程记录列表
export function car_record(data) {
	return request({
		url: '/api/car/car_record',
		method: 'post',
		data
	});
}
// 获取车辆行程记录详细
export function record_info(data) {
	return request({
		url: '/api/car/record_info',
		method: 'get',
		data
	});
}
// 车锁开关
export function car_switch(data) {
	return request({
		url: '/api/car/car_switch',
		method: 'post',
		data
	});
}

// 车辆授权
export function add_auth_car(data) {
	return request({
		url: '/api/car/add_auth_car',
		method: 'post',
		data
	});
}
// 删除授权
export function del_auth_car(data) {
	return request({
		url: '/api/car/del_auth_car',
		method: 'post',
		data
	});
}

// 车辆授权列表
export function get_auth(data) {
	return request({
		url: '/api/car/get_auth',
		method: 'post',
		data
	});
}

// 车辆报修
export function create_question(data) {
	return request({
		url: '/api/car/create_question',
		method: 'post',
		data
	});
}

// 车辆报修详情
export function question_info(data) {
	return request({
		url: '/api/car/question_info',
		method: 'post',
		data
	});
}

// 车辆报修历史
export function question(data) {
	return request({
		url: '/api/car/question',
		method: 'post',
		data
	});
}
// 车辆报修评价
export function question_score(data) {
	return request({
		url: '/api/car/question_score',
		method: 'post',
		data
	});
}

// 撤销报修
export function cancel_question(data) {
	return request({
		url: '/api/car/cancel_question',
		method: 'get',
		data
	});
}

// 提前还款
export function prepayment(data) {
	return request({
		url: '/api/car/prepayment',
		method: 'post',
		data
	});
}


// 提前还款
export function getcar_status(data) {
	return request({
		url: '/api/car/getcar_status',
		method: 'get',
		data
	});
}

//获取分享海报
export function getWxmpInviteQrcode(data) {
	return request({
		url: '/api/user/getWxmpInviteQrcode',
		method: 'post',
		data
	});
}

//获取下级
export function getChildList(data) {
	return request({
		url: '/api/user/getChildList',
		method: 'post',
		data
	});
}

export function getInviterRanking(data) {
	return request({
		url: '/api/user/getInviterRanking',
		method: 'post',
		data
	});
}