瀏覽代碼

test

tags/v1.1.17
huangjiajun 2 年之前
父節點
當前提交
d82d5ca348
共有 2 個文件被更改,包括 10 次插入3 次删除
  1. +8
    -0
      macao_logistics/macao_logistics.go
  2. +2
    -3
      macao_logistics/macao_logistics_test.go

+ 8
- 0
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()
}

+ 2
- 3
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")
}

Loading…
取消
儲存