装修市场-列表
Liquid 模板市场 - 列表
获取指定主题的 Liquid 模板市场列表。Liquid 模板市场提供预设的页面样式方案,可导入为店铺模板的初始数据。
接口信息
认证
请求头中需要携带 skill-access-token:
| Header |
值 |
skill-access-token |
{your-skill-access-token} (请替换为你自己的 token) |
请求参数 (Query String)
| 字段 |
类型 |
必填 |
说明 |
theme_identity |
string |
是 |
系统模板标识。从 店铺模版-列表 获取 |
请求示例
cURL
curl --location --request GET '{your-site-url}/api/skill/theme-liquid/get-market-list?theme_identity=new_default_theme' \
--header 'skill-access-token: {your-skill-access-token}'
返回结果
code 为 200 表示调用成功;code 不为 200 表示调用失败。
成功响应
{
"code": 200,
"data": {
"sample_data": [
{
"identity": "main",
"name": {
"text": "主站 / 主模板",
"lang_params": {
"en": "Main",
"tw": ""
}
},
"image": "main.webp",
"demo": ""
},
{
"identity": "jewelry",
"name": {
"text": "珠宝首饰",
"lang_params": {
"en": "Jewelry",
"tw": ""
}
},
"image": "jewelry.webp",
"demo": ""
}
]
},
"message": "success"
}
返回字段说明
| 字段 |
类型 |
说明 |
code |
Number |
状态码,200 表示成功 |
message |
String |
执行结果的文字描述 |
data |
Object |
模板市场数据 |
data 字段
| 字段 |
类型 |
说明 |
sample_data |
Array[Object] |
预设样式列表 |
sample_data 子项字段
| 字段 |
类型 |
说明 |
identity |
string |
样式唯一标识。用于 装修市场-更新到模版 的 sample_identity 参数,调用后样式直接生效到店铺模板 |
name |
Object |
样式名称,多语言对象 {text, lang_params} |
image |
string |
样式预览图文件名。完整 URL = public_url + /system/theme/{theme_identity}/ + image,其中 public_url 从 得到网站基础URL 获取 |
demo |
string |
演示链接,目前为空 |
name 多语言对象结构
| 字段 |
类型 |
说明 |
text |
string |
默认语言样式名称 |
lang_params |
Object |
各语言的翻译,key 为语言代码(如 en、tw),value 为对应翻译文本 |
注意事项
theme_identity 从 店铺模版-列表 获取
- 不同系统模板支持的预设样式列表不同
identity 字段用于 装修市场-更新到模版,调用后样式直接生效到店铺模板