
/**
 * 手太欠
 * 愿这世界都如故事里一样 美好而动人~
 */

import { request } from '../index'

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

// 获取短信前图形验证码
const Captcha = (data) =>{
	return request({
		url: "user/auth/captcha",
		method: 'POST',
		data: data
	})
}

// 需校验图形验证码
const smsAuth = (data) =>{
	return request({
		url: "user/auth/verify_captcha",
		method: 'POST',
		data: data
	})
}

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

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

// 修改密码
const modifyPassword = (data) =>{
	return request({
		url: "user/setting/reset_password",
		method: 'POST',
		data: data
	})
}

// 隐私+协议
const registeragree = (website) =>{
	return request({
		url: "cms/pages/" + website
	})
}

// 验证码登录
const authSms = (data) =>{
	return request({
		url: "user/auth/sms",
		method: 'POST',
		data: data
	})
}
export {
	Register,
	Captcha,
	smsAuth,
	Login,
	resetPassword,
	modifyPassword,
    registeragree,
	authSms
}
