Commit 77e16d67 by sikang

bugFix

parent f430b18a
...@@ -57,6 +57,9 @@ public interface LoanApi { ...@@ -57,6 +57,9 @@ public interface LoanApi {
@GET("loanapp/product_default") @GET("loanapp/product_default")
Observable<List<ProductBean>> getProductsDefault(); Observable<List<ProductBean>> getProductsDefault();
@GET("loanapp/product")
Observable<List<ProductBean>> getProducts();
/** /**
* 获取最新的贷款申请信息 * 获取最新的贷款申请信息
*/ */
......
...@@ -104,9 +104,12 @@ public class LoanPresenter extends BasePresenter<LoanApi> { ...@@ -104,9 +104,12 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
* 商品列表 * 商品列表
*/ */
public void getProductList(String action) { public void getProductList(String action) {
if (TextUtils.isEmpty(LoginManager.get().getToken())) {
handleRequest(action, apiService.getProductsDefault()); handleRequest(action, apiService.getProductsDefault());
}else{
handleRequest(action, apiService.getProducts());
}
} }
/** /**
* 获取银行列表 * 获取银行列表
...@@ -166,7 +169,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> { ...@@ -166,7 +169,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
* 是否授权数据 * 是否授权数据
*/ */
public void getHarvestGrant(String action) { public void getHarvestGrant(String action) {
handleRequest(action,apiService.getHarvestGrant(LoginManager.get().getToken())); handleRequest(action, apiService.getHarvestGrant(LoginManager.get().getToken()));
} }
......
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