This commit is contained in:
parent
39cab08a97
commit
0166c8e20f
|
@ -48,5 +48,7 @@ dependencies {
|
|||
implementation ("io.github.scwang90:refresh-footer-ball:2.1.0") //球脉冲加载
|
||||
implementation ("io.github.scwang90:refresh-footer-classics:2.1.0")
|
||||
implementation ("com.google.code.gson:gson:2.10.1")
|
||||
implementation ("com.squareup.retrofit2:retrofit:2.9.0")
|
||||
implementation ("com.squareup.retrofit2:converter-gson:2.9.0")
|
||||
|
||||
}
|
|
@ -1,4 +1,14 @@
|
|||
package com.hnucm.c202201020141;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface Api {
|
||||
@POST("login")
|
||||
Call<LoginResult> login(@Body Map<String,String> map);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package com.hnucm.c202201020141;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Doctor2 {
|
||||
public List<Doctor.DepartmentsDTO> departments;
|
||||
|
||||
public static class DepartmentsDTO {
|
||||
public String Doctor;
|
||||
public String Expert;
|
||||
public String Cost;
|
||||
public String Picture;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hnucm.c202201020141;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LoginResult {
|
||||
@SerializedName("msg")
|
||||
public String msg;
|
||||
@SerializedName("code")
|
||||
public Integer code;
|
||||
@SerializedName("token")
|
||||
public String token;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package com.hnucm.c202201020141;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Medicine {
|
||||
public List<Doctor.DepartmentsDTO> departments;
|
||||
|
||||
public static class DepartmentsDTO {
|
||||
public String Doctor;
|
||||
public String Expert;
|
||||
public String Cost;
|
||||
public String Picture;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue