getPanelAgentCurrentChatEmotion(params: GetPanelAgentCurrentChatEmotionParams)

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

描述

获取当前聊天心情。

参数

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

返回值

类型:Promise<GetPanelAgentCurrentChatEmotionResult>
GetPanelAgentCurrentChatEmotionResult(字段含义见类型定义与 minituya 返回参数)

引用对象

typeGetPanelAgentCurrentChatEmotionResult
属性类型描述
emotionOpenboolean是否开启了心情
emotionstring心情
textstring文本
urlstring图片链接
gmtCreatenumber创建时间
gmtModifiednumber修改时间

示例代码

请求示例

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

const params = {
  devId: 'your_device_id',
};

getPanelAgentCurrentChatEmotion(params)
  .then(result => {
    console.log('当前聊天心情:', result);
  })
  .catch(error => {
    console.error('获取聊天心情失败:', error);
  });

返回示例

{
  "emotionOpen": true,
  "emotion": "happy",
  "text": "我现在心情很好!",
  "url": "https://example.com/happy_emoji.png",
  "gmtCreate": 1699200000000,
  "gmtModified": 1699200300000
}