第三方api接口
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
586 B

  1. package haodanku
  2. import (
  3. "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/md"
  4. "encoding/json"
  5. "github.com/tidwall/gjson"
  6. )
  7. func KuaishouRecharge(params map[string]string) []md.HaodankuKuaishouRecharge {
  8. var goods = make([]md.HaodankuKuaishouRecharge, 0)
  9. reqNew, err := SendReqNew("http://v3.api.haodanku.com/ks_prepaid_recharge", params)
  10. if err != nil {
  11. return goods
  12. }
  13. data := gjson.Get(string(reqNew), "data").String()
  14. if data == "" {
  15. return goods
  16. }
  17. var oldGoods []md.HaodankuKuaishouRecharge
  18. json.Unmarshal([]byte(data), &oldGoods)
  19. return oldGoods
  20. }