12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- package utils
- // 验证码
- const (
- CodeCachePrefix = "eta:mini:login:" // 验证码缓存Key
- VerifyCodeExpireMinute = 15 // 短信/邮箱验证码过期时间-分钟
- VerifyCodeSendLimit = 20 // 短信/邮箱验证码发送上限
- CaptchaCachePrefix = "captcha:lock:eta_mini_api_" // 验证码缓存Key
- )
- // 报告权限状态定义
- const (
- ReportPermissionStatusExpired = 1 //已过期
- ReportPermissionStatusNoPermission = 2 //没有该品种权限
- ReportPermissionStatusNo = 3 //没有权限
- ReportPermissionStatusHas = 4 //有该品种权限
- ReportPermissionStatusNoUser = 5 //没有获得用户信息
- )
- const (
- ReportStatePushCancel = 0 // 未推送
- ReportStatePush = 1 // 已推送
- )
- // 用户状态定义
- const (
- UserStatusNo = 0 //禁用
- UserStatusPotential = 1 //潜在用户
- UserStatusFormal = 2 //正式用户
- )
- // 权限类型
- const (
- PermissionTypeEta = 1 // eta的品种权限
- PermissionTypeMini = 2 // 小程序的品种权限
- )
- // 报告类型
- const (
- ReportTypeEta = 1 // eta的研报
- ReportTypePdf = 2 // pdf的研报
- )
- // 常量定义
- const (
- FormatTime = "15:04:05" //时间格式
- FormatDate = "2006-01-02" //日期格式
- FormatDateCN = "2006年01月02日" //日期格式(中文)
- FormatDateUnSpace = "20060102" //日期格式
- FormatDateTime = "2006-01-02 15:04:05" //完整时间格式
- HlbFormatDateTime = "2006-01-02_15:04:05.999" //完整时间格式
- FormatDateTimeUnSpace = "20060102150405" //完整时间格式
- PageSize15 = 15 //列表页每页数据量
- PageSize5 = 5
- PageSize10 = 10
- PageSize20 = 20
- PageSize30 = 30
- )
- const (
- UserLoginSalt = "kOld9YUdf89T2uIH" // 用户登录盐值
- DesKeySalt = "odNMloUrTAmyRd9fb0TtlrPk" // DesKey盐值
- )
- const (
- DefaultPhone = "021-6312 3067" //默认销售电话号
- DefaultAreaCode = "86"
- )
- const (
- JhGnAppKey = "4c8504c49dd335e99cfd7b6a3a9e2415" //聚合国内AppKey
- )
- const (
- APPNAME = "东吴研报小程序"
- )
- const (
- CACHE_ACCESS_TOKEN_LOGIN = "pc_eta_min_crm:login:" //管理后台登录
- CACHE_ACCESS_TOKEN_LOGIN_NO_TRUST = "pc_eta_min_crm:login:no_trust:" //管理后台登录(不可信登录态)
- CACHE_ACCESS_WX_BIND = "eta_mini_api:phone:email:" //管理后台登录(不可信登录态)
- CACHE_ACCESS_EMAIL_LOGIN_CODE = "eta_mini_api:login:email:" //邮箱验证码防攻击key
- CACHE_ACCESS_PHONE_LOGIN_CODE = "eta_mini_api:login:phone:" //手机验证码防攻击key
- CACHE_ACCESS_EMAIL_COUNT_LOGIN_CODE = "eta_mini_api:login:email_count:" //邮箱验证码登录次数key
- CACHE_ACCESS_PHONE_COUNT_LOGIN_CODE = "eta_mini_api:login:phone_count:" //手机验证码登录次数key
- )
- // 缓存key
- const (
- CACHE_WX_ACCESS_TOKEN_DW = "wx:accesstoken:dw" //东吴公众号 微信accessToken
- )
|