package com.zxhl.cms.common;

import com.zxhl.cms.AppContext;
import com.zxhl.cms.R;

import static com.zxhl.cms.common.NetConfig.Environment.DEV;
import static com.zxhl.cms.common.NetConfig.Environment.PRODUCT;

/**
 * Created by gaoleichao on 2018/5/2.
 */

public class NetConfig {


    public static enum Environment {

        DEV,

        TEST,

        PRODUCT

    }

    // 根据调试选项更新环境
    public static Environment sEnvironment = PRODUCT;// 当前环境
    public static String BASE_WEB_URL = "";
    public static String BASE_URL = "";
    public static String BASE_NEW_URL = "";
    public static String BASE_FEED_URL = "";
    public static final String URL_REPORT_BASE = "http://report.zhangxinhulian.com/";
    public static final String HOME_BANNER_BASE_URL = "https://bs.zhangxinhulian.com/";

    public static void setBase_Url(Environment s) {
        sEnvironment = s;
        switch (sEnvironment) {
            case PRODUCT:
                BASE_URL = "http://feedapi.zhangxinhulian.com/";
                BASE_WEB_URL = "http://feedapi.zhangxinhulian.com/";
                BASE_NEW_URL = "http://feedapi.zhangxinhulian.com/";
                BASE_FEED_URL = "http://feedapi.zhangxinhulian.com/";
                break;
            case TEST:
                BASE_URL = "https://sandbox.huolea.com/";
                BASE_WEB_URL = "https://www.huolea.com/";
                BASE_NEW_URL = "http://newapi.huolea.com/";
                BASE_FEED_URL = "http://feedapi.huolea.com/";
                break;
            default:
                BASE_URL = "http://feedapitest3.zhangxinhulian.com/";
                BASE_WEB_URL = "http://feedapitest3.zhangxinhulian.com/";
                BASE_NEW_URL = "http://feedapitest3.zhangxinhulian.com/";
                BASE_FEED_URL = "http://feedapitest3.zhangxinhulian.com/";
                break;
        }
    }

    public static class Invite {
        public static final String URL_INVITE_AWARD = "api/v1/invite/inviteAward";
        public static final String URL_INVITE_POSTER = "api/v1/invite/genPoster";
        public static final String URL_INVITE_WITHDRAWUSERLIST = "api/v1/invite/withdrawUserList";
        public static final String URL_INVITE_INVITEURL = "api/v1/invite/genInviteUrl";
        public static final String URL_INVITE_PROTEGELIST = "api/v1/invite/protegeList";
        public static final String URL_INVITE_SHOWSTATUS = "api/v1/award/showStatus";
        public static final String URL_INVITE_SHAREDATA = "api/v1/share/getShareData";
    }

    public static class News {
        public static final String URL_NEWS_TABLIST = "api/v1/info/tabList";
        public static final String URL_NEWS_USERTABLIST = "api/v1/info/userTabList";
        public static final String URL_NEWS_STOREINFOTAB = "api/v1/info/storeInfoTab";
        public static final String URL_NEWS_INFODETAIL = "api/v1/info/getInfoDetailData";
        public static final String URL_NEWS_STOREINFOCOIN = "api/v1/coin/storeInfoCoin";
        public static final String URL_NEWS_HOTSEARCH = "api/v1/info/getTopKey";

        public static final String URL_NEWS_TIPS = "api/v1/info/frontData";

        public static final String URL_FLOAT_ICON = "api/v1/navigate/navigateList";

        public static final String URL_REDPACKET = "api/v1/info/redPacketData";

        public static final String URL_GET_EXIT_DATA = "api/v1/eac/getDlgData";


        public static final String URL_SAVE_CONTACTS = "api/v1/udc/spn";

        //        public static final String URL_NEWS_DFURL = "http://106.75.3.64/newsapi/newspool";
        public static final String URL_NEWS_DFURL = "http://newsapicom.dftoutiao.com/newsapi/newspool";


        public static final String URL_NEWS_URL = "v1/news/fetchWithAds";

        public static final String URL_NEWS_IMEI_URL = "http://weimiinfo.dftoutiao.com/appidfa_encryption/appidfa";

        public static final String URL_NEWS_QUERY_COLLECT = "api/v1/info/collectStatus";

        public static final String URL_NEWS_COLLECT = "api/v1/info/collect";

        public static final String URL_NEWS_UN_COLLECT = "api/v1/info/cancelCollect";

        public static final String URL_NEWS_COLLECT_LIST = "api/v1/info/collectList";

        public static final String URL_NEWS_GET_CITYINFO = "api/v1/cityInfo";

    }

    public static class Video {
        public static final String URL_VIDEO_TAB = "app/v1/game/face/tab";
        public static final String URL_NEWS_USERTABLIST = "api/v1/info/userTabList";
        public static final String URL_NEWS_STOREINFOTAB = "api/v1/info/storeInfoTab";

        public static final String URL_NEWS_VIDEOS_FETCH_WITH_ADS = "v2/videos/fetchWithAds";//获取视频列表
        public static final String URL_NEWS_VIDEO_CHANNELS = "v2/videos/channels";//get获取视频频道列表 post保存用户频道

        public static final String URL_NEWS_VIDEO_LIST = "app/v1/game/face/pageInfo";
        public static final String URL_NEWS_VIDEO_INFO_V2 = "v2/videos/content";
        public static final String URL_NEWS_VIDEO_INFO_V1 = "v1/videos/content";
        public static final String URL_ALI_IMG_UPLOAD = "app/v1/game/face/imageUpload";
        public static final String URL_TX_IMG_UPLOAD = "app/v2/game/face/imageUpload";
        public static final String URL_IMG_LIST = "app/v1/game/face/getUserImgList";
        public static final String URL_ALI_VIDEO_SYNTHESIS = "app/v1/game/face/videoSynthesis";
        public static final String URL_TX_VIDEO_SYNTHESIS = "app/v2/game/face/videoSynthesis";
        public static final String URL_ALI_VIDEO_QUERY = "app/v1/game/face/getResult";
        public static final String URL_TX_VIDEO_QUERY = "app/v2/game/face/getResult";
    }

    public static class User {
        public static final String URL_USER_DEVICE_LOGIN = "app/v1/auth/tourist-login";
        public static final String URL_USER_GET_USERINFO_ = "app/v1/game/xiaoxiang/user";
        public static final String URL_PAY_CONFIG = "app/v2/location/user/pay-config";//獲取配置列表

        public static final String URL_PAY_ORDER = "app/v2/location/user/pay";//請求支付訂單
        public static final String URL_PAY_RIGHTS_ORDER = "app/v1/location/equitCard/pay";//請求支付訂單
        public static final String URL_PAY_SHOP_ORDER = "app/v3/location/user/pay";//商城里支付
        public static final String VERIFY_PAY_URL = "app/v1/location/user/pay-order";
        public static final String VERIFY_PAY_SWITCH_URL = "/app/v1/game/face/config";
        public static final String USER_FREE_PROGRESS = "/app/v1/location/user/userFreeTrialV3Progress";//试用进度
        public static final String USER_FREE_RECEIVE = "/app/v1/location/user/freeTrialV3";//试用领取
        public static final String USER_PAY_CONFIG = "/app/v2/location/user/pay-config";//支付配置-v2 - 支持打折 和 优惠卷
        public static final String USER_FREE_REPORT = "/app/v1/location/user/freeReport";//视频上报
        public static final String USER_CHECK_FREE_TRIALV3 = "/app/v1/location/user/checkFreeTrialV3";//试用V3 - 判断弹窗
        public static final String USER_IS_WX_LOGIN = "app/v1/waimai/isWxLogin";//试用V3 - 判断弹窗
        public static final String USER_WX_SHARE = "app/v1/game/remote/friends/share";//试用V3 - 判断弹窗
        public static final String APP_NOVEL_INFO = "app/v1/novel/info";//配置信息接口
        public static final String AUTH_WX_LOGIN = "app/v1/auth/wxLogin";//微信登录
        public static final String USER_SEND_CODE = "app/v1/auth/sendCode";//发送验证码
        public static final String USER_PHONE_CODE_LOGIN = "app/v3/auth/phoneCodeLogin";//验证码登录
        public static final String URL_VERSION = "app/v1/version";
    }

    public static class Task {
        public static final String URL_TASK_NEWTASKLIST = "api/v1/userTask/newUserTaskList";
        public static final String URL_TASK_DAILYTASKLIST = "api/v1/userTask/dailyUserTaskList";
        public static final String URL_TASK_QUERYTASK = "api/v1/userTask/getAdStatus";
        public static final String URL_TASK_GETSIGNLIST = "api/v1/signIn/getSignRecords";
        public static final String URL_TASK_SIGNIN = "api/v1/signIn/signIn";

        public static final String URL_TASK_NAV_DESC = "api/v1/cfg/taskPageConfig";
    }

    public static class Other {
        public static final String URL_SEC_CHECK = "api/v1/sec/check";
        public static final String URL_CFG_NAV = "api/v1/cfg/getModel";
        public static final String URL_ACTIVITY = "api/v1/activity/getActivity";

        public static final String URL_ZFB = "api/v1/cfg/getZfb";

        public static final String URL_STATUS = "api/v1/ta/getStatusV2";
        public static final String URL_AWARD = "api/v1/ta/awardV2";

        public static final String URL_CONFIG = "api/v1/cfg/globalCfg";

        public static final String URL_EVENT = URL_REPORT_BASE + "logCollection/log/v1/userLogCollection";

    }

    public static class Ad {
        public static final String URL_AD_CLOUDCONFIG = "api/v1/cloudconfig";
        public static final String URL_AD_SOGOUCFG = "api/v1/cfg/getSougouCfg";
        public static final String URL_NEWS_FEEDADLIST = "api/v1/info/feedAdList";
        public static final String URL_AD_GETADS = "api/v1/ad/getAds";
        public static final String URL_AD_UPLOAD = "api/v1/report/adLog";
        public static final String URL_USER_UPLOAD = "api/v1/report/uLog";
        public static final String URL_AD_GETADSEXT = "api/v1/ad/getAdsExt";
        public static final String URL_AD_GET_AD_SHARE = "api/v1/ad/getShareAds";

        public static final String HOME_BANNER_DATA_URL = HOME_BANNER_BASE_URL + "v4/ads";

    }

    public static class ShenMi {
        public static final String URL_GET_AD = "v10/getad";
    }

    public static class H5 {
        public static String WEB_URL_USER = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/person_app.html?webName="+ AppContext.get().getResources().getString(R.string.app_name);

        public static String WEB_URL_PRIVACY = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/privacy_app.html?appName="+AppContext.get().getResources().getString(R.string.app_name)+"APP&company=北京掌心互联科技有限公司&money=虚拟货币&webName="+AppContext.get().getResources().getString(R.string.app_name);

        public static String WEB_URL_RULE = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/huafeiRule.html";

        public static String WEB_URL_ABOUT_US = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/aboutMe.html?version=" + Constant.Param.vn + "&appName="+AppContext.get().getResources().getString(R.string.app_name)+"&company=北京掌心互联科技有限公司";

        public static String WEB_URL_CUSTOMER_SERVICE = "https://1568685.s4.udesk.cn/im_client/?web_plugin_id=43807";
        public static String WEB_URL_CUSTOMER_SERVICE_ERROR = "https://h5.zhangxinzhixun.com/to_refund";
        public static String WEB_URL_ZENGZHI_SERVICE = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/xxsq_zz_server.html";
        public static String WEB_URL_BUYER_KNOW = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/buyerKnow.html?version=" + Constant.Param.vn + "&appName="+AppContext.get().getResources().getString(R.string.app_name)+"&company=北京掌心互联科技有限公司";
        public static String WEB_URL_WEEK_RULE = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/week_activity_rule.html";
        public static String WEB_URL_INVITE;
        public static String WEB_URL_H5_PAY = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/pay_order.html";

    }

    public static class Box {
        public static final String HOME_BOX_LIST = "app/v2/game/box/boxList";//盲盒列表
        public static final String HOME_BOX_INFO = "app/v3/game/box/boxInfo";//盲盒详情
        public static final String HOME_BOX_MARQUEE = "app/v1/game/box/marquee";//跑马灯
        public static final String HOME_BOX_GOODS = "app/v1/game/box/boxInfo/goods";//盲盒详情 - 奖品池
        public static final String HOME_BOX_GET_ADDRESS = "app/v1/game/box/address";//获取地址
        public static final String HOME_BOX_DEL_ADDRESS = "app/v1/game/box/address/del";//删除地址
        public static final String HOME_BOX_EDIT_ADDRESS = "app/v1/game/box/address";//新增或修改地址
        public static final String HOME_BOX_DEPOT = "app/v1/game/box/depot";//用户仓库
        public static final String HOME_BOX_LOTTERY = "app/v2/game/box/lottery";//单抽
        public static final String HOME_BOX_LOTTERY_CARD = "app/v4/game/box/lotteryCard";//单抽-道具卡版本
        public static final String HOME_BOX_LOTTERY_SS_CARD = "app/v1/game/box/lotteryEpicCard";//单抽-史诗卡
        public static final String HOME_BOX_FIVE_LOTTERY = "app/v2/game/box/lotteryFive";//5连抽奖
        public static final String HOME_BOX_DUO_CHOU_LOTTERY_CARD = "app/v4/game/box/lotteryCardNum";//多抽
        public static final String HOME_BOX_DUO_SELECT_LOTTERY_CARD = "app/v5/game/box/lotteryCardNum";//选择抽取
        public static final String HOME_BOX_FIVE_LOTTERY_CARD = "app/v4/game/box/lotteryFiveCard";//5连抽奖-道具卡版本
        public static final String HOME_BOX_LOTTERY_TEST = "app/v1/game/box/lotteryTest";//盲盒抽取 - 试玩（单抽）
        //public static final String HOME_BOX_ORDER = "app/v1/game/box/order";//用户订单
        public static final String HOME_BOX_ORDER = "app/v1/game/xiaoxiang/user/order";//用户订单
        public static final String HOME_BOX_RECOVER = "app/v2/game/box/recover";//回收物品
        public static final String HOME_BOX_SHIPPING = "app/v5/game/box/getShipping";//用户仓库 - 获取运费
        public static final String HOME_BOX_SHOP_COST = "app/v4/game/box/getShipping";//用户仓库 - 商城购买获取费用
        public static final String HOME_BOX_CREATE_SHAOPPING_ORDER = "app/v1/game/box/createShippingOrder";//创建发货订单
        public static final String HOME_BOX_SHOP_BUY_ONLY = "app/v1/game/box/shopBuyOnly";//创建购买商城物品订单
        public static final String HOME_BOX_NEW_PEOPLE = "app/v1/game/box/newBox";//新人盲盒
        public static final String HOME_BOX_NEW_PEOPLE_29 = "app/v1/game/box/newBoxV2";//新人盲盒 39标价29的
        public static final String HOME_BOX_NEW_PEOPLE_24 = "app/v1/game/box/newBoxV3";//新人盲盒 29标价24的
        public static final String HOME_BOX_VERIFICATION = "app/v1/game/box/rechargeVerification";//用户是否可以充值验证
        public static final String HOME_BOX_GOODS_PICK_UP = "app/v1/game/box/goodsPickUp";//用户仓库 - 虚拟商品提货
        public static final String HOME_BOX_CANCE_CHOOSE = "app/v1/game/box/chose";//取消新人宝箱
        public static final String HOME_BOX_TAB = "app/v1/game/box/tabV2";//tab列表
        public static final String HOME_BOX_APP_INFO = "app/v1/app_info";//配置信息
        public static final String HOME_BOX_POPUPS = "app/v1/game/box/popUps";//用户退出 - 挽留弹窗
        public static final String HOME_BOX_FEED_BACK = "app/v1/user/feedback";//用户反馈
        public static final String HOME_BOX_LOGIN_OUT = "app/v2/auth/logout";//注销

        public static final String HOME_BOX_PROP_CARD_LIST = "app/v3/game/box/boxInfo/cardList";//道具卡列表
        public static final String HOME_BOX_CARD_RE_PUMPING = "app/v4/game/box/lotteryCardRePumping";//单抽重抽
        public static final String HOME_BOX_CARD_RE_PUMPING_FIVE = "app/v3/game/box/lotteryCardRePumpingFive";//五连抽重抽
        public static final String HOME_BOX_CASH_LOG = "app/v2/game/box/cashLog";//魔币明细
        public static final String HOME_BOX_ORDER_SHOP = "app/v1/game/box/orderShop";//商城 - 用户订单
        public static final String HOME_BOX_INFO_BOXLIST = "app/v1/game/box/boxList/info";//个人中心 - 推荐
        public static final String HOME_BOX_NOTICE = "app/v1/game/box/notice";//公告
        public static final String HOME_BOX_OPEN_APP = "app/v1/game/box/openApp";//打开app
        public static final String HOME_BOX_CLOSE_APP = "app/v1/game/box/closeApp";//关闭app
        public static final String HOME_BOX_POP_UP = "app/v1/game/box/popUp";//是否弹窗
        public static final String HOME_BOX_LOTTERY_PROMOTION = "app/v1/game/box/lotteryPromotion";//盲盒抽取 - 粗细弹窗
        public static final String HOME_BOX_CUMULATIVE_TREASURECHEST = "app/v1/game/box/cumulativeTreasureChest";//宝箱列表
        public static final String HOME_BOX_SIGN_LIST = "app/v2/game/common/signList";//签到奖励列表 - v2 - 带进度天数的
        public static final String HOME_BOX_SIGN_RECEIVE = "app/v1/game/common/signReceive";//签到奖励领取
        public static final String HOME_BOX_WeekAch = "app/v1/game/box/cumulativeTreasureChest";//周内成就,宝箱列表
        public static final String HOME_BOX_WeekAch_RECIVE = "app/v1/game/box/new/cumulativeTreasureChestReceive";//周内成就领取
        public static final String HOME_BOX_GET_FREE_CARD = "app/v1/game/box/getCard";//免费重抽卡领取
        public static final String HOME_BOX_DISCOUNT_BOX = "app/v1/game/box/getDisCountBox";//折扣盒子信息
        public static final String HOME_BOX_LOTTERY_BOX_SELECT = "app/v1/game/box/lotteryBoxActivity";//电竞风暴 抽奖
        public static final String HOME_BOX_LOTTERY_BOX_RECORD = "app/v1/game/box/lotteryBoxActivity/record";//抽取记录
        public static final String HOME_BOX_LOTTERY_BOX_RESULT_DETAIL = "app/v1/game/box/lotteryBoxActivity/record/detail";//抽奖结果详情

    }

    //
    public static class QY {
        public static final String QY_JGQ_CARD_LIST = "app/v1/game/xiaoxiang/equitCardList";//金刚区权益列表
        public static final String QY_JGQ_CARD_DETAIL = "app/v1/game/xiaoxiang/equitCardList/detail";//获取权益详情
        public static final String XX_GOODS_SEARCH = "app/v1/game/xiaoxiang/search";//搜索
        public static final String XX_GOODS_GUESS_LIKE = "app/v1/game/xiaoxiang/guessLike";//猜你喜欢
        public static final String XX_GOODS_CONVERT_LINK = "app/v1/game/xiaoxiang/convertLink";//转链
        public static final String XX_GOODS_ITEM_DETAIL = "app/v1/game/xiaoxiang/itemDetail";//图文详情
        public static final String XX_HOME_BANNER = "app/v1/game/xiaoxiang/banner";//Banner
        public static final String XX_GOODS_FETCHALL_CARD = "app/v1/game/xiaoxiang/fetchAllCard";//话费券列表
    }

    public static class FlashSale {
        public static final String HOME_FLASH_SALE_SKILL = "app/v1/game/xiaoxiang/skill";//秒杀时间表
        public static final String HOME_FLASH_SALE_BEGIN_SKILL = "app/v1/game/xiaoxiang/skill";//开始秒杀
        public static final String HOME_FLASH_SALE_SKILL_LIST = "app/v1/game/xiaoxiang/skill/list";//秒杀商品列表
        public static final String HOME_FLASH_SALE_UPDATE_ORDER_ADDRESS = "app/v1/game/xiaoxiang/update/order/addr";//关联秒杀订单地址(商品秒杀专用)
    }


}
