相关数据关联UserDataEntity, 统一在Interceptor添加token

This commit is contained in:
kehaoyuan
2017-09-14 15:23:08 +08:00
parent 1e7d43bc72
commit b0dde281ea
30 changed files with 763 additions and 394 deletions

View File

@ -29,9 +29,9 @@ public class PostCommentUtils {
RequestBody body = RequestBody.create(MediaType.parse("application/json"), content);
Observable<ResponseBody> observable;
if (commentEntity != null) {
observable = RetrofitManager.getInstance(context).getApi().postReplyComment(LoginUtils.getToken(context), commentEntity.getId(), body);
observable = RetrofitManager.getInstance(context).getApi().postReplyComment(commentEntity.getId(), body);
} else {
observable = RetrofitManager.getInstance(context).getApi().postNewsComment(LoginUtils.getToken(context), newsId, body);
observable = RetrofitManager.getInstance(context).getApi().postNewsComment(newsId, body);
}
observable.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -59,7 +59,7 @@ public class PostCommentUtils {
public static void addCommentVoto(final Context context, final String commentId,
final PostCommentListener listener) {
RetrofitManager.getInstance(context).getApi()
.postCommentVote(LoginUtils.getToken(context), commentId)
.postCommentVote(commentId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<ResponseBody>() {
@ -83,7 +83,7 @@ public class PostCommentUtils {
final PostCommentListener listener) {
RequestBody body = RequestBody.create(MediaType.parse("application/json"), reportData);
RetrofitManager.getInstance(context).getApi()
.postReportData(body, LoginUtils.getToken(context))
.postReportData(body)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<ResponseBody>() {