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 天气信息

    • getWeatherInfo 获取指定城市的天气信息
    • getAppWeatherInfo 获取天气信息
    • Siri

    • TelPhone

    # getAppWeatherInfo ^7.8

    获取天气信息

    # 请求参数

    Prop Type Default Comment
    isNeedRefresh Boolean N/A 是否需要 APP 刷新数据,默认是否

    # 引入接口模块

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

    # 接口调用示例

    const params = {
      isNeedRefresh: true,
    }
    bridge
      .getAppWeatherInfo(params)
      .then((res) => {
        console.log(res)
      })
      .catch((err) => {
        console.log(err)
      })
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11

    # 接口返回示例

    {
        "status": 0, //0:表示成功
        "grade" : "29", //温度
        "weatherStatus" : "多云",
        "windDirection" : "风向(比如南风)",
        "aqi" : "24", //空气质量 0-50优 51-100 良好 100- 差
        "publicDate" : "15:40", //发布时间
        "windForce" :"4", //风速
         "wetness": "79" //湿度
    }
    
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12