新增商品传参示例(直观展示)

新增商品复杂参数传参示例(直观展示)

1、sku_stocks 传参示例
[
    {
        "price":10000,
        "quantity":100,
        "item_no":"XIGUA-1",
        "skus":[
            {
                "k":"颜色",
                "kid":1,
                "v":"红色",
                "vid":1111
            },
            {
                "k":"产地",
                "kid":2,
                "v":"福建",
                "vid":2222
            },
            {
                "k":"品种",
                "kid":3,
                "v":"麒麟瓜",
                "vid":3333
            }
        ]
    },
    {
        "price":20000,
        "quantity":200,
        "item_no":"XIGUA-2",
        "skus":[
            {
                "k":"颜色",
                "kid":1,
                "v":"红色",
                "vid":1111
            },
            {
                "k":"产地",
                "kid":2,
                "v":"浙江",
                "vid":2223
            },
            {
                "k":"品种",
                "kid":3,
                "v":"麒麟瓜",
                "vid":3333
            }
        ]
    },
    {
        "price":30000,
        "quantity":300,
        "item_no":"XIGUA-3",
        "skus":[
            {
                "k":"颜色",
                "kid":1,
                "v":"黄色",
                "vid":1112
            },
            {
                "k":"产地",
                "kid":2,
                "v":"福建",
                "vid":2222
            },
            {
                "k":"品种",
                "kid":3,
                "v":"麒麟瓜",
                "vid":3333
            }
        ]
    },
    {
        "price":40000,
        "quantity":400,
        "item_no":"XIGUA-4",
        "skus":[
            {
                "k":"颜色",
                "kid":1,
                "v":"黄色",
                "vid":1112
            },
            {
                "k":"产地",
                "kid":2,
                "v":"浙江",
                "vid":2223
            },
            {
                "k":"品种",
                "kid":3,
                "v":"麒麟瓜",
                "vid":3333
            }
        ]
    }
]
2、item_sku_extends 传参示例
[ 
	{ 
	"cost_price":8000,//成本价 
	"s1":1111,//规格层级1对应的规格属性ID 
	"s2":2222,//规格层级2对应的规格属性ID
	"s3":3333,//规格层级3对应的规格属性ID
	"s4":0,//规格层级4对应的规格属性ID
	"s5":0 //规格层级5对应的规格属性ID
	}, 
	{ 
	"cost_price":17000, 
	"s1":1111, 
	"s2":2223, 
	"s3":3333, 
	"s4":0, 
	"s5":0 
	},
	{ 
	"cost_price":-1,//多规格商品若只设置部分规格商品成本价,无成本价的sku成本价传入-1
	"s1":1112, 
	"s2":2222, 
	"s3":3333, 
	"s4":0, 
	"s5":0 
	},
	{ 
	"cost_price":-1, 
	"s1":1112, 
	"s2":2223, 
	"s3":3333, 
	"s4":0, 
	"s5":0 
	} 
]
3、sku_images 传参示例
[
                {
                    "v":"红色",
                    "img_url":"https://img.yzcdn.cn/upload_files/2019/06/05/FhQMXApjuvEnl47VaK_GCaGp565R.jpg"
                    
                },
                {
                    "v":"黄色",
                    "img_url":"https://img.yzcdn.cn/upload_files/2019/06/05/Fqoq8JtHgEZmPeKWSVZfBAPDfUzA.jpg"
                }
    ]
4、messages 传参示例
[
    {
        "datetime":0,
        "editable":true,
        "multiple":1,
        "name":"文本格式",
        "required":1,
        "type":"text"
    },
    {
        "datetime":0,
        "editable":true,
        "multiple":0,
        "name":"数字格式",
        "required":0,
        "type":"tel"
    },
    {
        "datetime":0,
        "editable":true,
        "multiple":0,
        "name":"邮件格式",
        "required":0,
        "type":"email"
    },
    {
        "datetime":0,
        "editable":true,
        "multiple":0,
        "name":"日期格式",
        "required":0,
        "type":"date"
    },
    {
        "datetime":0,
        "editable":true,
        "multiple":0,
        "name":"时间格式",
        "required":0,
        "type":"time"
    },
    {
        "datetime":0,
        "editable":true,
        "multiple":0,
        "name":"身份证号格式",
        "required":0,
        "type":"id_no"
    },
    {
        "datetime":0,
        "editable":true,
        "multiple":0,
        "name":"图片格式",
        "required":0,
        "type":"image"
    },
    {
        "datetime":0,
        "editable":true,
        "multiple":0,
        "name":"手机号格式",
        "required":0,
        "type":"mobile"
    }
]