getSearchHistoryPanel

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

方法签名
getSearchHistoryPanel(data: )

描述

获取用户的食谱搜索历史(返回关键词数组)

参数

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

返回值

类型:Promise<GetSearchHistoryPanelResult>
GetSearchHistoryPanelResult 搜索关键词数组

引用对象

typeGetSearchHistoryPanelResult搜索历史关键词数组,按时间倒序
string[]

示例代码

请求示例

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

getSearchHistoryPanel({
  devId: 'your_device_id',
})
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('Failed to get search history:', error);
  });

返回示例

["东坡肉", "红烧肉"]