UrlConstants.java 5.48 KB
package com.wd.common.constant;


import com.wd.foundation.wdinterface.config.INetConfig;
import com.wd.foundation.wdinterface.constant.InterfaceConstant;
import com.wd.foundation.wdkitcore.router.ArouterServiceManager;

/**
 * 任务方便的地址常量集合
 * @author ypf
 * @version [V1.0.0, 2023/12/04]
 * @since V1.0.0
 */
public class UrlConstants {

    /**
     * 邀请好友链接
     */
    public static final String INVITE_FRIENDS_URL[] =
            {
                    "https://pd-people-sit.pdnews.cn/h/invite?hiddenTopNavigation=false",
                    "https://pd-people-uat.pdnews.cn/h/invite?hiddenTopNavigation=false",
                    "https://pd-people-dev.pdnews.cn/h/invite?hiddenTopNavigation=false",
                    "https://www.peopleapp.com/h/invite?hiddenTopNavigation=false"
            };

    /**
     * 成长值说明链接
     */
    public static final String GROWTH_EXPLAIN_URL[] =
            {
                    "https://pd-people-sit.pdnews.cn/h/grade?hiddenTopNavigation=false",
                    "https://pd-people-uat.pdnews.cn/h/grade?hiddenTopNavigation=false",
                    "https://pd-people-dev.pdnews.cn/h/grade?hiddenTopNavigation=false",
                    "https://www.peopleapp.com/h/grade?hiddenTopNavigation=false"
            };

    /**
     * 积分商城链接
     */
    public static final String POINTS_MALL_URL[] =
            {
                    "https://pd-people-sit.pdnews.cn/h/atv/shopping",
                    "https://pd-people-uat.pdnews.cn/h/atv/shopping",
                    "https://pd-people-dev.pdnews.cn/h/atv/shopping",
                    "https://www.peopleapp.com/h/atv/shopping"
            };

    /**
     * 我的奖品链接
     */
    public static final String MY_PRIZE_URL[] =
            {
                    "https://pd-people-sit.pdnews.cn/h/atv/prizeList",
                    "https://pd-people-uat.pdnews.cn/h/atv/prizeList",
                    "https://pd-people-dev.pdnews.cn/h/atv/prizeList",
                    "https://www.peopleapp.com/h/atv/prizeList"
            };

    /**
     * 个人信息收集清单
     * collection_personal_information
     */
    public static final String COLLECTION_PERSONAL_INFORMATION_URL[] =
            {
                    "https://pd-people-uat.pdnews.cn/h/atv/infolist",
                    "https://pd-people-uat.pdnews.cn/h/atv/infolist",
                    "https://pd-people-uat.pdnews.cn/h/atv/infolist",
                    "https://pd-people-uat.pdnews.cn/h/atv/infolist"
            };

    /**
     * 邀请好友链接
     * @return
     */
    public static String getInviteFriendsUrl(){
        INetConfig config = ArouterServiceManager.provide(InterfaceConstant.PATH_NET_CONFIG);
        String tag = config.getUrlTag();
        if (config.getBaseUrlSitTag().equals(tag)) {
            return INVITE_FRIENDS_URL[0];
        } else if (config.getBaseUrlUatTag().equals(tag)) {
            return INVITE_FRIENDS_URL[1];
        }else if (config.getBaseUrlDevTag().equals(tag)) {
            return INVITE_FRIENDS_URL[2];
        } else {
            //正式环境
            return INVITE_FRIENDS_URL[3];
        }
    }

    /**
     * 成长值说明链接
     * @return
     */
    public static String getGrowthExplainUrl(){
        INetConfig config = ArouterServiceManager.provide(InterfaceConstant.PATH_NET_CONFIG);
        String tag = config.getUrlTag();
        if (config.getBaseUrlSitTag().equals(tag)) {
            return GROWTH_EXPLAIN_URL[0];
        } else if (config.getBaseUrlUatTag().equals(tag)) {
            return GROWTH_EXPLAIN_URL[1];
        } else if (config.getBaseUrlDevTag().equals(tag)) {
            return GROWTH_EXPLAIN_URL[2];
        } else {
            //正式环境
            return GROWTH_EXPLAIN_URL[3];
        }
    }

    /**
     * 我的奖品链接
     * @return
     */
    public static String getMyPrizeUrl(){
//        String tag = NetManager.getUrlTag();
//        if (NetManager.BASE_URL_SIT.equals(tag)) {
//            return MY_PRIZE_URL[0];
//        } else if (NetManager.BASE_URL_UAT.equals(tag)) {
//            return MY_PRIZE_URL[1];
//        }else if (NetManager.BASE_URL_DEV.equals(tag)) {
//            return MY_PRIZE_URL[2];
//        } else {
            //正式环境
            return MY_PRIZE_URL[3];
//        }
    }

    /**
     * 积分商城链接
     * @return
     */
    public static String getPointsMallUrl(){
//        String tag = NetManager.getUrlTag();
//        if (NetManager.BASE_URL_SIT.equals(tag)) {
//            return POINTS_MALL_URL[0];
//        } else if (NetManager.BASE_URL_UAT.equals(tag)) {
//            return POINTS_MALL_URL[1];
//        }else if (NetManager.BASE_URL_DEV.equals(tag)) {
//            return POINTS_MALL_URL[2];
//        } else {
            //正式环境
            return POINTS_MALL_URL[3];
//        }
    }

    /**
     * 个人信息收集清单链接
     * @return
     */
    public static String getCollectionPersonalInformationListUrl(){
//        String tag = NetManager.getUrlTag();
//        if (NetManager.BASE_URL_SIT.equals(tag)) {
//            return COLLECTION_PERSONAL_INFORMATION_URL[0];
//        } else if (NetManager.BASE_URL_UAT.equals(tag)) {
//            return COLLECTION_PERSONAL_INFORMATION_URL[1];
//        }else if (NetManager.BASE_URL_DEV.equals(tag)) {
//            return COLLECTION_PERSONAL_INFORMATION_URL[2];
//        } else {
            //正式环境
            return COLLECTION_PERSONAL_INFORMATION_URL[3];
//        }
    }
}