|
|
@@ -102,14 +102,19 @@ func CreateSign(c *gin.Context) { |
|
|
|
if string(body) != "" { |
|
|
|
aesStr = aes.AesEncryptByECB(md.AesKey, string(body)) |
|
|
|
|
|
|
|
var bodyParams = map[string]string{} |
|
|
|
var bodyParams = map[string]interface{}{} |
|
|
|
err = json.Unmarshal(body, &bodyParams) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
for key, value := range bodyParams { |
|
|
|
query[key] = value |
|
|
|
// 使用类型断言判断是否为 string 类型 |
|
|
|
if _, ok := value.(string); ok { |
|
|
|
query[key] = value.(string) |
|
|
|
} else { |
|
|
|
query[key] = utils.SerializeStr(value) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|