Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-lib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑磊
web-lib
Commits
04b15ea3
Commit
04b15ea3
authored
Aug 29, 2026
by
郑磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新room_user_number
parent
cd73944e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
environment.ts
web/environment.ts
+12
-2
No files found.
web/environment.ts
View file @
04b15ea3
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment