浏览代码

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")
}

正在加载...
取消
保存