Commit 8e86d368 authored by hujiebin's avatar hujiebin

版本判断

parent 05ea1ae1
......@@ -5,6 +5,7 @@ import (
"git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/mylogrus"
"git.hilo.cn/hilo-common/resource/config"
"git.hilo.cn/hilo-common/utils"
"github.com/gin-gonic/gin"
"hilo-user/myerr/bizerr"
"hilo-user/req"
......@@ -136,6 +137,11 @@ func LoggerHandle(c *gin.Context) {
// 加密Handle
func EncryptHandle(c *gin.Context) {
c.Set(mycontext.InnerEncrypt, true)
if value, ok := c.Get(mycontext.APP_VERSION); ok {
if high, _ := utils.CompareVersion(value.(string), "> 3.9.0"); high {
c.Set(mycontext.InnerEncrypt, true)
}
}
c.Set(mycontext.InnerEncrypt, true) // todo 后面版本判断去掉
c.Next()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment