
/**
 * Web唐明明
 * 匆匆数载恍如梦，岁月迢迢华发增。
 * 碌碌无为枉半生，一朝惊醒万事空。
 * moduleName: 鉴权
 */

import { request } from '../index'

// 用户名密码登录
const auth = (data) =>{
	return request({
		url		: "user/auth/login",
		method	: "POST",
		data
	})
}

// 用户注册
const register = data => {
	return request({
		url		: "user/auth/register",
		method	: "POST",
		data
	})
}

// 图形验证码
const captcha = () => {
	return request({
		url		: "user/auth/captcha",
		method	: "POST"
	})
}

// 获取短信验证码
const verifyCaptcha = data => {
	return request({
		url		: "user/auth/verify_captcha",
		method	: "POST",
		data
	})
}

// 重置密码
const resetPassword = data => {
	return request({
		url		: "user/auth/reset_password",
		method	: "POST",
		data
	})
}
 
export {
	auth,
	register,
	captcha,
	verifyCaptcha,
	resetPassword
}
