import request from '../utils/request.js';
import requestWhite from '../utils/requestWhite.js';
import Qs from 'qs';

export function logout(data) {
	 
	return request({
		method: 'get',
		url: '/mobile/regUser/logout'
	})
}

export function updatePersonInformation (data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/regUser/updatePersonInformation'
	})
}

export function regUserCarList () {
	 
	return request({
		method: 'get',
		url: '/mobile/regUser/regUserCarList'
	})
}

export function addRegUserCar (data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/regUser/addRegUserCar'
	})
}


export function exchangeDetail (data) {
	 
	return request({
		method: 'get',
		data:data ,
		url: '/mobile/chargingCouponApi/exchangeDetail'
	})
}

export function exchangeGroupDetail (data) {
	 var data={
		 group:data
	 }
	 // if (process.env.NODE_ENV === "development"&&process.car.BASE_URL=='https://charging.xiaoxinda.com/charging-station-test/') {
		//   data.jumpFive=1
	 // }
	 if (process.car.BASE_URL=='https://charging.xiaoxinda.com/charging-station-test/') {
	 		  data.jumpFive=1
	 }
	return request({
		method: 'post',
		//header:{'Content-Type':'text/plain'},
			data:data,
		url: '/mobile/chargingCouponApi/exchangeGroupDetail'
	})
}


export function exchangeGroupDetail2 (data) {
	 var data={
		 group:data
	 }
	 // if (process.env.NODE_ENV === "development"&&process.car.BASE_URL=='https://charging.xiaoxinda.com/charging-station-test/') {
		//   data.jumpFive=1
	 // }
	
	return request({
		method: 'post',
		//header:{'Content-Type':'text/plain'},
			data:data,
		url: '/mobile/chargingCouponApi/exchangeGroupDetail'
	})
}
export function deleteRegUserCar (data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/regUser/deleteRegUserCar'
	})
}

export function helpList (data) {
	 
	return requestWhite({
		method: 'post',
		data:data ,
		url: '/mobile/roleSharing/helpList'
	})
}

export function carPersonAccount (data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/regUser/carPersonAccount'
	})
}

export function deleteUser (data) {
	 
	return request({
		method: 'get',
		data:data ,
		url: '/mobile/regUser/deleteUser'
	})
}

export function changePhone  (data) {
	 
	return request({
		method: 'get',
		data:data ,
		url: '/mobile/regUser/changePhone'
	})
}

export function feedback  (data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/feedback/submit'
	})
}

export function couponList(data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/chargingCouponApi/couponList'
	})
}

export function couponDetail(data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/chargingCouponApi/couponDetail'
	})
}

export function exchange(data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/chargingCouponApi/exchange'
	})
}

export function exchangeByGroupFive(data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/chargingCouponApi/exchangeByGroupFive'
	})
}


export function perfectPersonInformation(data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/regUser/perfectPersonInformation'
	})
}


export function giveCouponDetail(data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/chargingCouponApi/giveCouponDetail'
	})
}

export function receiveGiveCoupon(data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/chargingCouponApi/receiveGiveCoupon'
	})
}

export function changeBirthday(data) {
	 
	return request({
		method: 'get',
		data:data ,
		url: '/mobile/regUser/changeBirthday'
	})
}

export function chargingRecordVipData (data) {
	 
	return request({
		method: 'post',
		data:data ,
		url: '/mobile/chargingCar/chargingRecordVipData'
	})
}