1
This commit is contained in:
@@ -20,13 +20,13 @@ func init() {
|
||||
baseapi.Init(sugarLogger)
|
||||
|
||||
// 菜市
|
||||
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
|
||||
// 果园
|
||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
|
||||
//商超
|
||||
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_gsALm2N5YwK5MqJYgo5BHQ")
|
||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_gsALm2N5YwK5MqJYgo5BHQ")
|
||||
//cookieStr := `
|
||||
// acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||
//`
|
||||
|
||||
@@ -27,10 +27,20 @@ func TestRetailCatUpdate(t *testing.T) {
|
||||
|
||||
// 测试获取门店分类列表
|
||||
func TestRetailCatList(t *testing.T) {
|
||||
result, err := api.RetailCatList("5943132")
|
||||
result, err := api.RetailCatList("28657115")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fmt.Println("parent name code level")
|
||||
for k1, v1 := range result {
|
||||
fmt.Println(k1-k1, fmt.Sprintf("0 %s %s %d", v1.Name, v1.Code, v1.Level))
|
||||
if v1.Children != nil {
|
||||
for k2, v2 := range v1.Children {
|
||||
time.Sleep(200 * time.Microsecond)
|
||||
fmt.Println(k2-k2, fmt.Sprintf("%s %s %s %d", v1.Code, v2.Name, v2.Code, v2.Level))
|
||||
}
|
||||
}
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user