|
|
@@ -129,13 +129,16 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
|
|
|
MyGridView mGridView = findViewById(R.id.mGridView);
|
|
|
mBanner = findViewById(R.id.city_industry_service_main_banner);
|
|
|
mBanner.setImageLoader(new BannerImageLoader());
|
|
|
- List<String> imgList=new ArrayList<>();
|
|
|
- imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/3-1.jpg");
|
|
|
- imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/2-1.jpg");
|
|
|
- imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/1-1.jpg");
|
|
|
- imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/2-1.jpg");
|
|
|
- mBanner.update(imgList);
|
|
|
- mBanner.start();
|
|
|
+
|
|
|
+// List<String> imgList=new ArrayList<>();
|
|
|
+// imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/3-1.jpg");
|
|
|
+// imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/2-1.jpg");
|
|
|
+// imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/1-1.jpg");
|
|
|
+// imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/2-1.jpg");
|
|
|
+// mBanner.update(imgList);
|
|
|
+// mBanner.start();
|
|
|
+
|
|
|
+
|
|
|
List<SBMenuModel> menuModels = new ArrayList<>();
|
|
|
SBMenuModel menuModel = new SBMenuModel();
|
|
|
menuModel.setUrl("");
|
|
|
@@ -330,8 +333,38 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
|
|
|
|
|
|
private void intData() {
|
|
|
loadListData(pageSize);
|
|
|
+ initBannerData();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private void initBannerData(){
|
|
|
+ HttpClient httpClient=new HttpClient.Builder(Constants.IM_BASE_URL()).build();
|
|
|
+ httpClient.Api().send(new HttpClient.Builder()
|
|
|
+ .url("user/appAd")
|
|
|
+ .add("token",MyApplication.getInstance().mAccessToken)
|
|
|
+ .method(Method.POST)
|
|
|
+ .build(),new ResultSubscriber<Object>(new ResultListener<Object>() {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onResponse(Object o) {
|
|
|
+ try {
|
|
|
+ LogUtil.d(TAG,toString());
|
|
|
+ String result= JSON.parseObject(o.toString()).getString("result");
|
|
|
+ String url= JSON.parseArray(result).getJSONObject(0).getString("aa_urlc");
|
|
|
+ List<String> imgList=new ArrayList<>();
|
|
|
+ imgList.add(url);
|
|
|
+ imgList.add(url);
|
|
|
+ imgList.add(url);
|
|
|
+ imgList.add(url);
|
|
|
+ mBanner.update(imgList);
|
|
|
+ mBanner.start();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }));
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
// @Override
|
|
|
// protected void onResume() {
|