Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
333c8b7b25
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      zero_buy/api.go

+ 6
- 2
zero_buy/api.go View File

@@ -9,11 +9,15 @@ import (
func ZeroBuyUrl(appSecret string, param map[string]string) string {
url := "http://h5.hlpay178.cn/#/"
param["deviceID"] = strings.ReplaceAll(param["deviceID"], " ", "")
deviceID, _ := php2go.URLDecode(param["deviceID"])
if deviceID != "" {
param["deviceID"] = deviceID
}
for k, v := range param {
if strings.Contains(url, "?") == false {
url += "?" + k + "=" + v
url += "?" + k + "=" + php2go.URLEncode(v)
} else {
url += "&" + k + "=" + v
url += "&" + k + "=" + php2go.URLEncode(v)
}
}
sign := GetSign(appSecret, param)


Loading…
Cancel
Save