import { Service } from '@/Service/Service';
/*****登录接口*****/
class CNRiderLoginService {
	private static RiderLoginPath : string = '/Login/RiderLogin';
	/*****登录注册*****/
	static RiderLogin(login : any) {
		var result = Service.Request(this.RiderLoginPath, "POST", login);
		return result;
	}

	private static GetKefuInfoPath : string = '/Home/GetKefuInfo';
	/*****获取客服电话*****/
	static GetKefuInfo() {
		var result = Service.Request(this.GetKefuInfoPath, "GET", {});
		return result;
	}


	private static GetPrivacyPath : string = '/Home/GetPrivacy';
	/*****用户协议*****/
	static GetPrivacy(type : number) {
		var result = Service.Request(this.GetPrivacyPath, "GET", { type });
		return result;
	}

	private static SendUserSmsPath : string = '/Login/SendUserSms';
	/*****发送验证码*****/
	static SendUserSms(phone : string, code : string) {
		var result = Service.Request(this.SendUserSmsPath, "POST", { phone, code });
		return result;
	}
	
	private static UpdateRiderPhonePath : string = '/Rider/UpdateRiderPhone';
	/*****修改手机号*****/
	static UpdateRiderPhone(phone : string, code : string) {
		var result = Service.Request(this.UpdateRiderPhonePath, "POST", { phone, code });
		return result;
	}
	
	
	private static UpdateRiderPasswordPath : string = '/Rider/UpdateRiderPassword';
	/*****修改密码*****/
	static UpdateRiderPassword( code:string, password : string, confimPwd : string) {
		var result = Service.Request(this.UpdateRiderPasswordPath, "POST", { code, password, confimPwd });
		return result;
	}
	
	private static GetAppVersionPath : string = '/Login/GetAppVersion';
	/*****版本更新*****/
	static GetAppVersion(version : number, type : string) {
		var result = Service.Request(this.GetAppVersionPath, "GET", { version, type });
		return result;
	}
}
export {
	Service,
	CNRiderLoginService
}