|
|
@@ -333,6 +333,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
Intent intent = new Intent(IndexActivity.this, BannerActivity.class);
|
|
|
intent.putStringArrayListExtra("lists", selectedItemList);
|
|
|
intent.putExtra("keyStepSet", keyStepSet); //手动获取接口的关键岗位
|
|
|
+ intent.putExtra("keystep", keyStepSet); //关键岗位
|
|
|
startActivity(intent);
|
|
|
} else if (filenametcp.contains(".MP4") || filenametcp.contains(".mp4")) {
|
|
|
Intent intent = new Intent(IndexActivity.this, VideoActivity.class);
|
|
|
@@ -617,17 +618,33 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
private void handleFeededData(JSONArray dataArray) {
|
|
|
ResourcefileBean.DataBean.UrlBean bean;
|
|
|
urlBeanList.clear();
|
|
|
- for (Object index : dataArray) {
|
|
|
- JSONObject data = (JSONObject) index;
|
|
|
- if (data.getString("filename").equals(at_gvtext.getText().toString().trim() + ".jpg")) {
|
|
|
- bean = new ResourcefileBean.DataBean.UrlBean(
|
|
|
- data.getString("path"),
|
|
|
- data.getString("filename"), data.getString("keystep"));
|
|
|
- urlBeanList.add(bean);
|
|
|
- }
|
|
|
+ try {
|
|
|
+ for (Object index : dataArray) {
|
|
|
+ JSONObject data = (JSONObject) index;
|
|
|
+ String filename = data.getString("filename");
|
|
|
+ String strJpg = filename.replace(".jpg", "");
|
|
|
+ String strJpgB = filename.replace(".JPG", "");
|
|
|
+ String strPng = filename.replace(".png", "");
|
|
|
+ String strPngB = filename.replace(".PNG", "");
|
|
|
+ if (filename.equals(at_gvtext.getText().toString().trim() + ".jpg")
|
|
|
+ || filename.equals(at_gvtext.getText().toString().trim() + ".png")
|
|
|
+ || strJpg.contains(at_gvtext.getText().toString().trim() + "-")
|
|
|
+ || strJpgB.contains(at_gvtext.getText().toString().trim() + "-")
|
|
|
+ || strPng.contains(at_gvtext.getText().toString().trim() + "-")
|
|
|
+ || strPngB.contains(at_gvtext.getText().toString().trim() + "-")
|
|
|
+ )
|
|
|
+ {
|
|
|
+ bean = new ResourcefileBean.DataBean.UrlBean(
|
|
|
+ data.getString("path"),
|
|
|
+ data.getString("filename"), data.getString("keystep"));
|
|
|
+ urlBeanList.add(bean);
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ setAdapter(urlBeanList);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- setAdapter(urlBeanList);
|
|
|
}
|
|
|
|
|
|
private void setAdapter(ArrayList<ResourcefileBean.DataBean.UrlBean> mList) {
|
|
|
@@ -926,6 +943,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
String json = o.toString();
|
|
|
JSONArray dataArray = FastjsonUtil.getJSONArray(json, "data");
|
|
|
LogUtil.edayin("stringtextsss=======", o.toString() + "");
|
|
|
+ if (dataArray.size() <= 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
urlBeantwoList.clear();
|
|
|
for (Object index : dataArray) {
|
|
|
JSONObject data = (JSONObject) index;
|
|
|
@@ -941,7 +961,10 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
keystep = "";
|
|
|
for (int i = 0; i < urlBeantwoList.size(); i++) {
|
|
|
BeanSop urlBean = urlBeantwoList.get(i);
|
|
|
- String filename = urlBean.getFilename().replace(".jpg", "");
|
|
|
+ String filenameJpg = urlBean.getFilename().replace(".jpg", "");
|
|
|
+ String filenameJpgB = urlBean.getFilename().replace(".JPG", "");
|
|
|
+ String filenamePng = urlBean.getFilename().replace(".png", "");
|
|
|
+ String filenamePngB = urlBean.getFilename().replace(".PNG", "");
|
|
|
if (StringUtil.isEmpty(urlBean.getPath())) {
|
|
|
CommonUtil.toastNoRepeat(IndexActivity.this, "数据为空");
|
|
|
return;
|