public class BaseModel
public String code;
public String msg;
public T data;
public boolean success() {
return code.equals("1");
}
@Override
public String toString() {
return "BaseModel{" +
"code='" + code + '\'' +
", msg='" + msg + '\'' +
", data=" + data +
'}';
}
}
Retrofit请求接口的ApiService如下:
public interface ApiService{
@FormUrlEncoded
@POST("/v1/login?c=login&i=memlogin")
Observable
@Field("phone") String phone,
@Field("password") String password);
}
会卡