From 63d8978c4ada8ca0beea280d4a60b31cc575607d Mon Sep 17 00:00:00 2001 From: dengbiao Date: Wed, 20 Nov 2024 16:00:01 +0800 Subject: [PATCH] update --- app/hdl/hdl_demo.go | 6 +++--- app/lib/aes/check.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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) } } }