diff --git a/macao_logistics/macao_logistics.go b/macao_logistics/macao_logistics.go index df11f3c..9cf85d7 100644 --- a/macao_logistics/macao_logistics.go +++ b/macao_logistics/macao_logistics.go @@ -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() +} diff --git a/macao_logistics/macao_logistics_test.go b/macao_logistics/macao_logistics_test.go index ba24394..1d8f3a2 100644 --- a/macao_logistics/macao_logistics_test.go +++ b/macao_logistics/macao_logistics_test.go @@ -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") }