Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
84a7b953be
1 changed files with 17 additions and 2 deletions
  1. +17
    -2
      macao_logistics/macao_logistics.go

+ 17
- 2
macao_logistics/macao_logistics.go View File

@@ -30,6 +30,9 @@ func GetGoods(params map[string]interface{}, acctoken string) string {
fmt.Println("macap1:" + err.Error()) fmt.Println("macap1:" + err.Error())
return "" return ""
} }
if gjson.Get(send, "code").Int() == 402 && gjson.Get(send, "msg").String() == "Token校驗失敗" || gjson.Get(send, "msg").String() == "Token\\u6821\\u9a57\\u5931\\u6557" {
return "token校验失败"
}
return gjson.Get(send, "data.data").String() return gjson.Get(send, "data.data").String()
} }
func GetStore(params map[string]interface{}, acctoken string) string { func GetStore(params map[string]interface{}, acctoken string) string {
@@ -41,6 +44,9 @@ func GetStore(params map[string]interface{}, acctoken string) string {
fmt.Println("macap1:" + err.Error()) fmt.Println("macap1:" + err.Error())
return "" return ""
} }
if gjson.Get(send, "code").Int() == 402 && gjson.Get(send, "msg").String() == "Token校驗失敗" || gjson.Get(send, "msg").String() == "Token\\u6821\\u9a57\\u5931\\u6557" {
return "token校验失败"
}
return gjson.Get(send, "data.data").String() return gjson.Get(send, "data.data").String()
} }
func GetOrder(params map[string]interface{}, acctoken string) string { func GetOrder(params map[string]interface{}, acctoken string) string {
@@ -52,6 +58,9 @@ func GetOrder(params map[string]interface{}, acctoken string) string {
fmt.Println("macap1:" + err.Error()) fmt.Println("macap1:" + err.Error())
return "" return ""
} }
if gjson.Get(send, "code").Int() == 402 && gjson.Get(send, "msg").String() == "Token校驗失敗" || gjson.Get(send, "msg").String() == "Token\\u6821\\u9a57\\u5931\\u6557" {
return "token校验失败"
}
return gjson.Get(send, "data.data").String() return gjson.Get(send, "data.data").String()
} }
func RegUser(params map[string]interface{}) string { func RegUser(params map[string]interface{}) string {
@@ -62,14 +71,17 @@ func RegUser(params map[string]interface{}) string {
fmt.Println(string(data)) fmt.Println(string(data))
return string(data) return string(data)
} }
func RegUserNew(params map[string]interface{}) string {
send, err := Send("/jyb/user/v2/register", params, "b7451652b079734ed35e1c36eaca40e6")
func RegUserNew(params map[string]interface{}, acctoken string) string {
send, err := Send("/jyb/user/v2/register", params, acctoken)
fmt.Println("macap1:", params) fmt.Println("macap1:", params)
fmt.Println("macap1:" + send) fmt.Println("macap1:" + send)
if err != nil { if err != nil {
fmt.Println("macap1:" + err.Error()) fmt.Println("macap1:" + err.Error())
return "" return ""
} }
if gjson.Get(send, "code").Int() == 402 && gjson.Get(send, "msg").String() == "Token校驗失敗" || gjson.Get(send, "msg").String() == "Token\\u6821\\u9a57\\u5931\\u6557" {
return "token校验失败"
}
return send return send
} }


@@ -81,5 +93,8 @@ func GetAddress(params map[string]interface{}, acctoken string) string {
fmt.Println("macap1:" + err.Error()) fmt.Println("macap1:" + err.Error())
return "" return ""
} }
if gjson.Get(send, "code").Int() == 402 && gjson.Get(send, "msg").String() == "Token校驗失敗" || gjson.Get(send, "msg").String() == "Token\\u6821\\u9a57\\u5931\\u6557" {
return "token校验失败"
}
return gjson.Get(send, "data").String() return gjson.Get(send, "data").String()
} }

Loading…
Cancel
Save