123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- package com.edufound.reader.util;
- import android.app.Application;
- import com.edufound.reader.bean.BaiDuUserInfo;
- import com.edufound.reader.bean.UserBean;
- import java.io.File;
- public class Consts {
- private static Application mApplicAtion;
- private static int[] screenSize;
- private static UserBean mConstsUserBean;
- private static BaiDuUserInfo mConstsBaiDuUserBean;
- private static boolean isDebug = false;
- private static String privService = "http://m-xyyf-web.ai160.com/res/protocol/private-kwld.htm";
- private static String agreementServices = "http://m-xyyf-web.ai160.com/res/protocol/service-kwld.htm";
- private static String FinalApiUrl = "http://reader-api.efunbox.cn";
- private static String UMENG_CHANNEL = null;
- private static String UMENG_APPKEY = null;
- private static String UID = "";
- private static String defaultUid = "test";
- private static boolean isYFVip = false;
- private static String recordUpLoadFileUrl = "";
- private static File mRecordSaveFile = null;
- private static Boolean isNeedLogin = false;
- //天猫
- private static String TMAIL_USER_ID = "-1";
- private static String TMAIL_DEVICE_ID = "-1";
- private static boolean isHaveFlowerEvent = false;
- private static String EVENT_TYPE_FLOWER_URL = "http://activity.ai160.com/index.html";
- public static int eventPosition = 0;
- public static boolean isIsHaveFlowerEvent() {
- return isHaveFlowerEvent;
- }
- public static void setIsHaveFlowerEvent(boolean isHaveFlowerEvent) {
- Consts.isHaveFlowerEvent = isHaveFlowerEvent;
- }
- /**
- * @ TODO: 获取小红花活动地址
- */
- public static String getEventTypeFlowerUrl() {
- return EVENT_TYPE_FLOWER_URL;
- }
- public static Boolean getIsNeedLogin() {
- return isNeedLogin;
- }
- public static void setIsNeedLogin(Boolean isNeedLogin) {
- Consts.isNeedLogin = isNeedLogin;
- }
- public static File getmRecordSaveFile() {
- return mRecordSaveFile;
- }
- public static void setmRecordSaveFile(File mRecordSaveFile) {
- Consts.mRecordSaveFile = mRecordSaveFile;
- }
- public static String getRecordUpLoadFileUrl() {
- return recordUpLoadFileUrl;
- }
- public static void setRecordUpLoadFileUrl(String recordUpLoadFileUrl) {
- Consts.recordUpLoadFileUrl = recordUpLoadFileUrl;
- }
- public static String getUID() {
- return UID;
- }
- public static void setUID(String UID) {
- Consts.UID = UID;
- }
- public static String getDefaultUid() {
- return defaultUid;
- }
- public static void setDefaultUid(String defaultUid) {
- Consts.defaultUid = defaultUid;
- }
- public static Application getmApplicAtion() {
- return mApplicAtion;
- }
- public static void setmApplicAtion(Application mApplicAtion) {
- Consts.mApplicAtion = mApplicAtion;
- }
- public static int[] getScreenSize() {
- return screenSize;
- }
- public static void setScreenSize(int[] screenSize) {
- Consts.screenSize = screenSize;
- }
- public static UserBean getmConstsUserBean() {
- return mConstsUserBean;
- }
- public static void setmConstsUserBean(UserBean mConstsUserBean) {
- Consts.mConstsUserBean = mConstsUserBean;
- }
- public static String getPrivServiceUrl() {
- return privService;
- }
- public static String getAgreementServicesUrl() {
- return agreementServices;
- }
- public static boolean isIsDebug() {
- return isDebug;
- }
- public static void setIsDebug(boolean isDebug) {
- Consts.isDebug = isDebug;
- if (isDebug) {
- //测试环境
- FinalApiUrl = "http://reader-api.efunbox.cn";
- } else {
- FinalApiUrl = "https://reader-xiaoai-api.ai160.com";
- }
- }
- public static String getFinalApi() {
- return FinalApiUrl;
- }
- public static String getUMengChannel() {
- return UMENG_CHANNEL;
- }
- public static void setUMengChannel(String umengChannel) {
- UMENG_CHANNEL = umengChannel;
- }
- public static String getUMengAppKey() {
- return UMENG_APPKEY;
- }
- public static void setUMengAppKey(String appKey) {
- UMENG_APPKEY = appKey;
- }
- public static BaiDuUserInfo getmConstsBaiDuUserBean() {
- return mConstsBaiDuUserBean;
- }
- public static void setmConstsBaiDuUserBean(BaiDuUserInfo mConstsBaiDuUserBean) {
- Consts.mConstsBaiDuUserBean = mConstsBaiDuUserBean;
- }
- public static boolean hasOtherEvent = false;
- public static boolean isHasOtherEvent() {
- return hasOtherEvent;
- }
- public static void setHasOtherEvent(boolean hasOtherEvent) {
- Consts.hasOtherEvent = hasOtherEvent;
- }
- public static boolean isIsYFVip() {
- return isYFVip;
- }
- public static void setIsYFVip(boolean isYFVip) {
- Consts.isYFVip = isYFVip;
- }
- public static String getTmailUserId() {
- return TMAIL_USER_ID;
- }
- public static void setTmailUserId(String tmailUserId) {
- TMAIL_USER_ID = tmailUserId;
- }
- public static String getTmailDeviceId() {
- return TMAIL_DEVICE_ID;
- }
- public static void setTmailDeviceId(String tmailDeviceId) {
- TMAIL_DEVICE_ID = tmailDeviceId;
- }
- public static int getEventPosition() {
- return eventPosition;
- }
- public static void setEventPosition(int eventPosition) {
- Consts.eventPosition = eventPosition;
- }
- }
|