v02.go 461 B

12345678910111213141516171819202122232425
  1. package adm
  2. import (
  3. "gd_service/apis"
  4. "gd_service/consts"
  5. "gd_service/errors"
  6. "github.com/tidwall/gjson"
  7. )
  8. func V02(req *apis.ThirdpartRequest) (reply string, err error) {
  9. req.LReq.Search = req.Params["id_card"]
  10. req.ProviderInfo.ThirdpartApiRouter = consts.V02
  11. str, err := AdmRequest(req)
  12. if err != nil {
  13. return "", err
  14. }
  15. if str == "" {
  16. return "", errors.VendorError
  17. }
  18. isMatch := gjson.Get(str, "is_match").String()
  19. return isMatch, nil
  20. }