getTemplateListByCategory(data: GetTemplateListByCategoryParams)

版本要求:
@tuya-miniapp/cloud-api≥1.7.0

描述

按分类分页查询模版列表

参数

参数类型必填说明
是请求参数

返回值

类型:Promise<GetTemplateListByCategoryResult>
GetTemplateListByCategoryResult

引用对象

interfaceGetTemplateListByCategoryResult按分类分页查询模版列表结果
属性类型描述
nodeNamestring分类名称
nodeCodestring分类编码
pageNonumber当前页
pageSizenumber每页数量
totalnumber总数
hasMoreboolean是否还有下一页
模板列表

示例代码

请求示例

import { getTemplateListByCategory } from '@tuya-miniapp/cloud-api';

getTemplateListByCategory({ categoryCode: 'meeting', pageNo: 1, pageSize: 20 })
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('按分类分页查询模版列表失败:', error);
  });

返回示例

{
  "nodeName": "会议",
  "nodeCode": "meeting",
  "pageNo": 1,
  "pageSize": 20,
  "total": 35,
  "hasMore": true,
  "list": [{ "id": "tpl_1", "templateName": "会议纪要", "customize": false }]
}