合入家庭共享与设备消息能力
This commit is contained in:
@@ -2,6 +2,7 @@ import { View, Text, Slider, Image } from '@tarojs/components'
|
||||
import { useState } from 'react'
|
||||
import Taro, { useDidShow } from '@tarojs/taro'
|
||||
import { getToken } from '@/services/auth'
|
||||
import { DEVICE_UNAVAILABLE_MESSAGE } from '@/services/api'
|
||||
import { Binding, loadCurrentChildBindingContext } from '@/services/binding'
|
||||
import { Child } from '@/services/child'
|
||||
import { DeviceAlarmItem, DeviceStatus, getDeviceAlarms, getDeviceStatus, setDeviceRemoteSleepWake, setDeviceVolume } from '@/services/device'
|
||||
@@ -157,8 +158,11 @@ export default function Device() {
|
||||
})
|
||||
} catch (error: any) {
|
||||
setVolumeValue(deviceStatus?.volume ?? fallbackLevel)
|
||||
const message = error?.message === DEVICE_UNAVAILABLE_MESSAGE
|
||||
? '设备不在线或处于休眠中,暂时无法调节音量'
|
||||
: error?.message || '音量设置失败'
|
||||
Taro.showToast({
|
||||
title: error?.message || '音量设置失败',
|
||||
title: message,
|
||||
icon: 'none',
|
||||
})
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user