ui - blockdate/ios-rn-sdk GitHub Wiki

miot/host/ui

本地原生业务页面访问与处理

Export:
Example

import {Host} from 'miot'
...
//删除设备
Host.ui.openDeleteDevice()
//分享设备
Host.ui.openShareDevicePage

miot/host/ui.openDeleteDevice([title])

弹出删除设备的对话框

Kind: static method of miot/host/ui

Param Type Default Description
[title] string null 自定义提示,不设置使用默认提示

miot/host/ui.openShareDevicePage()

打开分享设备的页面

Kind: static method of miot/host/ui

miot/host/ui.keepScreenNotLock(flag)

是否保持屏幕常亮

Kind: static method of miot/host/ui

Param Type Description
flag Boolean 默认false

miot/host/ui.openRoomManagementPage()

打开房间设备管理的页面

Kind: static method of miot/host/ui

miot/host/ui.openVoiceCtrlDeviceAuthPage()

打开语音设备管理的页面

Kind: static method of miot/host/ui

miot/host/ui.openIftttAutoPage()

打开添加智能的页面

Kind: static method of miot/host/ui

miot/host/ui.openFeedbackInput()

打开反馈页

Kind: static method of miot/host/ui

miot/host/ui.openSecuritySetting()

打开安全管理页

Kind: static method of miot/host/ui

miot/host/ui.openHelpPage()

打开常见问题页,别名「使用帮助」

Kind: static method of miot/host/ui

miot/host/ui.openShareListBar(title, description, imagePath, url)

打开分享列表页面

Kind: static method of miot/host/ui

Param Type Description
title string
description string
imagePath string 和Image source 一样的格式
url string

miot/host/ui.getDevicesWithModel(model) ⇒ Promise.<Array.<devices>>

获取设备列表中指定model的设备信息

Kind: static method of miot/host/ui

Param Type Description
model string 设备model

miot/host/ui.openBtGatewayPage()

打开蓝牙网关页

Kind: static method of miot/host/ui

miot/host/ui.privacyAndProtocolReview(licenseTitle, licenseUrl, policyTitle, policyUrl)

查看软件政策和隐私协议

Kind: static method of miot/host/ui

Param Type Description
licenseTitle string
licenseUrl string require('资源的相对路径')
policyTitle string
policyUrl string require('资源的相对路径')

miot/host/ui.openPrivacyLicense(licenseTitle, licenseUrl, policyTitle, policyUrl) ⇒ Promise

软件政策和隐私协议授权

Kind: static method of miot/host/ui

Param Type Description
licenseTitle string
licenseUrl string require('资源的相对路径')
policyTitle string
policyUrl string require('资源的相对路径')

miot/host/ui.openChangeDeviceName()

打开重命名对话框

Kind: static method of miot/host/ui

miot/host/ui.openAddToDesktopPage()

添加桌面快捷方式

Kind: static method of miot/host/ui

miot/host/ui.openDeviceUpgradePage()

打开设备检查固件升级页

Kind: static method of miot/host/ui

miot/host/ui.openDeviceTimeZoneSettingPage()

打开设备时区设置页

Kind: static method of miot/host/ui

miot/host/ui.openWebPage(url)

打开H5页面

Kind: static method of miot/host/ui

Param Type Description
url string 链接地址

miot/host/ui.openShopPage(gid)

打开商城某商品详情页面

Kind: static method of miot/host/ui

Param Type Description
gid string 商品ID

miot/host/ui.openAddDeviceGroupPage()

打开创建设备组页 只有特定设备支持创建设备组统一管理

Kind: static method of miot/host/ui

miot/host/ui.openEditDeviceGroupPage(dids-)

Kind: static method of miot/host/ui

Param Type Description
dids- Array 包含组设备did的数组

miot/host/ui.openTimerSettingPage(onMethod, onParam, offMethod, offParam)

这个api 应该可以废弃了

Kind: static method of miot/host/ui

Param Type Description
onMethod string 定时到时设备“开”执行的 RPC 指令命令字字符串
onParam string 定时到时设备“开”执行的 RPC 指令参数字符串(目前仅支持单参数)
offMethod string 定时到时设备“关”执行的 RPC 指令命令字字符串
offParam string 定时到时设备“关”执行的 RPC 指令参数字符串(目前仅支持单参数)

miot/host/ui.openTimerSettingPageWithCustomIdentifier(customTimerIdentifier, onMethod, onParam, offMethod, offParam)

这个api 应该可以废弃了

Kind: static method of miot/host/ui

Param Type Description
customTimerIdentifier string 自定义定时Identifier
onMethod string 定时到时设备“开”执行的 RPC 指令命令字字符串
onParam string 定时到时设备“开”执行的 RPC 指令参数字符串(目前仅支持单参数)
offMethod string 定时到时设备“关”执行的 RPC 指令命令字字符串
offParam string 定时到时设备“关”执行的 RPC 指令参数字符串(目前仅支持单参数)

miot/host/ui.openTimerSettingPageWithVariousTypeParams(onMethod, onParam, offMethod, offParam)

Kind: static method of miot/host/ui

Param Type Description
onMethod string 定时到时设备“开”执行的 RPC 指令命令字字符串
onParam json 定时到时设备“开”执行的 RPC 指令参数,可以是字符串、数字、字典、数组
offMethod string 定时到时设备“关”执行的 RPC 指令命令字字符串
offParam json 定时到时设备“关”执行的 RPC 指令参数,可以是字符串、数字、字典、数组

miot/host/ui.openDevice(did, model) ⇒ Promise.<json>

打开某设备列表中的某个设备

Kind: static method of miot/host/ui
Returns: Promise.<json> - 返回被打开的 device 信息

Param Type Description
did string 设备的did
model string 设备的model

miot/host/ui.openPageWithClassName(className)

打开一个原生类 className ,界面类类名 注意 用此方法打开的vc初始化时不需要传参数, 需要传参的viewController暂时还需要手动导出

Kind: static method of miot/host/ui

Param Type Description
className string 类的名字

miot/host/ui.openNewMorePage()

ios特有页面,android 不能使用 打开更多设置页面(通常包括安全设置,常见问题与用户反馈)

Kind: static method of miot/host/ui

miot/host/ui~getDevicesWithModelCallback : function

Kind: inner typedef of miot/host/ui

Param Type
success boolean
devices Object
⚠️ **GitHub.com Fallback** ⚠️