收藏
回答

添加商品没有价格

框架类型 问题类型 操作时间 AppID
小程序 Bug 2023-02-08 https://api.weixin.qq.com/product/sku/add?access_token=xxxxxxxxx

https://api.weixin.qq.com/product/sku/add?access_token=xxxxxxxxx

回答关注问题邀请回答
收藏

3 个回答

  • 微信小商店社区答疑
    微信小商店社区答疑
    2023-02-10

    咨询下组件客服

    https://mp.weixin.qq.com/

    2023-02-10
    有用
    回复
  • 李立
    李立
    2023-02-15

    url = fmt.Sprintf("https://api.weixin.qq.com/product/sku/update?access_token=%s", accessToken)

    method = "POST"

    p := map[string]interface{}{

    "out_product_id": fmt.Sprintf("%d", sku.GoodsId),

    "out_sku_id":     fmt.Sprintf("%d", sku.GoodsId),

    "sale_price":     sku.Price,

    "stock_num":      100_0000,

    "sku_attrs": func() interface{} {

    res := make([]interface{}, len(sku.Attrs))

    for i, _ := range sku.Attrs {

    attr := &sku.Attrs[i]

    res[i] = map[string]interface{}{

    "attr_key":   attr.AttrKey,

    "attr_value": attr.AttrValue,

    }

    }

    return res

    }(),

    }

    if sku.SKUId != "" {

    p["out_sku_id"] = sku.SKUId

    }

    if len(sku.ThumbImgUrl) > 0 {

    p["thumb_img"] = sku.ThumbImgUrl

    }

    if sku.OriginPrice > sku.Price {

    p["market_price"] = sku.OriginPrice

    }

    params = p




    golang写的

    2023-02-15
    有用
    回复
  • Jianbo
    Jianbo
    2023-02-08

    贴代码看看。

    2023-02-08
    有用
    回复
登录 后发表内容