任务1
This commit is contained in:
@@ -80,7 +80,7 @@ public interface ApiServer {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.dailyTasksReceive)
|
||||
Call<ResponseBody> dailyTasksReceive(@Field("task_id") String task_id);
|
||||
Call<ResponseBody> dailyTasksReceive(@Field("task_id") String task_id,@Field("student_id") String student_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.dailyTasksComplete)
|
||||
@@ -498,6 +498,10 @@ public interface ApiServer {
|
||||
@POST(Constants.JOIN_ROOM)
|
||||
Call<BaseModel<RoomInfoResp>> roomGetIn(@Field("room_id") String roomId, @Field("password") String password);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.TASK_JUMP_ROOM)
|
||||
Call<BaseModel<String>> taskJumpRoomId(@Field("task_id") String taskId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_ALBUM_IMAGE)
|
||||
Call<BaseModel<String>> deleteAlbumImage(@Field("id") String id);
|
||||
|
||||
@@ -1058,8 +1058,8 @@ public class RetrofitClient {
|
||||
sApiServer.dailyTasksOpenBox(gift_box_id).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void dailyTasksReceive(String task_id, BaseObserver<String> observer) {
|
||||
sApiServer.dailyTasksReceive(task_id).enqueue(new Callback<ResponseBody>() {
|
||||
public void dailyTasksReceive(String task_id,String student_id, BaseObserver<String> observer) {
|
||||
sApiServer.dailyTasksReceive(task_id,student_id).enqueue(new Callback<ResponseBody>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
@@ -2277,6 +2277,26 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void taskJumpRoomId(String taskId, BaseObserver<String> observer) {
|
||||
sApiServer.taskJumpRoomId(taskId).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> stringBaseModel = response.body();
|
||||
if (stringBaseModel.getCode() == 1) {
|
||||
observer.onNext(stringBaseModel.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updatePassword(String roomId, String password, BaseObserver<String> observer) {
|
||||
sApiServer.updatePassword(roomId, password).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user