1:完成挚友功能
2:添加在送特定礼物展示弹框功能 3:修改部分图片格式变成wedp 4:用户主页添加礼物墙和挚友
This commit is contained in:
@@ -385,6 +385,10 @@ public interface ApiServer {
|
||||
Call<BaseModel<String>> commentZone(@Field("id") String id, @Field("content") String content, @Field("pid") String pid, @Field("reply_to") String reply_to);
|
||||
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_FRIEND_LIST)
|
||||
Call<BaseModel<RelationBean>> getFriendList(@Field("user_id") String user_id, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@GET(Constants.GET_MY_CP_ROOM_LIST)
|
||||
Call<BaseModel<List<MyCpRoom>>> myCpRoom();
|
||||
|
||||
@@ -754,6 +758,10 @@ public interface ApiServer {
|
||||
@POST(Constants.POST_QUIT_ROOM)
|
||||
Call<ResponseBody> quitRoom(@Field("room_id") String room_id, @Field("user_id") String user_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_FRIEND_LIST_MORE)
|
||||
Call<BaseModel<List<RelationshipBean>>> getFriendListMore(@Field("user_id") String user_id, @Field("relation_id") String relation_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_RELATION_CARD)
|
||||
Call<BaseModel<RelationCardBean>> relationCard(@Field("user_id") String user_id);
|
||||
|
||||
@@ -3595,6 +3595,35 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getFriendListMore(String user_id,String relation_id,BaseObserver<List<RelationshipBean>> observer){
|
||||
sApiServer.getFriendListMore(user_id,relation_id).enqueue(new Callback<BaseModel<List<RelationshipBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<RelationshipBean>>> call, Response<BaseModel<List<RelationshipBean>>> response) {
|
||||
if (response.code()==200){
|
||||
BaseModel<List<RelationshipBean>> baseModel = response.body();
|
||||
if (baseModel.getCode()==1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode()==301){
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<RelationshipBean>>> call, Throwable t) {
|
||||
LogUtils.e("getFriendListMore",t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void checkTxt(String room_name, String room_cover, String
|
||||
room_intro, BaseObserver<String> observer) {
|
||||
sApiServer.checkTxt(room_name, room_cover, room_intro).enqueue(new Callback<ResponseBody>() {
|
||||
@@ -3712,8 +3741,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void commentZone(String id, String content, String pid, String
|
||||
reply_to, BaseObserver<String> observer) {
|
||||
public void commentZone(String id, String content, String pid, String reply_to, BaseObserver<String> observer) {
|
||||
sApiServer.commentZone(id, content, pid, reply_to).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -3727,6 +3755,34 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getFriendList(String userId,String page,String page_limit,BaseObserver<RelationBean> observer) {
|
||||
sApiServer.getFriendList(userId, page, page_limit).enqueue(new Callback<BaseModel<RelationBean>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<RelationBean>> call, Response<BaseModel<RelationBean>> response) {
|
||||
if (response.code()==200){
|
||||
BaseModel<RelationBean> body = response.body();
|
||||
if (body.getCode()==1){
|
||||
observer.onNext(body.getData());
|
||||
}else if (body.getCode()==301){
|
||||
try {
|
||||
ToastUtils.showShort(body.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showShort(body.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<RelationBean>> call, Throwable t) {
|
||||
LogUtils.e("getFriendList",t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void clearLoginInfo(BaseObserver<String> observer) {
|
||||
sApiServer.clearLoginInfo(SpUtil.getToken()).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
Reference in New Issue
Block a user