MiniX自绘渲染跨平台框架
  • 框架说明
  • 声明式开发范式
  • 内置Api
指南
接口
  • Minix CLI
示例
  • 类Web框架

    • 框架说明
    • 类Web开发范式
    • 内置Api
  • 指南
  • 组件
  • 接口
  • 示例
  • 规范
  • DophinHybrid

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • DolphinWeex

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • 发布消息
  • 常见问题
  • 更新日志
  • 框架说明
  • 声明式开发范式
  • 内置Api
指南
接口
  • Minix CLI
示例
  • 类Web框架

    • 框架说明
    • 类Web开发范式
    • 内置Api
  • 指南
  • 组件
  • 接口
  • 示例
  • 规范
  • DophinHybrid

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • DolphinWeex

    • 快速上手 (opens new window)
    • UI 组件库 (opens new window)
    • jsBridge 接口 (opens new window)
  • 发布消息
  • 常见问题
  • 更新日志
  • 快速上手
  • Basic 基础

  • Account

  • UI 界面

  • Device 设备

  • Bluetooth 蓝牙

  • Wifi WiFi

  • HomeManage 家庭管理

  • RoomManage 房间管理

  • Media 媒体

  • Location 定位

  • Encryption 加/解密

  • FileStorage 文件/存储

  • Http 网络/请求

    • uploadFile http文件上传
    • downloadFile http 文件下载
    • requestDataTransmit 服务透传接口
    • sendCentralCloudRequest 发送给中台的通用网络请求接口
      • uploadLocalFile 通用上传本地文件
      • uploadFileToOss 上传文件到阿里 oss
      • resetCookie
      • sendElectronicRequest
      • sendMCloudRequest
    • weather 天气信息

    • Siri

    • TelPhone

    请扫码查看示例

    # sendCentralCloudRequest ^5.0.0

    发送给中台的通用网络请求接口

    # 请求参数

    Prop Type Required Default Description
    param Object Y {}
    属性:
    url:{
    Type: String,
    Default: N/A,
    Description: 请求接口路径
    }
    method:{
    Type: String,
    Default: POST,
    Description: 请求的方式:POST(默认) / GET
    }
    headers:{
    Type: Object,
    Default: {},
    Description: 请求 header
    }
    data:{
    Type: Object,
    Default: {},
    Description: 请求参数
    }
    bizType:{ // ^6.1.0
    Type: String,
    Default: 0,
    Description: (业务类型0IoT 请求(默认) / 1中国区请求, 注:当 bizType 为 1 时,APP 将在请求 header 中增加 sukey(中国区登录态)信息
    }
    请求参数

    tip

    当bizType为1时,APP 将在请求 header 中增加 sukey (中国区登录态)信息

    # 引入接口模块

    import bridge from '@minix-iot/etsbridge-sdk'
    
    1

    # 接口调用示例

    bridge
      .sendCentralCloudRequest()
      .then((res) => {
        console.log(res)
      })
      .catch((err) => {
        console.log(err)
      })
    
    1
    2
    3
    4
    5
    6
    7
    8

    # 返回参数

    • 失败时返回
    Prop Type Default Description
    errorCode Number N/A 0 服务器错误
    -1 请求超时
    999999 没有网络
    errorMessage String N/A 本地错误信息
    result Object N/A 服务器返回结果