Commit fd3309b6 authored by mengcuiguang's avatar mengcuiguang

添加奖励弹窗显示金币,去除离线收益功能

parent 4785d2c0
......@@ -401,7 +401,7 @@ public class TrackPresenter extends BaseTrackPresenter {
subscription = loanService.reportAddCoinMsg(vo)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(loanApplication.defaultSubscribeScheduler())
.subscribe(new BaseSubscriber<BaseResponse<Object>>() {
.subscribe(new BaseSubscriber<BaseResponse<JsonObject>>() {
@Override
public void onCompleted() {
}
......@@ -411,7 +411,17 @@ public class TrackPresenter extends BaseTrackPresenter {
}
@Override
public void onNext(BaseResponse<Object> baseResponse) {
public void onNext(BaseResponse<JsonObject> baseResponse) {
try {
if (baseResponse.getStatus() == 200) {
JsonObject data = baseResponse.getData();
if (data != null) {
AppConfig.awardCoin = data.get("coin").getAsInt();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
......
......@@ -135,7 +135,7 @@ public interface LoanService {
* 提交任务
*/
@POST("api/reportAddCoinMsg")
Observable<BaseResponse<Object>> reportAddCoinMsg(@Body Map<String, Object> vo);
Observable<BaseResponse<JsonObject>> reportAddCoinMsg(@Body Map<String, Object> vo);
/**
* 获取用户配置信息
......
......@@ -475,12 +475,12 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
// }
// 离线收益
if (data.offlineBean.offlineIncome > 0) {
val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, data.offlineBean.offlineIncome)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_OFFLINE_DOUBLE)
readyGo(AwardActivity::class.java, bundle)
}
// if (data.offlineBean.offlineIncome > 0) {
// val bundle = Bundle()
// bundle.putInt(Constant.MAIN_CUR_COIN, data.offlineBean.offlineIncome)
// bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_OFFLINE_DOUBLE)
// readyGo(AwardActivity::class.java, bundle)
// }
}
/** 初始化信息流 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment