提交 587381f7 authored 作者: zhanglibo's avatar zhanglibo

淘特

上级 56916c72
...@@ -90,59 +90,57 @@ type GoodsDetailReq struct { ...@@ -90,59 +90,57 @@ type GoodsDetailReq struct {
type GoodsDetailRes struct { type GoodsDetailRes struct {
ErrorMessage string `json:"error_message"` ErrorMessage string `json:"error_message"`
ErrorCode string `json:"error_code"` ErrorCode string `json:"error_code"`
Result struct { DebugInfoMap struct {
DebugInfoMap struct { TraceId string `json:"traceId"`
TraceId string `json:"traceId"` } `json:"debugInfoMap"`
} `json:"debugInfoMap"` EnterNewLink string `json:"enterNewLink"`
EnterNewLink string `json:"enterNewLink"` Item struct {
Item struct { CategoryId []string `json:"categoryId"`
CategoryId []string `json:"categoryId"` CategoryName []string `json:"categoryName"`
CategoryName []string `json:"categoryName"` City string `json:"city"`
City string `json:"city"` FastPostFee int `json:"fastPostFee"`
FastPostFee int `json:"fastPostFee"` Images []string `json:"images"`
Images []string `json:"images"` ItemId string `json:"itemId"`
ItemId string `json:"itemId"` ItemServices []struct {
ItemServices []struct { ActionTitle string `json:"actionTitle,omitempty"`
ActionTitle string `json:"actionTitle,omitempty"` ActionUrl string `json:"actionUrl,omitempty"`
ActionUrl string `json:"actionUrl,omitempty"` Desc string `json:"desc"`
Desc string `json:"desc"` Title string `json:"title"`
Title string `json:"title"` } `json:"itemServices"`
} `json:"itemServices"` MainPic string `json:"mainPic"`
MainPic string `json:"mainPic"` OrdinaryPostFee int `json:"ordinaryPostFee"`
OrdinaryPostFee int `json:"ordinaryPostFee"` Props []struct {
Props []struct { Content string `json:"content"`
Content string `json:"content"` Word string `json:"word"`
Word string `json:"word"` } `json:"props"`
} `json:"props"` Prov string `json:"prov"`
Prov string `json:"prov"` Receipt bool `json:"receipt"`
Receipt bool `json:"receipt"` SoldQuantity int `json:"soldQuantity"`
SoldQuantity int `json:"soldQuantity"` Status int `json:"status"`
Status int `json:"status"` Title string `json:"title"`
Title string `json:"title"` } `json:"item"`
} `json:"item"` Seller struct {
Seller struct { ShopName string `json:"shopName"`
ShopName string `json:"shopName"` SellerId string `json:"sellerId"`
} `json:"seller"` } `json:"seller"`
SkuBase struct { SkuBase struct {
Props []struct { Props []struct {
Name string `json:"name"` Name string `json:"name"`
Pid string `json:"pid"` Pid string `json:"pid"`
Values []struct { Values []struct {
Image string `json:"image"` Image string `json:"image"`
Name string `json:"name"` Name string `json:"name"`
Vid string `json:"vid"` Vid string `json:"vid"`
} `json:"values"` } `json:"values"`
} `json:"props"` } `json:"props"`
Skus []struct { Skus []struct {
PropPath string `json:"propPath"` PropPath string `json:"propPath"`
SkuId string `json:"skuId"` SkuId string `json:"skuId"`
} `json:"skus"` } `json:"skus"`
} `json:"skuBase"` } `json:"skuBase"`
SkuCore struct { SkuCore struct {
DefaultSkuId int64 `json:"defaultSkuId"` Sku2Info map[string]GoodsItem `json:"sku2info"`
Sku2Info map[string]GoodsItem `json:"sku2info"` } `json:"skuCore"`
} `json:"skuCore"`
} `json:"result"`
} }
type GoodsItem struct { type GoodsItem struct {
...@@ -163,9 +161,7 @@ func (goods) Detail(ctx context.Context, GoodsID string) (res *GoodsDetailRes, e ...@@ -163,9 +161,7 @@ func (goods) Detail(ctx context.Context, GoodsID string) (res *GoodsDetailRes, e
} }
result, err := server.Post(ctx, method, g.Map{ result, err := server.Post(ctx, method, g.Map{
"parameters": g.Map{ "parameters": request,
"itemId": request,
},
}) })
_ = gjson.New(result).Scan(&res) _ = gjson.New(result).Scan(&res)
return return
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论