Browse Source

拼多多

master
huangjiajun 5 months ago
parent
commit
3a853b9ed1
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      meituan_cps/api.go

+ 2
- 1
meituan_cps/api.go View File

@@ -12,7 +12,7 @@ import (
"time" "time"
) )


func Send(method, key, secret string, param map[string]interface{}) {
func Send(method, key, secret string, param map[string]interface{}) (string, error) {
header := map[string]string{ header := map[string]string{
"S-Ca-App": key, "S-Ca-App": key,
"S-Ca-Timestamp": zhios_third_party_utils.Int64ToStr(time.Now().Unix() * 1000), "S-Ca-Timestamp": zhios_third_party_utils.Int64ToStr(time.Now().Unix() * 1000),
@@ -27,6 +27,7 @@ func Send(method, key, secret string, param map[string]interface{}) {
post, err := zhios_third_party_utils.CurlPost(url+method, paramStr, header) post, err := zhios_third_party_utils.CurlPost(url+method, paramStr, header)
fmt.Println(string(post)) fmt.Println(string(post))
fmt.Println(err) fmt.Println(err)
return string(post), err
} }


func GetSign(method, secret string, paramStr string, header map[string]string) map[string]string { func GetSign(method, secret string, paramStr string, header map[string]string) map[string]string {


Loading…
Cancel
Save