{ "version":"2.0.0", "moduleList":[ { "type":"text-image", "texts":[ { "content":"Store", "class":"title" }, { "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded", "class":"body" } ] }, { "type":"image", "images":[ { "url":"//ae01.alicdn.com/kf/HTB1xsTybizxK1RkSnaVq6xn9VXac.jpg", "style":{ } } ] }, { "type":"media", "media":{ "mediaId":219624275851, "previewImage":"https://img.alicdn.com/imgextra/i4/6000000003055/O1CN01qjEfFv1YREThcBx3p_!!6000000003055-0-tbvideo.jpg" } }, { "type":"text", "texts":[ { "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded", "class":"body" } ] }, { "type":"text-image", "texts":[ { "content":"Hello ", "class":"title" }, { "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded", "class":"body" } ], "images":[ { "url":"//ae01.alicdn.com/kf/HTB1yaema4_rK1RkHFqDq6yJAFXag.jpg", "style":{ } } ] }, { "type":"text-image", "texts":[ { "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded", "class":"body" } ], "images":[ { "url":"//ae01.alicdn.com/kf/HTB1qW9FbnHuK1RkSndVq6xVwpXa6.jpg", "style":{ } } ] }, { "type":"text-image", "texts":[ { "content":"story", "class":"title" } ], "images":[ { "url":"//ae01.alicdn.com/kf/HTB1x6avbo_rK1Rjy0Fcq6zEvVXaN.jpg", "style":{ } } ] }, { "type":"html", "html":{ "content":"<h1><font color=\"#b9b6cc\">测试</font></h1>" } }, { "type":"dynamic", "reference":{ "type":"relation", "moduleId":23770182 } } ] }
1.第一级字段只有version和moduleList,version必须等于2.0.0,moduleList的值是一个数组,每一个数组对象都是一个module
2.每个module包含type字段,type的可选值如下表所示:
type | 说明 |
---|---|
image | 图片模块,pc详描和无线详描都可以包含此模块 |
text | 文本模块,pc详描和无线详描都可以包含此模块 |
text-image | 图文模块,pc详描和无线详描都可以包含此模块 |
media | 视频模块,pc详描和无线详描都可以包含此模块 |
dynamic | 产品信息模块,可以是关联模块和自定义模块,只有pc详描可以包含此模块 |
html | 富文本模块,只有pc详描可以包含此模块 |
3.当type=image时,模块格式如下:
{ "type": "image", "images": [ { "url": "//ae01.alicdn.com/kf/H9fa16c70c2c349d9b587ef1ba42eb2c2V.jpg", "style": { "width": 800, "height": 600 }, "targetUrl": "https://www.aliexpress.com/item/10000341358226.html" } ] }
属性说明:
属性名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
images | 数组 | 是 | 图片列表 |
url | string | 是 | 图片url |
style | object | 是 | 图片样式 |
width | int | 是 | 图片的宽度 |
height | int | 是 | 图片的高度 |
hasMargin | boolean | 是 | 图片是否有下边距,可选值为true和false,如果为true,那么图片会有25px的padding,如果为false,那么图片紧挨着下面的内容 |
targetURL | string | 否 | 图片跳转URL |
4.当type=text时,模块格式如下:
{ "type":"text", "texts":[ { "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded", "class":"body" } ] }
属性说明:
属性名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
texts | 数组 | 是 | 文本列表 |
content | string | 是 | 文本内容 |
class | string | 是 | 文本的样式,目前可选值为:body-正文,title-标题 |
5.当type=text-image时,模块格式如下:
{ "type":"text-image", "texts":[ { "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded", "class":"body" } ], "images": [ { "url": "//ae01.alicdn.com/kf/H9fa16c70c2c349d9b587ef1ba42eb2c2V.jpg", "style": { "width": 800, "height": 600 }, "targetUrl": "https://www.aliexpress.com/item/10000341358226.html" } ] }
字段说明参考上面type=text和type=image的说明
6.当type=media时,模块格式如下:
{ "type":"media", "media":{ "mediaId":219624275851, "previewImage":"https://img.alicdn.com/imgextra/i4/6000000003055/O1CN01qjEfFv1YREThcBx3p_!!6000000003055-0-tbvideo.jpg" } }
属性说明:
属性名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
media | object | 是 | 视频内容对象 |
mediaId | string | 是 | 视频id |
previewImage | string | 是 | 视频预览图片 |
7.当type=dynamic时,模块格式如下:
{ "type":"dynamic", "reference":{ "type":"relation", "moduleId":23770182 } }
属性说明:
属性名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
reference | object | 是 | 产品信息模块内容 |
type | string | 是 | 产品信息模块类型,可选值为:relation-关联模块,custom-自定义模块 |
moduleId | int | 是 | 模块id |
8.当type=html时,模块格式如下:
{ "type":"html", "html":{ "content":"<h1><font color=\"#b9b6cc\">测试</font></h1>" } }
属性说明:
属性名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
html | object | 是 | html模块内容对象 |
content | string | 是 | 模块内容,格式为html |