| | |
| | | import com.weikou.beibeivideo.R; |
| | | import com.weikou.beibeivideo.entity.vo.WatchHistoryVO; |
| | | import com.weikou.beibeivideo.ui.dialog.LoadingDialogUtil; |
| | | import com.weikou.beibeivideo.util.JsonUtil; |
| | | import com.weikou.beibeivideo.util.UserUtil; |
| | | import com.weikou.beibeivideo.widget.MySwipeRefreshLayout; |
| | | |
| | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optBoolean("IsPost")) { |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | |
| | | JSONObject data = jsonObject.optJSONObject("Data"); |
| | | count = data.optLong("count"); |
| | | Type type = new TypeToken<List<WatchHistoryVO>>() { |
| | | }.getType(); |
| | | |
| | | List<WatchHistoryVO> list = gson.fromJson(data.optJSONArray("list").toString(), type); |
| | | List<WatchHistoryVO> list = JsonUtil.videoGson.fromJson(data.optJSONArray("list").toString(), type); |
| | | currentPage = page; |
| | | if (voList == null) |
| | | voList = new ArrayList<>(); |