1:添加练歌房,已点歌曲搜索(只能搜索用户id)、删除功能
This commit is contained in:
@@ -453,6 +453,10 @@ public interface ApiServer {
|
||||
@POST(Constants.POST_DEL_SONG)
|
||||
Call<BaseModel<String>> delSong(@Field("room_id") String room_id, @Field("did") String did);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SEARCH_USER)
|
||||
Call<BaseModel<List<MusicSongBean>>> searchSong(@Field("room_id") String room_id, @Field("search_user") String search_user);
|
||||
|
||||
@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);
|
||||
|
||||
@@ -2704,6 +2704,33 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void searchSong(String roomId,String search_user,BaseObserver<List<MusicSongBean>> observer) {
|
||||
sApiServer.searchSong(roomId,search_user).enqueue(new Callback<BaseModel<List<MusicSongBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<MusicSongBean>>> call, Response<BaseModel<List<MusicSongBean>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<MusicSongBean>> musicSongBaseModel = response.body();
|
||||
if (musicSongBaseModel.getCode() == 1) {
|
||||
observer.onNext(musicSongBaseModel.getData());
|
||||
} else if (musicSongBaseModel.getCode() == 301) {
|
||||
setCode301(musicSongBaseModel.getMsg());
|
||||
} else if (musicSongBaseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(musicSongBaseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("获取歌曲列表异常", response.code());
|
||||
LogUtils.e("songList", response.code());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<MusicSongBean>>> call, Throwable t) {
|
||||
LogUtils.e("searchSong", t.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getMyInfo(BaseObserver<UserInfo> observer) {//点击我的获取数据
|
||||
sApiServer.getMyInfo().enqueue(new Callback<BaseModel<UserInfo>>() {
|
||||
@Override
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ImageUtils {
|
||||
* 默认加载
|
||||
*/
|
||||
public static void loadImageView(String path, ImageView mImageView) {
|
||||
Glide.with(mImageView).load(path).apply(createUrlOnlyOptions(path)).thumbnail(0.5f).into(mImageView);
|
||||
Glide.with(mImageView).load(path).apply(createUrlOnlyOptions(path)).thumbnail(0.3f).into(mImageView);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +117,7 @@ public class ImageUtils {
|
||||
*/
|
||||
public static void loadSample(String path, ImageView mImageView, int width, int height) {
|
||||
RequestOptions options = new RequestOptions().override(width, height).diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
||||
Glide.with(mImageView).load(path).apply(options).thumbnail(0.5f).into(mImageView);
|
||||
Glide.with(mImageView).load(path).apply(options).thumbnail(0.3f).into(mImageView);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,7 +210,7 @@ public class ImageUtils {
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).load(path).apply(createUrlOnlyOptions(path)).error(errorRes).
|
||||
placeholder(errorRes).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).thumbnail(0.5f).into(mImageView);
|
||||
placeholder(errorRes).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).thumbnail(0.3f).into(mImageView);
|
||||
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public class ImageUtils {
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).load(path).apply(createUrlOnlyOptions(path))
|
||||
.placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.5f).into(mImageView);
|
||||
.placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.3f).into(mImageView);
|
||||
}
|
||||
|
||||
public static void loadHeadCC(String path, ImageView mImageView) {
|
||||
@@ -243,7 +243,7 @@ public class ImageUtils {
|
||||
}
|
||||
Glide.with(mImageView).asBitmap().load(path)
|
||||
.apply(createUrlOnlyOptions(path))
|
||||
.error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).centerCrop().thumbnail(0.5f).into(mImageView);
|
||||
.error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).centerCrop().thumbnail(0.3f).into(mImageView);
|
||||
}
|
||||
|
||||
public static void loadHead(String path, ImageView mImageView) {
|
||||
@@ -258,7 +258,7 @@ public class ImageUtils {
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).load(path).apply(createUrlOnlyOptions(path))
|
||||
.thumbnail(0.5f).into(mImageView);
|
||||
.thumbnail(0.3f).into(mImageView);
|
||||
}
|
||||
|
||||
public static void loadHeadCC(String path, ImageView mImageView, LinearLayout.LayoutParams params) {
|
||||
|
||||
@@ -246,6 +246,7 @@ public class Constants {
|
||||
public static final String GET_MY_INFO = "/api/User/get_user_info";//点击我的获取个人数据
|
||||
public static final String GET_USER_HOME = "/api/User/get_user_home";//点击获取个人数据
|
||||
public static final String POST_DEL_SONG = "/api/RoomSong/del_song";//删除已点歌曲
|
||||
public static final String POST_SEARCH_USER = "/api/RoomSong/search_song";//已点列表搜索
|
||||
|
||||
public static final String ED_USER_INFO = "/api/User/edit_user_info";//编辑信息
|
||||
public static final String ED_USER_BG = "/api/User/edit_user_bg";//编辑背景图片
|
||||
|
||||
Reference in New Issue
Block a user