日韩欧美福利视频_黑人巨大人精品欧美三区_欧美成人另类人妖_欧美在线精品一区二区三区_欧美一区二区三区性视频_日韩精品欧美视频_性欧美极品xxxx欧美一区二区
{
/**
* @description json字符串解析
* @param {string} str
* @param {object} def
* @returns {object}
*/
function jsonParse (str, def = {}) {
try {
const obj = JSON.parse(str)
if (
!!obj
&& (Object.prototype.toString.call(obj) === '[object Object]'
|| Object.prototype.toString.call(obj) === '[object Array]')
) {
return obj
}
return def
} catch (e) {
return def
}
}
// 获取信息流SDK入口
const SDK = typeof HW_FeedsSDK_JS !== 'undefined' && HW_FeedsSDK_JS ? HW_FeedsSDK_JS : window.HW_FeedsSDK_JS
// 是否支持沉浸式(信息流SDK接口)
const isStatusBarDrawableByFeedsSDK = () => SDK && SDK.checkImmersiveSignalBar()
// 初始化hwbr同步接口
let __hwbrNativeInvokeSync
function initNativeInterface () {
if (window._hwbrNative && window._hwbrNative.invokeSync) {
_hwbrNativeInvokeSync = function (...args) {
return window._hwbrNative.invokeSync(...args)
}
}
}
initNativeInterface()
// 是否支持沉浸式(hwbr同步接口)
window.immersiveStatus = false
if (typeof _hwbrNativeInvokeSync === 'function') {
const isStatusBarDrawableSync = jsonParse(_hwbrNativeInvokeSync('app', 'isStatusBarDrawableSync', '[]'))
if (isStatusBarDrawableSync.result === 'true' || isStatusBarDrawableSync.result === 'false') {
window.immersiveStatus = isStatusBarDrawableSync.result === 'true'
} else {
window.immersiveStatus = isStatusBarDrawableByFeedsSDK()
}
} else {
window.immersiveStatus = isStatusBarDrawableByFeedsSDK()
}
})()日韩欧美福利视频_黑人巨大人精品欧美三区_欧美成人另类人妖_欧美在线精品一区二区三区_欧美一区二区三区性视频_日韩精品欧美视频_性欧美极品xxxx欧美一区二区