智能照明系统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/d6/d662974059f69be65eca0a96a06...

17 lines
413 B

3 years ago
const isQQ = window.qq &&
window.qq.miniProgram &&
/QQ/i.test(navigator.userAgent) &&
/miniProgram/i.test(navigator.userAgent)
export function initWebviewApi (readyCallback) {
if (!isQQ) {
return
}
if (window.QQJSBridge && window.QQJSBridge.invoke) {
setTimeout(readyCallback, 0)
} else {
document.addEventListener('QQJSBridgeReady', readyCallback)
}
return window.qq.miniProgram
}