京东商城新增分类
This commit is contained in:
@@ -16,6 +16,9 @@ import (
|
||||
const (
|
||||
prodURL = "https://api.jd.com/routerjson"
|
||||
sigKey = "sign"
|
||||
|
||||
CreateCatType = "3"
|
||||
UpdateCatType = "1"
|
||||
)
|
||||
|
||||
type API struct {
|
||||
|
||||
@@ -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
|
||||
func (a *API) CreateSkuName() (err error) {
|
||||
func (a *API) CreateSku() (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -41,13 +41,13 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{})
|
||||
}
|
||||
|
||||
type CreateShopCategoryParam struct {
|
||||
HomeShow int `json:"homeShow"`
|
||||
ID int `json:"id"`
|
||||
HomeShow string `json:"homeShow"`
|
||||
ID string `json:"id"`
|
||||
Open string `json:"open"`
|
||||
OrderNo int `json:"orderNo"`
|
||||
OrderNo string `json:"orderNo"`
|
||||
ParentID string `json:"parentId"`
|
||||
Title string `json:"title"`
|
||||
Type int `json:"type"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
//京东商城创建或修改店内分类
|
||||
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
func TestCreateShopCategory(t *testing.T) {
|
||||
var CreateShopCategoryParams = []*CreateShopCategoryParam{
|
||||
&CreateShopCategoryParam{
|
||||
HomeShow: 0,
|
||||
ID: 0,
|
||||
HomeShow: "0",
|
||||
ID: "0",
|
||||
Open: "",
|
||||
OrderNo: 0,
|
||||
OrderNo: "0",
|
||||
ParentID: "",
|
||||
Title: "测试1",
|
||||
Type: 3,
|
||||
Type: "3",
|
||||
},
|
||||
}
|
||||
api.CreateShopCategory(CreateShopCategoryParams)
|
||||
|
||||
Reference in New Issue
Block a user