1:修改超时时间30秒
2:练歌房已点歌曲,添加展示用户code, 3:修改练歌房已点歌曲展示视图 4:练歌房已点歌曲添加删除功能(接口已经接入,但是隐藏了) 5:修改辅服务器
This commit is contained in:
@@ -424,6 +424,10 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_MY_INFO)
|
||||
Call<BaseModel<UserInfo>> getMyInfo();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_DEL_SONG)
|
||||
Call<BaseModel<String>> delSong(@Field("room_id") String room_id, @Field("did") String did);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ED_USER_INFO)
|
||||
Call<BaseModel<String>> editUserInfo(@Field("nickname") String nickname, @Field("birthday") String birthday, @Field("sex") String sex, @Field("avatar") String avatar, @Field("images") String images, @Field("profile") String profile, @Field("tag_id") String tag_id);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class RetrofitClient {
|
||||
|
||||
public static RetrofitClient INSTANCE;
|
||||
private static ApiServer sApiServer;
|
||||
public static final int DEFAULT_TIME_OUT = 10;
|
||||
public static final int DEFAULT_TIME_OUT = 30;
|
||||
private static OkHttpClient client;
|
||||
private final Retrofit mRetrofit;
|
||||
|
||||
@@ -2445,6 +2445,27 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void delSong(String roomId,String did,BaseObserver<String> observer){
|
||||
sApiServer.delSong(roomId,did).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
onNextRetu(response, observer);
|
||||
}else {
|
||||
ToastUtils.showLong("删除歌曲失败",response.code());
|
||||
LogUtils.e("delSong", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("delSong", t.getMessage());
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getMyInfo(BaseObserver<UserInfo> observer) {//点击我的获取数据
|
||||
sApiServer.getMyInfo().enqueue(new Callback<BaseModel<UserInfo>>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user