Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1 KB

README.md

File metadata and controls

33 lines (26 loc) · 1 KB

RetrofitUtils

请求:

     RetrofitUtils.getInstance(this)
                    .create(ApiService.class)
                    .addPara(2, 20)
                    .enqueue(new BaseCallback<BaseModel<TestModel>>() {

                        @Override
                        protected void onAfter() {
                            dismissProgress();
                        }

                        @Override
                        protected void onSuccess(BaseModel<TestModel> response) {

                            tvResult.setText("status:" + response.isStatus() + "\n" + response.getData().get(0).getDescription());
                        }

                        @Override
                        protected void onNoData(String msg) {
                            showToast(msg);
                        }

                        @Override
                        protected void onFail(String msg) {
                            showToast(msg);
                        }
                    });