|
|
@ -2,6 +2,7 @@ package helper |
|
|
|
|
|
|
|
import ( |
|
|
|
"errors" |
|
|
|
"net/url" |
|
|
|
"sort" |
|
|
|
"strings" |
|
|
|
) |
|
|
@ -121,7 +122,7 @@ func HttpBuildQuery(data map[string]string) string { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 对map进行拼接 |
|
|
|
* 对map字典按照顺序进行拼接,并且把每个value进行类urlencode |
|
|
|
* @param data map[string]string |
|
|
|
* @2021/10/14 |
|
|
|
* @wyy |
|
|
@ -139,7 +140,7 @@ func HttpBuildStringQuery(data map[string]string) string { |
|
|
|
|
|
|
|
for _, value := range keySlice { |
|
|
|
if value != "" && data[value] != "" { |
|
|
|
query += StringJoin(value, "=", data[value], "&") |
|
|
|
query += StringJoin(value, "=", url.QueryEscape(data[value]), "&") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|