config.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import dayjs from "dayjs";
  2. const getNowDate = () => {
  3. return dayjs().format("YYYYMMDD")
  4. }
  5. class Config {
  6. static BASE_URL = "https://edu.jiaxintech.com";
  7. static API = Config.BASE_URL + "/prod-api";//测试地址
  8. static HTML_API = Config.BASE_URL + "/wx_html/";//测试网页地址
  9. static NAMESPACE = "edu";//本地存储 命名空间
  10. static LOG_ENABLE = true;//日志开关,生产会自动关闭,主要是调试的时候动态开关
  11. static IM_LOG_LEVEL = 1;//IM日志等级
  12. static VERSION_CODE = 222;//版本号,设置成0 启用线上发布版本号
  13. static CD_TIME = 60 * 1000;//短信验证码时间
  14. static LIVE_CD_TIME = 30 * 1000;//直播互动超时时间
  15. static THEME_COLOR = "#FF4330";//主题色
  16. static APP_ID = '1';//后台app记录id
  17. static TEMPLATE_ID = '9';//后台结业证模板id
  18. static IMG_URL_PREFIX = 'https://edu-mp-img-1254259530.cos.ap-nanjing.myqcloud.com';//cos图片前缀
  19. static OPT_TIP = [
  20. "A", "B", "C", "D", "E", "F"
  21. ];
  22. static ERROR_REPEAT = 511;
  23. //用来处理不给用户显示的异常
  24. static ERROR_MSG = {
  25. '-100': "网络异常,请稍后重试",
  26. 10001: '服务器开了个小差,请稍后重试'
  27. };
  28. static DICT = {
  29. TRAIN_DIRECTION: "sys_train_direct",//培训方向
  30. TRAIN_MODEL: "sys_train_form",//培训模式
  31. COURSE_TYPE: "sys_kc_type",//课程类型
  32. EXAMPLE_CATEGORY: "sys_example_type",//典型类型
  33. STUDENT_TYPE: "r_student_type",//学员类别
  34. SEX: "sys_user_sex",//学员性别
  35. EDU_EXP: "education_background",//教育背景
  36. NATION: "sys_nation",//民族
  37. SPECIALTY: "specialty",//专业
  38. SOCIAL_WORK_LEVEL: "social_work_level",//社工证等级
  39. ADVANTAGE: "advantage",//特长
  40. SOCIAL_WORK_YEAR: "social_work_year",//社区工作年限
  41. COMMUNITY_WORKER_TYPE: "community_worker_type",//社区工作 职务
  42. OTHER_WORKER_TYPE: "other_worker_type",//其他工作者 职务
  43. WIFI: "wifi_config",//wifi
  44. }
  45. static UPLOAD_PATH = {
  46. //班内互动
  47. 'TEAM_INTERACTION': `community/teamInteraction/${getNowDate()}/`,
  48. //选树典型
  49. 'COMMUNITY_EXAMPLE': `community/example/${getNowDate()}/`,
  50. //热点难点
  51. 'COMMUNITY_FOCUSISSUES': `community/focusIssues/${getNowDate()}/`,
  52. //培训需求管理
  53. 'COMMUNITY_MANAGEMENT': `community/management/${getNowDate()}/`,
  54. //班级文件
  55. 'CLASS_DIR': 'education/team/',
  56. //学员登记表头像
  57. 'STUDENT': 'resource/student/',
  58. //个人头像
  59. 'AVATER': '',
  60. //其他文件
  61. 'OTHER': ''
  62. }
  63. }
  64. export default Config