getImageTransferNoteTemplateList(data?: GetImageTransferNoteTemplateListParams)

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

描述

翻页查询便签模板(可按分类)

参数

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

返回值

类型:Promise<GetImageTransferNoteTemplateListResult>
GetImageTransferNoteTemplateListResult 模板分页结果

引用对象

interfaceGetImageTransferNoteTemplateListResult翻页查询便签模板结果
属性类型描述
模板列表
pageNonumber当前页码
pageSizenumber每页条数
totalnumber总条数
hasMoreboolean是否还有下一页

合法值

GetImageTransferNoteTemplateListResult.list.categoryType
值说明最低版本
note--
family--
checklist--
reminder--
wordbook--
label--

示例代码

请求示例

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

getImageTransferNoteTemplateList({
  categoryId: 1,
  pageNo: 1,
  pageSize: 20,
})
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('Failed to get note template list:', error);
  });

返回示例

{
  "list": [
    {
      "id": 101,
      "tempCode": "cat-checklist-01",
      "name": "Simple Checklist",
      "categoryType": "checklist",
      "categoryIds": [1],
      "recommended": true,
      "deviceSupported": true,
      "svgUrl": "https://example.com/template.svg",
      "content": {},
      "background": {}
    }
  ],
  "pageNo": 1,
  "pageSize": 20,
  "total": 1,
  "hasMore": false
}

常见问题

为什么调用云能力会出现失败的情况?

使用本接口前,请确保设备所属产品已在涂鸦 IoT 开发平台开启图传高级能力。未启用该能力的设备无法进行图片上传/打印,接口将返回空数据或报错。如需使用,请创建支持图传/打印功能的产品,并在产品详情中启用相应高级能力。同时,接口依赖云能力,需在小程序开发者平台开发设置 - 云能力进行授权配置。