This commit is contained in:
邹宗楠
2026-07-27 13:37:35 +08:00
parent 4ce9b4d1cc
commit 48c5f00a2d
6 changed files with 25 additions and 21 deletions

View File

@@ -29,13 +29,13 @@ func init() {
// api = New("62289", "d3ec2358d6a819ea")
// 京西菜市
//api = New("34665", "c3db75b754ea2d89")
api = New("34665", "c3db75b754ea2d89")
//菜市测试
// api = New("62923", "aa4cdc6c1108486b")
// 京西果园
api = New("35957", "10013fbb7c2ddad7")
//api = New("35957", "10013fbb7c2ddad7")
// api.SetCookie("PASSPORT_DELIMONT_TOKEN", "PBE_2.0_5cd1c6141c127d4188f026ac01fc93656266683e8dfb3127c2fdf894259e9034125ff3bdd2a997a385802ee3ef1802ba93a04acea34fde2d2b6e802c5dcd4ec6e3f4ad909a1d806e3ceeb349ed726b03d60ed1fe7010d4140aa338d9c5f05e3fec172c78d3d7f0ca579d61b7015af1bf99aa46b04d2b8a64aa50646dc09afe94b6b60e0ba9a933635db5e8b2a035e9b6d693b289acf1b256d5b9a3f8478c87b0b009115bfd1394f20bb5a0dc2c07b8d013a25f286ec6bf7f2d86010d65507e31358834b7a6b58fbd88cb3f1a12cf71c997b91c1527f6f3c10693f7c2bd6073da8633a98cd2dc1114dfa5be5ee0e60b02cf7e4a94d0fb563a8c01717e7c050f02249117219c07a2eb211577c208ba77f4d536fa25139bc249be93b38d6fc495ef67a32aa206835d177db402bc534de1d29caf4f6b4fbcd912c13f167d00d1732222744c336a5189728f72fb5e153c4b1164171cfb0c811f34f4c2fedd43f721b8706b43f8d631251c")
//api.SetCookie("WMUSS", "NTE2NDMTAwMDAyNzYxNzAwOTEyTmUzNWJNcDlQ ")
//api.SetCookie("WMSTOKEN", "NTE2NDMTAwMDAyNzYxNzAwOTEyTmUzNWJNcDlQ ")

View File

@@ -214,7 +214,7 @@ func TestOrderPrivateInfo(t *testing.T) {
}
func TestOrderDeliveryGet(t *testing.T) {
result, err := api.OrderDeliveryGet("4053750050397193755")
result, err := api.OrderDeliveryGet("4040090353958939256")
if err != nil {
t.Fatal(err)
}

View File

@@ -17,15 +17,6 @@ func TestShopCategoryCreate(t *testing.T) {
}
}
func TestShopCategoryGet(t *testing.T) {
result, err := api.ShopCategoryGet("800493")
if err != nil {
t.Fatal(err)
} else {
t.Log(utils.Format4Output(result, false))
}
}
func TestShopGet222(t *testing.T) {
data, err := api.ShopGet("", 32267258880)
fmt.Println(data)
@@ -56,6 +47,7 @@ func TestSkuGetItemsByCategoryId(t *testing.T) {
}
func TestSkuList(t *testing.T) {
foodListData := make([]*SkuInfo, 0, 0)
skuIdOffset := 0
param := &SkuListParams{
@@ -65,7 +57,6 @@ func TestSkuList(t *testing.T) {
}
for {
foodList, err := api.SkuList(utils.Int2Str(300394), param)
if err != nil {
break
@@ -88,14 +79,14 @@ func TestSkuListDelete(t *testing.T) {
Page: page,
PageSize: 100,
}
foodList, err := api.SkuList(utils.Int2Str(5000100), param)
foodList, err := api.SkuList(utils.Int2Str(5000112), param)
if err != nil {
break
}
for k, v := range foodList.List {
api.AccessAPI2("sku.delete", map[string]interface{}{
"shop_id": "5000100",
"shop_id": "5000112",
"sku_id": v.SkuId,
}, utils.GetUUID())
globals.SugarLogger.Debugf("---k := %d,delete_name:= %s", k, v.Name)
@@ -105,6 +96,17 @@ func TestSkuListDelete(t *testing.T) {
}
}
func TestSkuDeleteCategory(t *testing.T) {
fromCategoryList, _ := api.ShopCategoryGet(utils.Int2Str(5000112))
for _, v := range fromCategoryList {
api.ShopCategoryDelete("5000112", v.CategoryID)
if len(v.Children) != 0 {
for _, c := range v.Children {
api.ShopCategoryDelete("5000112", c.CategoryID)
}
}
}
}
func TestSkuUploadRTF(t *testing.T) {
rtfDetail := BuildRFTFromImgs("https://image.jxc4.com/sijidou.jpg")
t.Log(rtfDetail)