Commit 04b15ea3 authored by 郑磊's avatar 郑磊

更新room_user_number

parent cd73944e
......@@ -41,15 +41,25 @@ export const device: DeviceType = in_app
export const can_use_iap = in_app ? getQueryOrCookie('canUseIAP') === 'true' : false
/**
* 当前所在直播间的主播
* 当前所在直播间的主播id
*/
export const room_number = (() => {
if (!in_app) return 0
if (getQueryOrCookie('isOnLiveRoom') !== '1') return 0
// if (getQueryOrCookie('isOnLiveRoom') !== '1') return 0
const identifier = parseInt(getQueryOrCookie('roomIdentifier', '0'))
return !isNaN(identifier) && Number.isSafeInteger(identifier) && identifier > 0 ? identifier : 0
})()
/**
* 当前所在直播间的主播user_number
*/
export const room_user_number = (() => {
if (!in_app) return 0
// if (getQueryOrCookie('isOnLiveRoom') !== '1') return 0
const identifier = parseInt(getQueryOrCookie('roomNumber', '0'))
return !isNaN(identifier) && Number.isSafeInteger(identifier) && identifier > 0 ? identifier : 0
})()
/**
* 标准化语言标识
* @param lang
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment