123456789101112131415161718192021222324252627282930313233343536 |
- package thirdparty
- import (
- "gd_management/common.in/config"
- "gd_management/common.in/httpClient"
- "gd_management/common.in/utils"
- "go.uber.org/zap"
- )
- /*
- const (
- jhHost = "http://v.juhe.cn/"
- jhApiPrefix = "driverLicense/query.php"
- jhAppKey = "1ef0aa20c3d4cbe71f4a799122625bb9"
- )
- func jhFullUrl() string {
- return fmt.Sprintf("%s/%s", jhHost, jhApiPrefix)
- }
- */
- func JhHttpGet(api string, data map[string]string) (result []byte, err error) {
- defer func() {
- l.Info("thirdparty",
- zap.String("api", api),
- zap.String("request", utils.MarshalJsonString(data)),
- zap.String("response", string(result)))
- }()
- if data == nil {
- data = make(map[string]string)
- }
- data["key"] = config.Conf.ThirdPart.JhAppKey
- result, err = httpClient.HttpGet(api, data)
- return result, err
- }
|