diff --git a/app/hdl/hdl_demo.go b/app/hdl/hdl_demo.go index 92ae977..ca00f1e 100644 --- a/app/hdl/hdl_demo.go +++ b/app/hdl/hdl_demo.go @@ -110,10 +110,10 @@ func CreateSign(c *gin.Context) { } for key, value := range bodyParams { // 使用类型断言判断是否为 string 类型 - if _, ok := value.(string); ok { - query[key] = value.(string) - } else { + if _, ok := value.(map[string]interface{}); ok { query[key] = utils.SerializeStr(value) + } else { + query[key] = utils.AnyToString(value) } } } diff --git a/app/lib/aes/check.go b/app/lib/aes/check.go index 5b470d4..1a94ee0 100644 --- a/app/lib/aes/check.go +++ b/app/lib/aes/check.go @@ -49,10 +49,10 @@ func CheckSign(c *gin.Context) error { } for key, value := range bodyParams { // 使用类型断言判断是否为 string 类型 - if _, ok := value.(string); ok { - query[key] = value.(string) - } else { + if _, ok := value.(map[string]interface{}); ok { query[key] = utils.SerializeStr(value) + } else { + query[key] = utils.AnyToString(value) } } }