import request from '@/utils/request'

// 修改用户信息
export function userEdit(data) {
	return request({
		url: '/api/user/edit',
		method: 'post',
		data
	});
}

//退出登录
export function logout(data) {
	return request({
		url: '/api/logout',
		method: 'get',
		data
	});
}
//修改密码
export function registerReset(data) {
	return request({
		url: '/api/register/reset',
		method: 'post',
		data
	});
}

//绑定手机
export function binding(data) {
	return request({
		url: '/api/binding',
		method: 'post',
		data
	});
}
// #ifdef APP-PLUS
//苹果生成账户
export function applelogin(data) {
	return request({
		url: '/api/applelogin',
		method: 'post',
		data
	});
}
// #endif


//获取省市区
export function getAddressArea(data) {
	return request({
		url: '/api/area',
		method: 'get',
		data
	});
}
//获取村镇
export function getAddressCity(data,id) {
	return request({
		url: '/api/village/'+id,
		method: 'get',
		data
	});
}
//逐级获取地址
export function getRegion(data,id) {
	return request({
		url: '/api/region/' + id,
		method: 'get',
		data
	});
}
export function getAddressDetail(data,id) {
	return request({
		url: '/api/address/detail/'+id,
		method: 'get',
		data
	});
}
//逐级获取地址
export function getArea(data,id) {
	return request({
		url:'/api/region/' + id,
		method:'get',
		data
	})
}
