From 2a46240b7cb0c28e0215ee83e51434147fb09d55 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 21 十月 2020 17:09:36 +0800 Subject: [PATCH] 项目结构优化 --- BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java index 6149206..95f69bc 100644 --- a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java +++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java @@ -43,6 +43,7 @@ import com.weikou.beibeivideo.entity.HomeType; import com.weikou.beibeivideo.entity.HomeTypeItem; import com.weikou.beibeivideo.entity.HomeVideo; +import com.weikou.beibeivideo.entity.JumpDetail; import com.weikou.beibeivideo.entity.VideoInfo; import com.weikou.beibeivideo.entity.VideoType; import com.weikou.beibeivideo.entity.ad.ExpressAdContainer; @@ -51,6 +52,7 @@ import com.weikou.beibeivideo.ui.mine.BrowserActivity; import com.weikou.beibeivideo.util.BeibeiConstant; import com.weikou.beibeivideo.util.DimenUtils; +import com.weikou.beibeivideo.util.JumpActivityUtil; import com.weikou.beibeivideo.util.ad.AdUtil; import com.weikou.beibeivideo.util.ad.ExpressAdManager; import com.weikou.beibeivideo.util.ui.DividerItemDecoration; @@ -570,6 +572,20 @@ if (jsonObject.getBoolean("IsPost")) { JSONObject obj = jsonObject.optJSONObject("Data"); content = obj.optString("Content"); + JSONObject jumpDetailJson = obj.optJSONObject("jumpDetail"); + JumpDetail jumpDetail = null; + if (jumpDetailJson != null) { + jumpDetail = new Gson().fromJson(jumpDetailJson.toString(), JumpDetail.class); + } + JSONObject paramsJson = obj.optJSONObject("Params"); + com.alibaba.fastjson.JSONObject params = null; + if (paramsJson != null) + params = com.alibaba.fastjson.JSONObject.parseObject(paramsJson.toString()); + + + final JumpDetail fJumpDetail = jumpDetail; + final com.alibaba.fastjson.JSONObject fParams = params; + // 0-涓嶆樉绀� // 1-鏄剧ず final String url = obj.optString("Url"); @@ -581,14 +597,9 @@ if (!StringUtils.isBlank(url)) { tv_notice .setOnClickListener(new OnClickListener() { - @Override public void onClick(View v) { - startActivity(new Intent( - context, - BrowserActivity.class) - .putExtra("url", url)); - + JumpActivityUtil.jumpPage(getActivity(), fJumpDetail, fParams); } }); } -- Gitblit v1.8.0