智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LightingSystemApp-serial/.svn/pristine/10/101ec41b873e19f9bbc6f42a634...

41 lines
641 B

3 years ago
import {
onMethod,
invokeMethod
} from '../../platform'
import {
invoke
} from 'uni-core/service/bridge'
export function removeTabBarBadge ({
index
}) {
return invokeMethod('setTabBarBadge', {
index,
type: 'none'
})
}
export function showTabBarRedDot ({
index
}) {
return invokeMethod('setTabBarBadge', {
index,
type: 'redDot'
})
}
export const hideTabBarRedDot = removeTabBarBadge
const callbacks = []
onMethod('onTabBarMidButtonTap', res => {
callbacks.forEach(callbackId => {
invoke(callbackId, res)
})
})
export function onTabBarMidButtonTap (callbackId) {
callbacks.push(callbackId)
}