fix apiservice

This commit is contained in:
CsHeng
2017-09-11 15:37:31 +08:00
parent c487dc2f03
commit 47f7d70cfb
99 changed files with 721 additions and 555 deletions

View File

@ -19,7 +19,6 @@ import android.widget.ScrollView;
import android.widget.TextView;
import com.facebook.drawee.view.SimpleDraweeView;
import com.gh.base.AppController;
import com.gh.base.BaseActivity;
import com.gh.common.constant.Config;
import com.gh.common.util.CheckLoginUtils;
@ -45,6 +44,7 @@ import com.gh.gamecenter.retrofit.OkHttpCache;
import com.gh.gamecenter.retrofit.Response;
import com.gh.gamecenter.retrofit.RetrofitManager;
import com.google.gson.Gson;
import com.halo.assistant.AppController;
import com.lightgame.utils.Utils;
import org.greenrobot.eventbus.Subscribe;
@ -63,6 +63,7 @@ import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import static com.gh.gamecenter.personal.PersonalFragment.LOGIN_TAG;
import static com.taobao.accs.ACCSManager.mContext;
/**
* Created by khy on 2016/11/8.
@ -218,7 +219,7 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
}
public void getCommentNum() {
RetrofitManager.getComment()
RetrofitManager.getInstance(mContext).getApi()
.getNewsCommentnum(newsId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -239,7 +240,7 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
}
private void getConcernDigest() {
RetrofitManager.getApi().getNewsRichDigest(newsId)
RetrofitManager.getInstance(mContext).getApi().getNewsRichDigest(newsId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<ConcernEntity>() {
@ -270,7 +271,7 @@ public class MessageDetailActivity extends BaseActivity implements OnCommentCall
}
private void getNewsViews() {
RetrofitManager.getData()
RetrofitManager.getInstance(mContext).getData()
.getNewsViews(newsId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())