This commit is contained in:
饶秋霖 2024-12-01 21:36:30 +08:00
parent 39cab08a97
commit 0166c8e20f
5 changed files with 24 additions and 28 deletions

View File

@ -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")
}

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}
}