增加接口

finance
黄伟 2 years ago
parent 8e747f0ff1
commit 4b1c825e77

@ -60,6 +60,7 @@ type ArgsSkuAdd struct {
}
type SkuImg struct {
Id uint `json:"id"`
Path string `json:"path"`
}
@ -224,3 +225,28 @@ func (s *sku) DownShelves(ctx context.Context, args ArgsSkuDownShelves) error {
}
return xClient.Call(ctx, "DownShelves", args, &reply)
}
// GetImgs @Title 获取预览图
func (s *sku) GetImgs(ctx context.Context, skuId uint) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
return err
}
return xClient.Call(ctx, "GetImgs", skuId, &reply)
}
type ArgsReplaceImg struct {
Id uint
ReplacePath string
}
// ReplaceImg @Title 替换图片
func (s *sku) ReplaceImg(ctx context.Context, args ArgsReplaceImg) (reply []SkuImg, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return nil, err
}
err = xClient.Call(ctx, "ReplaceImg", args, &reply)
return
}

Loading…
Cancel
Save