Browse Source

test

tags/v1.1.17
huangjiajun 2 years ago
parent
commit
d82d5ca348
2 changed files with 10 additions and 3 deletions
  1. +8
    -0
      macao_logistics/macao_logistics.go
  2. +2
    -3
      macao_logistics/macao_logistics_test.go

+ 8
- 0
macao_logistics/macao_logistics.go View File

@@ -46,3 +46,11 @@ func RegUser(params map[string]interface{}) string {
fmt.Println(string(data))
return string(data)
}

func GetAddress(params map[string]interface{}, acctoken string) string {
send, err := SendGet("/admin/user/template/address", params, acctoken)
if err != nil {
return ""
}
return gjson.Get(send, "data.data").String()
}

+ 2
- 3
macao_logistics/macao_logistics_test.go View File

@@ -4,10 +4,9 @@ import "testing"

func TestLogin(t *testing.T) {
params := map[string]interface{}{
"phoneno": "15217160421", //
"nickname": "黄", //
"user_phone": "15217160421", //
"cainiao_match": "AYD001",
}
//7c2f6cbd480a96f1aa69509f9dd65462
RegUser(params)
GetAddress(params, "7c2f6cbd480a96f1aa69509f9dd65462")
}

Loading…
Cancel
Save