| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d71bc85 commit a0a634f
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,7 +70,7 @@ public JSONResponse(JSONObject object) { | |||
| 70 | 70 | public static final String KEY_MSG = "msg"; | |
| 71 | 71 | public static final String KEY_COUNT = "count"; | |
| 72 | 72 | public static final String KEY_TOTAL = "total"; | |
| 73 | - public static final String KEY_PAGE = "page"; //详细的分页信息 | ||
| 73 | + public static final String KEY_INFO = "info"; //详细的分页信息 | ||
| 74 | 74 | public static final String KEY_FIRST = "first"; //是否为首页 | |
| 75 | 75 | public static final String KEY_LAST = "last"; //是否为尾页 | |
| 76 | 76 | public static final String KEY_MAX = "max"; //最大页码 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -361,7 +361,7 @@ else if (value instanceof String) { // 引用赋值路径 | |||
| 361 | 361 | return true; | |
| 362 | 362 | } | |
| 363 | 363 | if (target instanceof Map) { //target可能是从requestObject里取出的 {} | |
| 364 | - if (isTable || targetPath.endsWith("[]/" + JSONResponse.KEY_PAGE) == false) { | ||
| 364 | + if (isTable || targetPath.endsWith("[]/" + JSONResponse.KEY_INFO) == false) { | ||
| 365 | 365 | Log.d(TAG, "onParse target instanceof Map >> return false;"); | |
| 366 | 366 | return false; //FIXME 这个判断现在来看是否还有必要?为啥不允许为 JSONObject ?以前可能因为防止二次遍历再解析,现在只有一次遍历 | |
| 367 | 367 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -757,12 +757,12 @@ public JSONObject onObjectParse(final JSONObject request | |||
| 757 | 757 | JSONObject pagination = new JSONObject(true); | |
| 758 | 758 | pagination.put(JSONResponse.KEY_TOTAL, total); | |
| 759 | 759 | pagination.put(JSONResponse.KEY_COUNT, count); | |
| 760 | - pagination.put(JSONResponse.KEY_PAGE, page); | ||
| 760 | + pagination.put(JSONResponse.KEY_INFO, page); | ||
| 761 | 761 | pagination.put(JSONResponse.KEY_MAX, max); | |
| 762 | 762 | pagination.put(JSONResponse.KEY_MORE, page < max); | |
| 763 | 763 | pagination.put(JSONResponse.KEY_FIRST, page == 0); | |
| 764 | 764 | pagination.put(JSONResponse.KEY_LAST, page == max); | |
| 765 | - putQueryResult(pathPrefix + JSONResponse.KEY_PAGE, pagination); | ||
| 765 | + putQueryResult(pathPrefix + JSONResponse.KEY_INFO, pagination); | ||
| 766 | 766 | ||
| 767 | 767 | if (total <= count*page) { | |
| 768 | 768 | query = JSONRequest.QUERY_TOTAL;//数量不够了,不再往后查询 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments