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 房间管理

    • getRoomInfo 获取房间信息
    • getAllRoomInfoList 获取房间列表
    • createRoom 创建房间
      • deleteRoom 删除房间
      • updateRoomInfo 更新房间信息
    • Media 媒体

    • Location 定位

    • Encryption 加/解密

    • FileStorage 文件/存储

    • Http 网络/请求

    • weather 天气信息

    • Siri

    • TelPhone

    请扫码查看示例

    # createRoom ^7.9

    创建房间

    # 请求参数

    Prop Type Default Comment
    homeId String N/A 家庭 id 必填
    name String N/A 必须, 房间名称
    des String N/A 非必须,描述
    icon String N/A 必须,图标(1-28),现在设计为云端只保存图标的索引,app 映射为具体的图标

    # icon 的映射图标请参考

    icon 参考映射地址 (opens new window)

    # 引入接口模块

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

    # 接口调用示例

    const params = {
      homeId: '家庭id 必填',
      name: '必须, 房间名称',
      des: '非必须,描述',
      icon: '必须,图标(1-28),现在设计为云端只保存图标的索引,app映射为具体的图标 2',
    }
    bridge
      .createRoom(params)
      .then((res) => {
        console.log(res)
      })
      .catch((err) => {
        console.log(err)
      })
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14

    # 接口返回示例

    {
        "roomInfo": {
            "homegroupId": "123412515",
            "id": "123124",
            "name": "room1",
            "desc": "",
            "icon": "2"
        }
    }
    
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11