@@ -73,7 +73,7 @@ func (c *BaseCommonController) JSON(data interface{}, hasIndent bool, coding boo
// 数据加密
if services.CheckEncryption() {
- content = utils.DesBase64Encrypt(content, utils.Key)
+ content = utils.DesBase64Encrypt(content, utils.DesKey)
// get请求时,不加双引号就获取不到数据,不知道什么原因,所以还是在前后加上双引号吧
content = []byte(`"` + string(content) + `"`)
}
@@ -86,6 +86,7 @@ func init() {
MYSQL_URL_MASTER = config["mysql_url_master"]
SMS_TPLID = config["sms_tplId"]
+ DesKey = config["des_key"]
WX_APPID = config["wx_appid"]
WX_APP_SECRET = config["wx_app_secret"]
@@ -42,10 +42,6 @@ const (
DesKeySalt = "odNMloUrTAmyRd9fb0TtlrPk" // DesKey盐值
)
-const (
- Key = "KcSJaJodi78LAA7HEWpaiH49" //全局加密KEY
-)
-
const (
DefaultPhone = "021-6312 3067" //默认销售电话号
DefaultAreaCode = "86"