ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**简要描述:** - 编辑商品 **请求URL:** - `/adminapi/goods.goods/edit` **请求方式:** - POST **参数:** |参数名 |必选 |类型 |说明 | | ------ | ------ | ------ |------ | |id |是 |int |商品id | |name |是 |string |商品名称 | |code |是 |string |商品编码| |delivery_type |是 |int |配送类型:1-快递配送;2-上门自提| |express_type |是 |int |运费类型:1-包邮;2-统一运费;3-运费模板| |express_money |是 |float |运费类型为:2(统一运费)时必传| |express_template_id |是 |int |运费类型为:3(运费模板)时必传| |video_source |是 |string |视频来源:1-视频素材库;2-商品链接| |video_cover |是 |string |视频封面| |video |是 |string |视频链接| |supplier_id |是 |int|供应商id| |brand_id |是 |int |品牌id| |unit_id |是 |int |单位id| |category_id|是|array|商品分类| |image |是 |array | 商品轮播图(数组第一个为商品主图) |stock_warning |是 |int |库存预警| |virtual_sales_num |是 |int |虚拟销量| |sort |是 |int |排序| |status |是 |int |状态:1-销售中;0-仓库中| |content |是|int |富文本| |spec_type |是 |int | 类型 1-单规格商品;2-多规格商品 |spec_value |是 |array | 规格项 |--id |是 |int | 规格id(新增为空) |--spec_name |是 |sring | 规格名称 |--spec_list |是 |array | 规格子项列表 |----id |是 |int | 规格id(新增为空) |----value |是 |string | 规格值 |spec_value_list |是 |array | 规格项信息 |--id |是 |int | 规格id |--ids |是 |int | 规格ids |--spec_value |否 |int | 拼接规格名称 |--image |是 |float | 规格图片 |--sell_price |是 |float | 价格 |--lineation_price |是 |float | 划线价 |--cost_price |是 |float | 成本价 |--stock |是 |int | 库存 |--volume |是 |float | 体积 |--weight |是 |float | 重量 |--bar_code |是 |string | 条形码 **参数示例** ``` { "id":45, "name":"舒客儿童牙膏换牙儿童牙膏护齿防蛀护龈含氟可吞咽食品级34", "code":"12222241", "remark":2332, "express_type":1, "express_money":20, "express_template_id":1, "video_source":1, "video_cover":"http://www.likeshop.localhost/uploads/images/background/20201210/6768915899c1f445e43c886ad5e8668a.png", "video":"http://www.likeshop.localhost/uploads/images/background/20201210/6768915899c1f445e43c886ad5e8668a.png", "image":[ "123.png", "12223.png", "122223233.png" ], "category_id":[ 1,2,3 ], "supplier_id":1, "brand_id":2, "unit_id":2, "is_stock":1, "poster":"", "status":1, "stock_warning":100, "virtual_sales_num":200, "sort":20, "content":123, "spec_type":2, "spec_value":[ { "id":46, "spec_name":"选择颜色", "sort":2, "spec_list":[ { "id":"95", "value":"黑巧风暴" }, { "id":"96", "value":"白桃乌龙" } ] }, { "id":47, "spec_name":"选择版本", "sort":1, "spec_list":[ { "id":97, "value":"4G" }, { "id":98, "value":"8G" }, { "id":99, "value":"12G" }, { "id":"", "value":"16G" } ] } ], "spec_value_list":[ { "id":"105", "ids":"0,0", "spec_value":"黑巧风暴,4G", "image":"", "sell_price":2999, "lineation_price":3299, "cost_price":2000, "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 }, { "id":"106", "ids":"0,1", "spec_value":"黑巧风暴,8G", "image":"", "sell_price":3299, "lineation_price":3599, "cost_price":2200, "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 }, { "id":"107", "ids":"0,2", "spec_value":"黑巧风暴,12G", "image":"", "sell_price":3599, "lineation_price":3799, "cost_price":2400, "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 }, { "id":"", "ids":"0,3", "spec_value":"黑巧风暴,16G", "image":"", "sell_price":3599, "lineation_price":3799, "cost_price":2400, "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 }, { "id":"108", "ids":"1,0", "spec_value":"白桃乌龙,4G", "image":"", "sell_price":2999, "lineation_price":3299, "cost_price":2000, "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 }, { "id":"109", "ids":"1,1", "spec_value":"白桃乌龙,8G", "image":"", "sell_price":3299, "lineation_price":3599, "cost_price":"2200", "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 }, { "id":"110", "ids":"1,2", "spec_value":"白桃乌龙,12G", "image":"", "sell_price":3599, "lineation_price":3799, "cost_price":2400, "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 }, { "id":"", "ids":"1,3", "spec_value":"白桃乌龙,16G", "image":"", "sell_price":3599, "lineation_price":3799, "cost_price":2400, "stock":1000, "volume":10, "weight":10, "bar_code":202107131607 } ] } ``` **返回示例** ``` { "code": 1, "show": 0, "msg": "修改成功", "data": [] } ```