constants.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package utils
  2. const (
  3. Md5Key = "Ks@h64WJ#tcVgG8$&WlNfqvLAtMgpxWN"
  4. )
  5. //常量定义
  6. const (
  7. FormatTime = "15:04:05" //时间格式
  8. FormatDate = "2006-01-02" //日期格式
  9. FormatDateTime = "2006-01-02 15:04:05" //完整时间格式
  10. HlbFormatDateTime = "2006-01-02_15:04:05.999" //完整时间格式
  11. FormatDateTimeNoSecond = "2006-01-02 15:04" //完整时间格式
  12. FormatDateTimeUnSpace = "20060102150405" //完整时间格式
  13. PageSize15 = 15 //列表页每页数据量
  14. PageSize5 = 5
  15. PageSize10 = 10
  16. PageSize20 = 20
  17. PageSize30 = 30
  18. )
  19. const (
  20. APPNAME = "弘则-查研观向"
  21. EmailSendToUsers = "glji@hzinsights.com;pyan@hzinsights.com;cxzhang@hzinsights.com"
  22. EmailSendToExpert = "cxzhang@hzinsights.com"
  23. )
  24. //手机号,电子邮箱正则
  25. const (
  26. RegularMobile = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0-9])|(17[0-9])|(16[0-9])|(19[0-9]))\\d{8}$" //手机号码
  27. RegularFixedTelephone = "^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$" //手机号码
  28. RegularFixedTelephoneEasy = "^[0-9\\-]+$" //手机号码
  29. RegularEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` //匹配电子邮箱
  30. )
  31. //聚合短信
  32. var (
  33. JhGnTplId = "65692" //聚合国内模板编码
  34. JhGjTplId = "10054" //聚合国内模板编码
  35. JhGnAppKey = "4c8504c49dd335e99cfd7b6a3a9e2415" //聚合国内AppKey
  36. JhGjAppKey = "3326ad2c1047a4cd92ace153e6044ca3"
  37. )
  38. //OSS
  39. var (
  40. Endpoint string = "oss-cn-shanghai.aliyuncs.com"
  41. Bucketname string = "hongze"
  42. Imghost string = "https://hongze.oss-cn-shanghai.aliyuncs.com/"
  43. Upload_dir string = "static/images/"
  44. Upload_Audio_Dir string = "static/audio/"
  45. Upload_Pdf_Dir string = "static/pdf/"
  46. AccessKeyId string = "LTAIFMZYQhS2BTvW"
  47. AccessKeySecret string = "12kk1ptCHoGWedhBnKRVW5hRJzq9Fq"
  48. )