This commit is contained in:
邹宗楠
2022-12-12 18:10:35 +08:00
parent a4741e98b6
commit 0e7473a0f0
4 changed files with 16 additions and 2 deletions

View File

@@ -8,7 +8,16 @@ import (
"testing"
)
var token = `{"access_token":"e8b6c1bc-2477-40ff-bd8e-faf547669d77","expires_in":1671431173,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"3cd84170-73a0-485c-b55a-74e128618693","authority_id":""}`
var token = `{
"access_token": "b668f8cc-d875-4887-a613-5452f05e752e",
"expires_in": 1671432212,
"scope": "SCOPE",
"shop_id": 63141688,
"shop_name": "小时达开放平台专用店",
"refresh_token": "fa64fedf-05a7-4c1b-b6c4-f97f90e10b75",
"authority_id": ""
}`
var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
// 查询售后单详情

View File

@@ -9,6 +9,7 @@ type Imgs struct {
const (
TiktokFolder1 = "71580417560930552391570" // 文件夹(京西菜市)
TiktokFolder2 = "71482723234545339291960"
TiktokFolder3 = "71762017122139835211688" // (方案二测试文件夹)
)
// 商品减库存类型

View File

@@ -51,6 +51,10 @@ func (a *API) BatchUploadImages(imgs []Imgs) (map[string]material_batchUploadIma
Name: imgs[i].Name,
Url: imgs[i].Url,
}
// 测试文件夹
if a.accessTokenObj.ShopId == 63141688 {
img.FolderId = TiktokFolder3
}
param = append(param, img)
}

View File

@@ -24,7 +24,7 @@ func init() {
}
func TestCreateFolad(t *testing.T) {
data, err := a.CreateFolder("测试创建文件夹1019")
data, err := a.CreateFolder("shop_63141688")
fmt.Println("err=====", err)
fmt.Println("LogId====", data.LogId) //2022092811422001020812109607601B77
fmt.Println("data====", data.Data.Name) // jxcs_folder