// 引入 request 文件
import request from '@/common/api/request.js'
const url = '/account'
//根据经纬度获取信息
export const APIgeocodelocation = (data) => {
	return new Promise((resove, reject) => {
		resove(null)
	})
	// return request({
	// 	url: url + '/user/geo/geocode',
	// 	method: 'get',
	// 	data: data,
	// 	toast: false
	// })
}

//登录
export const APIuserlogin = (data) => {
	return request({
		url: url + '/user/login',
		method: 'post',
		data: data,
		toast: false
	})
}

//用户信息获取
export const APIuser = (data) => {
	return request({
		url: url + '/user',
		method: 'get',
		data: data,
		toast: false
	})
}

export const updateUserInfoReq = (data) => {
	return request({
		url: url + '/user',
		method: 'put',
		data: data
	})
}

//获取手机号
export const APIuserphone = (data) => {
	return request({
		url: url + '/user/phone',
		method: 'post',
		data: data
	})
}

//文件上传
export const APIuserupload = (data) => {
	return request({
		url: url + '/user/common/upload',
		method: 'post',
		data: data
	})
}

//用户密码修改
export const APIuserpwd = (data) => {
	return request({
		url: url + '/user/pwd',
		method: 'put',
		data: data
	})
}

//验证码获取
export const APIusercode = (data) => {
	return request({
		url: url + '/user/code',
		method: 'get',
		data: data
	})
}