getConfigByKey(data: GetConfigByKeyParams)

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

描述

通过 key 获取配置数据

参数

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

返回值

类型:Promise<string>
GetConfigByKeyResult

示例代码

请求示例

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

getConfigByKey({ key: 'xxx' })
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('通过 key 获取配置数据失败:', error);
  });

返回示例

"https://example.com/xxx"