From d82d5ca3483bf08089dfcf93cccd67af0b7c933f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 20 Dec 2022 15:21:46 +0800 Subject: [PATCH] test --- macao_logistics/macao_logistics.go | 8 ++++++++ macao_logistics/macao_logistics_test.go | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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") }