import { Service } from '@/Service/Service';


export class LoginService {
	/**
	 * 登录接口
	 * POST /api/Login/Login
	 */
	static async Login(phone :string,pwd:string ) {
		return await Service.Request( "/api/Login/Login",'POST', {phone,pwd});
	}

	/**
	 * 登录接口
	 * POST /api/Login/PhoneLogin
	 */
	static async PhoneLogin(phone :string,smsCode:string ) {
		return await Service.Request( "/api/Login/PhoneLogin",'POST', {phone,smsCode});
	}

	/**
	 * 注册账号
	 * POST /api/Login/Register
	 */
	static async Register(data : Record<string, any>) {
		return await Service.Request( "/api/Login/Register",'POST', data);
	}

	/**
	 * 忘记密码
	 * POST /api/Login/ForgetPwd
	 */
	static async ForgetPwd(data : Record<string, any>) {
		return await Service.Request( "/api/Login/ForgetPwd",'POST', data);
	}
	
	/**
	 * 发送验证码
	 * POST /api/Pub/SendSms
	 */
	static async SendSms(phone:string,smsCode:string) {
		return await Service.Request( "/api/Pub/SendSms",'POST', { phone,smsCode });
	}
	
	
}