相关数据关联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

@ -73,7 +73,7 @@ public class LibaoUtils {
//初始化存号箱 获取存号箱所有礼包
public static void getCunHaoXiang(final Context context) {
RetrofitManager.getInstance(context).getApi()
.getCunHaoXiang(LoginUtils.getToken(context))
.getCunHaoXiang()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<List<LibaoEntity>>() {
@ -109,7 +109,7 @@ public class LibaoUtils {
Observable<ResponseBody> observable;
if (!TextUtils.isEmpty(captchaCode)) {
observable = RetrofitManager.getInstance(context).getApi().postLibaoLing(LoginUtils.getToken(context), captchaCode, libaoId);
observable = RetrofitManager.getInstance(context).getApi().postLibaoLing(captchaCode, libaoId);
} else {
observable = RetrofitManager.getInstance(context).getApi().postLibaoLing(LoginUtils.getToken(context), libaoId);
}
@ -133,7 +133,7 @@ public class LibaoUtils {
private static void postLibaoTao(final Context context, final String libaoId, final boolean isCheck,
final PostLibaoListener listener) {
RetrofitManager.getInstance(context).getApi().postLibaoTao(LoginUtils.getToken(context), libaoId)
RetrofitManager.getInstance(context).getApi().postLibaoTao(libaoId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new JSONObjectResponse() {
@ -151,7 +151,7 @@ public class LibaoUtils {
public static void deleteLibaoCode(final Context context, final String code, final boolean isCheck,
final PostLibaoListener listener) {
RetrofitManager.getInstance(context).getApi().deleteLibaoCode(LoginUtils.getToken(context), code)
RetrofitManager.getInstance(context).getApi().deleteLibaoCode(code)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<ResponseBody>() {