ProcessUtils.java 23.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642

package com.wd.common.utils;

import android.content.Intent;
import android.text.TextUtils;

import com.google.gson.JsonObject;
import com.wd.base.log.Logger;
import com.wd.capability.router.WdRouterRule;
import com.wd.capability.router.data.ActionBean;
import com.wd.common.base.BaseApplication;
import com.wd.foundation.wdkit.constant.GloadLogicParams;
import com.wd.foundation.wdkit.constant.IntentConstants;
import com.wd.foundation.wdkit.constant.RouterConstants;
import com.wd.common.imageglide.ImageUtils;
import com.wd.foundation.bean.custom.comp.CompBean;
import com.wd.foundation.bean.custom.comp.CompDataSourceBean;
import com.wd.foundation.bean.custom.content.ContentBean;
import com.wd.foundation.bean.custom.content.ContentTypeConstant;
import com.wd.foundation.bean.custom.item.ItemBean;
import com.wd.foundation.bean.response.BottomNavBean;
import com.wd.foundation.bean.response.ChannelBean;
import com.wd.foundation.wdkit.utils.SpUtils;
import com.wd.foundation.wdkitcore.thread.ThreadPoolUtils;
import com.wd.foundation.wdkitcore.tools.AppContext;
import com.wd.foundation.wdkitcore.tools.StringUtils;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.HashMap;

/**
 * 跳转场景业务封装类<BR>
 *
 * @author zhangbo
 * @version [V1.0.0, 2020/7/24]
 * @since V1.0.0
 */
public class ProcessUtils implements IntentConstants {
    private static final String TAG = "ProcessUtils";

    /**
     * 首页底部导航栏业务数据
     */
    public static BottomNavBean navBean;

    /**
     * 视频频道的page id (唯一)
     */
    public static  String VideoChannelPageId = null;

    /**
     * 版面频道(电子报)
     */
    public static String CHANNEL_ID_EL_NEWS = "2006";

    // 播报频道(音频频道)
    public static String CHANNEL_ID_VOICE = "2066";

    // 直播
    public static String CHANNEL_ID_LIVE = "2061";

    private ProcessUtils() {
    }

    /**
     * 进入主页
     */
    public static void goMainPage() {
        WdRouterRule.getInstance().processAction(AppContext.getContext(), RouterConstants.PATH_MODULE_Main);
    }

    /**
     * 进入带顶部背景图的专题页
     */
    public static void goToAreaSubjectPage(String pageId, String titleName) {
        ActionBean actionBean = new ActionBean();
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty(IntentConstants.PAGE_TYPE, ContentTypeConstant.URL_TYPE_FIVE);
        jsonObject.addProperty(IntentConstants.PARAM_PAGE_ID, pageId);
//        jsonObject.addProperty(IntentConstants.PARAM_PAGE_TITLE, titleName);
        jsonObject.addProperty(IntentConstants.PARAM_PAGE_MANAGER, "ItemAreaSubjectLayoutManager");
        actionBean.paramBean.params = jsonObject.toString();
        actionBean.paramBean.pageID = RouterConstants.PATH_MODULE_COMMONFLOOR;
        WdRouterRule.getInstance().processAction(AppContext.getContext(), actionBean);
    }

    /**
     * 进入区域榜单页
     *
     * @param pageId
     */
    public static void goToAreaBillboardPage(String pageId, String titleName) {
        ActionBean actionBean = new ActionBean();
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty(IntentConstants.PARAM_PAGE_ID, pageId);
//        jsonObject.addProperty(IntentConstants.PARAM_PAGE_TITLE, titleName);
        jsonObject.addProperty(IntentConstants.PARAM_PAGE_MANAGER, "ItemFeatureBillboardLayoutManager");
        actionBean.paramBean.params = jsonObject.toString();
        actionBean.paramBean.pageID = RouterConstants.PATH_MODULE_COMMONFLOOR;
        WdRouterRule.getInstance().processAction(AppContext.getContext(), actionBean);
    }

    /**
     * 校验是否登录了
     */
    public static boolean checkLogin() {
        String userToken = SpUtils.getUserToken();
        return !TextUtils.isEmpty(userToken);
    }

    /**
     * 一键登录
     */
    public static void toOneKeyLoginActivity() {
//        if (FastClickUtil.isOneKeyLoginFastClick()) {
//            Logger.t(TAG).i("FastClickUtil.isFastClick()");
//            return;
//        }
//        if (SpUtils.getHttp377()) {
//            DssToastUtils.showShort(ResUtils.getString(R.string.force_login_out));
//        }
        // IOneKeyLoginHelper oneKeyLoginHelper = new OneKeyLoginHelperImpl();
        // oneKeyLoginHelper.toLogin();
    }

    /**
     * 跳转页面
     *
     * @param itemBean 跳转数据
     */
    public static void processPage(ItemBean itemBean) {
        Logger.t(TAG).d("processPage");
        if (itemBean == null) {
            Logger.t(TAG).w("processPage, itemBean is null");
            return;
        }
    }

    /**
     * 跳转管理页面
     *
     * @param pageId
     */
    public static void jumpChannelManage(String pageId) {
        // ActionBean actionBean = new ActionBean();
        // actionBean.paramBean.pageID = RouterConstants.PATH_MODULE_CHANNEL_EDIT;
        // JsonObject jsonObject = new JsonObject();
        // jsonObject.addProperty("originPageId", pageId);
        // actionBean.paramBean.params = jsonObject.toString();
        // WdRouterRule.getInstance().processAction(AppContext.getContext(), actionBean);
    }

    /**
     * 跳转短视频播放详情
     *
     * @param contentId
     * @param isShowComment 1为进入页面评论自动打开
     */
    public static void jumpShortPlay(String contentId, String isShowComment) {
        jumpShortPlay(contentId, isShowComment, "", "", "", "");
    }

    public static void jumpShortPlay(String contentId, String isShowComment, String from, String cover,
        String userIpInfo, String previewVideoUrl) {
        ActionBean actionBean = new ActionBean();
//        actionBean.paramBean.pageID = RouterConstants.PATH_SHORT_VIDEO_ACTIVITY;
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty(IntentConstants.CONTENT_ID, contentId);
//        jsonObject.addProperty(IntentConstants.FROM, from);
        jsonObject.addProperty(IntentConstants.PAGE_TYPE, GloadLogicParams.ColumnContentTypeValue);
        // 从列表点击进去观看第一条需要首帧图
//        jsonObject.addProperty(IntentConstants.FIRST_ITEM_COVER, cover);
        // 子线程加载下图片进行缓存
        preloadImage(cover);
        if (!StringUtils.isBlank(userIpInfo)) {
//            jsonObject.addProperty(IntentConstants.USER_IP_ADDRESS, userIpInfo);
        }
        // 携带视频地址
        if (!StringUtils.isBlank(previewVideoUrl)) {
//            jsonObject.addProperty(IntentConstants.PREVIEW_VIDEO_URL, previewVideoUrl);
        }
        actionBean.paramBean.params = jsonObject.toString();
        actionBean.type = isShowComment;
        WdRouterRule.getInstance().processAction(AppContext.getContext(), actionBean);
    }

    /**
     * 其它页面的业务类型换成 正规 业务类型
     *
     * @param type 内容类型 1:图文 2:视频 3:直播 4:纯文本 5 活动
     * @return 1:点播,2直播,3活动,4信息流广告,5专题,6链接
     */
    public static int changeProgramType(int type) {
        // 内容类型 1:图文 2:视频 3:直播 4:纯文本 5 活动
        // 跳转类型:1:点播,2直播,3活动,4信息流广告,5专题,6链接
        // -1 表示没有对应跳转类型
        int retType = -1;
        if (2 == type) {
            // 视频 -> 点播跳转
            retType = ContentTypeConstant.URL_TYPE_ONE;
        } else if (3 == type) {
            // 直播 -> 直播跳转
            retType = ContentTypeConstant.URL_TYPE_TWO;
        } else if (5 == type) {
            // 活动 -> 活动跳转
            retType = ContentTypeConstant.URL_TYPE_THREE;
        }
        return retType;
    }

    /**
     * 跳转详情
     * 1点播 2直播 3活动
     *
     * @param content content
     */
    public static void processPage(ContentBean content) {
        if (content == null) {
            Logger.t(TAG).w("processPage, action is null or getType is empty");
            return;
        }

        int type = Integer.parseInt(content.getObjectType());
        // if (ContentTypeConstant.URL_TYPE_THREE == type) {
        // // 3活动
        // String subType = content.getSubType();
        // String programId = content.getObjectId();
        // String innerUrl = content.getInnerUrl();
        // jumpActivity(subType, programId, innerUrl);
        //
        // } else if (ContentTypeConstant.URL_TYPE_SIX == type) {
        // // programType为6,跳转H5外链
        // goToH5Page(content);
        // } else
//        if (ContentTypeConstant.URL_TYPE_ONE == type) {
//            // programType为1,跳转点播
//            String videoUrl = "";
//            VideoItemBean videoItemBean = content.getContentInfo();
//            if (null == videoItemBean) {
//                return;
//            }
//
//            List<ContentVideoBean> contentVideos = videoItemBean.getContentVideo();
//            if (!ArrayUtils.isEmpty(contentVideos) && !content.isAdvDataFlag() && null != contentVideos.get(0)) {
//                videoUrl = contentVideos.get(0).getPreviewUrl();
//            }
//            jumpShortPlay(content.getObjectId(), content.getIsShowComment(), content.getFromPage(),
//                content.contentInfo.getPreviewUrl(), content.getUserIpAddress(), videoUrl);
//            // } else if (ContentTypeConstant.URL_TYPE_TWO == type) {
//            // // programType为2,跳转 直播
//            // String liveid = content.getObjectId();
//            // dealJumpLive(liveid,"");
//            // } else if (ContentTypeConstant.URL_TYPE_FOUR == type) {
//            // // 4信息流广告
//            // goToH5Page(content);
//            //// H5ContainerUtils.startCommonH5Url(content.getLinkUrl(), content.getTitle(), false);
//        } else if (ContentTypeConstant.URL_TYPE_FIVE == type) {
//            // 5专题
//            String pageId = content.topicInfo == null ? null : content.topicInfo.pageId;
//            String title = content.getTitle();
//            if (!TextUtils.isEmpty(pageId)) {
//                goToAreaSubjectPage(pageId, title);
//            }
//
//            // } else if (ContentTypeConstant.URL_TYPE_SEVEN == type) {
//            // // 7 榜单详情
//            // String pageId = content.getPageId();
//            // String title = content.getTitle();
//            // if (!TextUtils.isEmpty(pageId)) {
//            // goToAreaBillboardPage(pageId, title);
//            // }
//        } else if (ContentTypeConstant.URL_TYPE_EIGHT == type) {
//            goH5DetailPage(content.getContentInfo().getH5Link());
//        } else {
//            // 提示"请升级至最新版本体验完整功能"
//            DssToastUtils.showShort(AppContext.getContext().getString(com.people.common.R.string.coming_soon));
//        }
    }

    /**
     * 跳转播放详情页
     *
     * @param programId
     */
    public static void jumpVideoDetailPage(String programId) {
        ActionBean actionBean = new ActionBean();
        JsonObject jsonObject = new JsonObject();
//        jsonObject.addProperty(IntentConstants.VOD_ID, programId);
        // jsonObject.addProperty(IntentConstants.VOD_ID, CommonConstant.TEST_VIDEO_ID);
        actionBean.paramBean.params = jsonObject.toString();
//        actionBean.paramBean.pageID = RouterConstants.PATH_LIVE_DETAIL_ACTIVITY;
        WdRouterRule.getInstance().processAction(AppContext.getContext(), actionBean);
    }

    public static void preloadImage(String firstItemCover) {
        if (!TextUtils.isEmpty(firstItemCover)) {
            ThreadPoolUtils.backgroundSubmit(new Runnable() {
                @Override
                public void run() {
                    ImageUtils.getInstance().preloadImage(AppContext.getContext(), firstItemCover);
                }
            });
        }
    }

    /**
     * 链接跳转
     * skipType 1.跳转原生页面,带参数:(视频、直播、活动) 2.跳转原生页面,不带参数:(搜索、设置、登录、个人中心)
     * 3.跳转H5页面(APP内部打开) 4.跳转H5页面(APP外部打开) 5 跳转拉起第三方页面
     * neatlyParameter 第一个参数专题页title 第二参数创作者id
     */
    public static void linkJump(String linkurl, String... neatlyParameter) {
        // displayschedulesystemapp://dss.app/openwith?contentType=video&contentld=124 contentld
        // ?后面接参数 contentType=subjectpage 专题页 contentType=video 视频详情页 ;contentld专题页面ID或视频内容ID
        try {
            String[] openwith = linkurl.split("openwith\\?");
            if (openwith.length < 2) {
                // 进入默认跳转页面
                ProcessUtils.pullDefaultPage();
                return;
            }
            String parameter = openwith[1];
            String[] param = parameter.split("&");

            HashMap<String, String> result = new HashMap();
            for (String str : param) {
                String[] eq = str.split("=", 2);
                if (eq.length > 1) {
                    String decodeUrl = eq[1];
                    try {
                        // 使用的时候解码
                        decodeUrl = URLDecoder.decode(decodeUrl, "utf-8");
                    } catch (UnsupportedEncodingException e) {
                        e.printStackTrace();
                    }
                    result.put(eq[0], decodeUrl);
                }
            }
            // // 兼容老版 链接
            // if (linkurl.contains("pageType=subjectpage")) {
            // ProcessUtils.goToAreaSubjectPage(result.get("pageId"), neatlyParameter.length == 0 ? "" :
            // neatlyParameter[0]);
            // return;
            // }
            // if (linkurl.contains("pageType=fanslist")) {
            // jumpMyFollowList("1");
            // return;
            // }
            // if (linkurl.contains("pageType=homepage")) {
            // LiveDataBus.getInstance().with(EventConstants.SWITCH_HOME_TAB).postValue(0);
            // ProcessUtils.goMainPage();
            // return;
            // }
            // switch (result.get("skipType")) {
            // case "1":
            switch (result.get("contentType")) {
                // 视频详情页面
                case "video":
                    ProcessUtils.jumpShortPlay(result.get("contentld"), "");
                    break;
                // // 直播详情页面
                // case "live":
                // dealJumpLive(result.get("contentld"), "");
                // break;
                // // 活动详情页
                // case "activity":
                // ProcessUtils.jumpActivity(ContentBean.SubType.COLLECT, result.get("contentld"), "");
                // break;
                // // 活动详情页
                // case "accountowner":
                //
                // break;
                // 专题页详情
                case "subjectpage":
                    ProcessUtils.goToAreaSubjectPage(result.get("contentld"),
                        neatlyParameter.length == 0 ? "" : neatlyParameter[0]);
                    break;
                // // 跳转合集
                // case "videoserials":
                // ProcessUtils.jumpVideoAlbumDetail(result.get("serialsId"),
                // CommonConstant.H5_PULL_ALBUM_ENTRY);
                // break;
                default:
                    // 进入默认跳转页面
                    ProcessUtils.pullDefaultPage();
                    break;
            }
            // break;
            // case "2":
            // switch (result.get("contentType")) {
            // // 搜索
            // case "search":
            // toSearchActivity();
            // break;
            // // 登录
            // case "login":
            // toOneKeyLoginActivity();
            // break;
            // // 我的粉丝列表
            // case "fanslist":
            // jumpMyFollowList("1");
            // break;
            // // 回 首页列表
            // case "homepage":
            // LiveDataBus.getInstance().with(EventConstants.SWITCH_HOME_TAB).postValue(0);
            // ProcessUtils.goMainPage();
            // break;
            // default:
            // //进入默认跳转页面
            // ProcessUtils.pullDefaultPage();
            // break;
            // }
            // break;
            // case "3":
            // //外链
            // if (linkurl.contains("type=h5")) {
            // if ("1".equals(result.get("isLogin"))) {
            // toOneKeyLoginActivity();
            // } else {
            // ProcessUtils.jumpH5Page(result.get("url"));
            // }
            //
            // }
            // break;
            // case "4":
            // break;
            // case "5":
            // break;
            // default:
            // //进入默认跳转页面
            // ProcessUtils.pullDefaultPage();
            // break;
            // }

        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    /**
     * 进入启动页
     */
    public static void startWelcomeActivity() {
        ActionBean actionBean = new ActionBean();
        actionBean.paramBean.pageID = RouterConstants.PATH_WELCOME_ACTIVITY;
        WdRouterRule.getInstance()
            .processAction(AppContext.getContext(), actionBean,
                Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    }

    /**
     * 未匹配到拉起的页面,默认跳转
     */
    public static void pullDefaultPage() {
        if (!SpUtils.isFirstAgreementFlag()
            && BaseApplication.getInstance().getLifecycleCallbacks().hasActivity("AppMainActivity")) {
            BaseApplication.getInstance().getLifecycleCallbacks().makeMainTaskToFront();
        } else {
            startWelcomeActivity();
        }
    }

    /**
     * 组件跳转页面
     *
     * @param compBean
     */
    public static ContentBean compJumpPage(CompBean compBean) {
        // 组件跳转的基本信息转换成 ContentBean对象
        ContentBean bean = new ContentBean();
        // if(compBean.positionList != null && compBean.positionList.size() > 0
        // && compBean.positionList.get(0) != null
        // && compBean.positionList.get(0).posObjectList != null
        // && compBean.positionList.get(0).posObjectList.size()>0
        // && compBean.positionList.get(0).posObjectList.get(0) != null){
        //
        // bean.setObjectType(compBean.positionList.get(0).posObjectList.get(0).objectType);
        // bean.setObjectId(compBean.positionList.get(0).posObjectList.get(0).objectId);
        // if(compBean.positionList.get(0).posObjectList.get(0).topicInfo != null
        // && compBean.positionList.get(0).posObjectList.get(0).topicInfo.size()>0
        // && compBean.positionList.get(0).posObjectList.get(0).topicInfo.get(0)!=null){
        // bean.setTopicInfo(compBean.positionList.get(0).posObjectList.get(0).topicInfo.get(0));
        // bean.setNewsSummary(compBean.positionList.get(0).posObjectList.get(0).topicInfo.get(0).description);
        // }
        // bean.setNewsTitle(compBean.positionList.get(0).posObjectList.get(0).title);
        // }
        //// bean.setObjectLevel(compBean.getObjectLevel());
        // bean.setPageId(compBean.getPageId());
        //
        //// bean.setChannelInfoBean(compBean.getChannelInfoBean());
        //// bean.setBottomNavId(compBean.getBottomNavId());
        //// bean.setSourceInterfaceVal(compBean.getSourceInterfaceVal());
        // bean.setCompId(compBean.getId());
        //// bean.setTopicTemplate(compBean.getTopicTemplate());
        //
        //// bean.setRecommend(compBean.getRecommend());
//        bean.setPageId(compBean.getPageId());
//        bean.setGroupId(compBean.getGroupId());
//        bean.setSortValue(compBean.sortValue);
//        bean.setObjectId(compBean.objectId);
//        bean.setTitle(compBean.objectTitle);
//        bean.setObjectType(compBean.objectType);
//        bean.topicInfo = compBean.topicInfo;
        // 页面跳转方法
        processPage(bean);

        return bean;
    }

    /**
     * 进入H5页面
     *
     * @param linkUrl h5页面地址
     */
    public static void goH5DetailPage(String linkUrl) {
        ActionBean actionBean = new ActionBean();
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty(IntentConstants.WEBSITES_SEARCHURL, linkUrl);
        actionBean.paramBean.params = jsonObject.toString();
//        actionBean.paramBean.pageID = RouterConstants.PATH_MODULE_H5_DETAIL;
        WdRouterRule.getInstance().processAction(AppContext.getContext(), actionBean);
    }


    /**
     * 检测当前频道是否是特殊频道
     *
     * @param tabBean
     * @return
     */
    public static boolean checkSpcialChannle(ChannelBean tabBean) {
        String channelId = tabBean.getChannelId();// 频道id
        if (CHANNEL_ID_EL_NEWS.equals(channelId)) {
            // 跳转电子报
            return true;
        } else if (CHANNEL_ID_VOICE.equals(channelId)) {
            // 音频频道
            return true;
        }
        return false;
    }

    /**
     * 特殊频道跳转页面方法
     *
     * @param tabBean
     * @return true:表示完成跳转;false:不支持跳转
     */
    public static boolean specialChannelJumpPage(ChannelBean tabBean) {

        boolean jump = false;
        String channelId = tabBean.getChannelId();// 频道id
        if (CHANNEL_ID_EL_NEWS.equals(channelId)) {
            jump = true;
            // 跳转电子报
//            goToPaperActivity();
        } else if (CHANNEL_ID_VOICE.equals(channelId)) {
            jump = true;
            // 音频频道
//            goTestAudio(tabBean.getPageId(), channelId);
        }

        return jump;
    }


    /**
     * 特殊频道跳转页面方法
     *
     * @param tabBean
     * @return true:表示完成跳转;false:不支持跳转
     */
    public static boolean specialChannelJumpPage(ContentBean tabBean) {

        boolean jump = false;
        String channelId = tabBean.getObjectId();// 频道id
        if (CHANNEL_ID_EL_NEWS.equals(channelId)) {
            jump = true;
            // 跳转电子报
//            goToPaperActivity();
        } else if (CHANNEL_ID_VOICE.equals(channelId)) {
            jump = true;
            // 音频频道
//            goTestAudio(tabBean.getPageId(), channelId);
        }

        return jump;
    }

    /**
     * 检测组件的“more”视图是否显示
     *
     * @param compBean
     * @return
     */
    public static boolean checkCompMoreShow(CompBean compBean) {

        boolean showMore = checkMoreJumpPage(compBean);
        if (!showMore) {
            return true;
        } else {
            String objectType = compBean.getObjectType();
            if (TextUtils.isEmpty(objectType)) {
                return false;
            } else {
                int type = Integer.parseInt(objectType);
                if (ContentTypeConstant.URL_TYPE_ZERO == type) {
                    return false;
                } else {
                    return true;
                }
            }
        }
    }


    /**
     * 检测组件more跳转
     *
     * @param compBean
     * @return true : 表示正常业务跳转;false:指定特殊页面跳转
     */
    public static boolean checkMoreJumpPage(CompBean compBean) {

        boolean loacalJump = true;

        String dataSourceType = compBean.getDataSourceType();

        if (!TextUtils.isEmpty(dataSourceType)) {
            if (CompDataSourceBean.LIVE_HORIZONTAL_CARD.equals(dataSourceType)
                    || CompDataSourceBean.LIVE_RESERVATION.equals(dataSourceType)
                    || CompDataSourceBean.LIVE_MONTHLY_RANKING.equals(dataSourceType)) {
                loacalJump = false;
            }
        }

        return loacalJump;

    }
}