# subscribeMessage ^5.7.0
订阅/取消订阅,设备状态的推送
tip
- 请求成功后,发起订阅的页面能收到推送,其他页面不能收到推送
- 此接口功能是订阅推送,推送内容的接收通过receiveMessage接口
# 请求参数
| Prop | Type | Required | Default | Description | 
|---|---|---|---|---|
| param | Object | Y | {}属性: deviceId:{Type: Array, Default: [],Description: 订阅的设备id:空数组表示清空订阅设备, ['all']订阅用户该家庭所有设备消息推送} | 请求参数 | 
# 接口调用示例
this.$bridge
    .subscribeMessage(params)
    .then(res => {    
    this.$alert(res)
    })
    .catch(err => {
    this.$toast(err)
    })
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
