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 网络/请求

  • weather 天气信息

  • Siri

    • canUseSiriShortcut 获取ios设备,是否支持SiriShortcut
    • addSceneToSiriShortcut 添加场景到Siri Shortcut
    • getAllSiriShortcuts 获取场景里的所有Siri 列表
    • editSiriShortcut 编辑场景Siri Shortcut
    • addInstructToSiriShortcut 添加 Siri 自定义指令 Shortcut
      • getAllSiriInstructShortcuts 获取已创建的siri 自定义指令 shortcut 列表
      • editSiriInstructShortcut 编辑自定义指令Siri shortcut
    • TelPhone

    请扫码查看示例

    # addInstructToSiriShortcut ^8.7

    添加 Siri 自定义指令 Shortcut

    # 请求参数

    Prop Type Default Comment
    sceneName String N/A 执行的场景名称,同一个 sceneId 下不能同名
    sceneId String N/A 执行的场景 ID,可以用 deviceId
    jsonData String N/A 执行场景需要的参数 json 字符串
    url String N/A 执行场景的 url,如执行场景的 url 为/v2/scene/execute,(scheme 为https://mp-prod.smartmidea.net:443/mas/v5/app/proxy?alias=),执行的url返回成功的code必须为0
    httpMethod: String N/A "get/post",不区分大小写

    # 引入接口模块

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

    # 接口调用示例

    const params = {
      sceneName: '空调控制123', //string:执行的场景名称,同一个sceneId下不能同名
      sceneId: '11934323', //string:执行的场景ID,可以用deviceId
      jsonData: "{'control':'on','temp':'24.5'}",
      url: '/v2/scene/execut',
      httpMethod: 'get', //string:不区分大小写,
    }
    bridge
      .addInstructToSiriShortcut(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
    15
    • 成功时返回 Object(res)
    Prop Type Default Comment
    status string N/A "0"用户取消添加 “1” 添加成功
    • 失败时返回
    Prop Type Default Comment
    error string N/A 参数不全

    # 接口返回示例

    {
        "status": "0"  // // "0"用户取消添加 “1” 添加成功
    }
    
    {
      "error":"参数不全"
    }
    
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9