京东商城新增分类

This commit is contained in:
苏尹岚
2020-05-09 08:58:55 +08:00
parent 80d050b1c5
commit 9bf57342e8
4 changed files with 12 additions and 9 deletions

View File

@@ -16,6 +16,9 @@ import (
const ( const (
prodURL = "https://api.jd.com/routerjson" prodURL = "https://api.jd.com/routerjson"
sigKey = "sign" sigKey = "sign"
CreateCatType = "3"
UpdateCatType = "1"
) )
type API struct { type API struct {

View File

@@ -47,6 +47,6 @@ func (a *API) DeleteShopCategory(cid int64) (uniteResp *UniteResp, err error) {
//京东商城发布商品(创建商品?) //京东商城发布商品(创建商品?)
//https://open.jd.com/home/home#/doc/api?apiCateId=48&apiId=1379&apiName=jingdong.ware.write.add //https://open.jd.com/home/home#/doc/api?apiCateId=48&apiId=1379&apiName=jingdong.ware.write.add
func (a *API) CreateSkuName() (err error) { func (a *API) CreateSku() (err error) {
return err return err
} }

View File

@@ -41,13 +41,13 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{})
} }
type CreateShopCategoryParam struct { type CreateShopCategoryParam struct {
HomeShow int `json:"homeShow"` HomeShow string `json:"homeShow"`
ID int `json:"id"` ID string `json:"id"`
Open string `json:"open"` Open string `json:"open"`
OrderNo int `json:"orderNo"` OrderNo string `json:"orderNo"`
ParentID string `json:"parentId"` ParentID string `json:"parentId"`
Title string `json:"title"` Title string `json:"title"`
Type int `json:"type"` Type string `json:"type"`
} }
//京东商城创建或修改店内分类 //京东商城创建或修改店内分类

View File

@@ -7,13 +7,13 @@ import (
func TestCreateShopCategory(t *testing.T) { func TestCreateShopCategory(t *testing.T) {
var CreateShopCategoryParams = []*CreateShopCategoryParam{ var CreateShopCategoryParams = []*CreateShopCategoryParam{
&CreateShopCategoryParam{ &CreateShopCategoryParam{
HomeShow: 0, HomeShow: "0",
ID: 0, ID: "0",
Open: "", Open: "",
OrderNo: 0, OrderNo: "0",
ParentID: "", ParentID: "",
Title: "测试1", Title: "测试1",
Type: 3, Type: "3",
}, },
} }
api.CreateShopCategory(CreateShopCategoryParams) api.CreateShopCategory(CreateShopCategoryParams)