package com.example.defenseapplication.utils import bean.ForgotRequest import com.example.defenseapplication.bean.DeviceBean import com.example.defenseapplication.bean.FamilyBean import com.example.defenseapplication.bean.GetCodeBean import bean.LoginBean import bean.LoginRequest import bean.RegisterRequest import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST import retrofit2.http.PUT import retrofit2.http.Query interface ApiService { /** * 获取登录验证码 */ @GET("/resource/sms/code") suspend fun getCode(@Query("userName") userName: String): GetCodeBean /** * app登录方法 * @param loginRequest 登录参数 sms验证码登录,password密码登录 * */ @POST("/app/login") suspend fun login(@Body loginRequest: LoginRequest): GetCodeBean /** * app注册 */ @POST("/app/register") suspend fun register(@Body registerRequest: RegisterRequest): GetCodeBean /** * 忘记密码——修改密码 */ @PUT("/app/forgot") suspend fun forgotPassword(@Body forgotRequest: ForgotRequest): GetCodeBean /** * 获取家庭列表 */ @GET("/app/selectFamily") suspend fun getFamilyList(): GetCodeBean> /** * 切换家庭 */ //@POST("/app/switchFamily") //suspend fun switchFamily(@Body request: com.example.defenseapplication.bean.SwitchFamilyRequest): GetCodeBean }