Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
broadcast_cloud
/
web-live
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
2
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
02d5d3ff
authored
Jan 08, 2021
by
MichaelJier
Browse files
Options
Browse Files
Download
Plain Diff
feature<timer>
1. 增加预发服、正式服ws地址
parents
531890a0
7cb846ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
components/view/index.vue
+8
-1
plugins/API/apiWS.js
+12
-2
store/mutations.js
+3
-0
No files found.
components/view/index.vue
View file @
02d5d3ff
...
@@ -62,9 +62,15 @@ export default {
...
@@ -62,9 +62,15 @@ export default {
},
},
token
()
{
token
()
{
return
this
.
$cookie
.
get
(
this
.
tokenKey
)
?
this
.
$cookie
.
get
(
this
.
tokenKey
).
token
||
0
:
0
return
this
.
$cookie
.
get
(
this
.
tokenKey
)
?
this
.
$cookie
.
get
(
this
.
tokenKey
).
token
||
0
:
0
},
isWebview
()
{
return
navigator
.
userAgent
.
toLowerCase
().
includes
(
'webview'
)
}
}
},
},
async
mounted
()
{
async
mounted
()
{
if
(
this
.
isWebview
)
{
this
.
set_drainage_state
(
0
)
}
this
.
$Bus
.
$on
(
'bus-showLogin'
,
this
.
_toggleLogin
);
this
.
$Bus
.
$on
(
'bus-showLogin'
,
this
.
_toggleLogin
);
await
this
.
get_userInfo
({
refererId
:
this
.
$route
.
query
.
refererId
});
await
this
.
get_userInfo
({
refererId
:
this
.
$route
.
query
.
refererId
});
this
.
set_nowDate
();
this
.
set_nowDate
();
...
@@ -112,7 +118,8 @@ export default {
...
@@ -112,7 +118,8 @@ export default {
}),
}),
...
mapMutations
({
...
mapMutations
({
set_userInfo
:
'set_userInfo'
,
set_userInfo
:
'set_userInfo'
,
set_uuid
:
'set_uuid'
set_uuid
:
'set_uuid'
,
set_drainage_state
:
'set_drainage_state'
}),
}),
async
get_userInfo
(
obj
)
{
async
get_userInfo
(
obj
)
{
const
res
=
await
getWatchLoginInfo
({
const
res
=
await
getWatchLoginInfo
({
...
...
plugins/API/apiWS.js
View file @
02d5d3ff
...
@@ -2,4 +2,14 @@
...
@@ -2,4 +2,14 @@
// ? process.env.DEF_DOMAIM + (window.location.protocol.split(':')[0] === 'https' ? process.env.HTTPS_PORT : process.env.HTTP_PORT)
// ? process.env.DEF_DOMAIM + (window.location.protocol.split(':')[0] === 'https' ? process.env.HTTPS_PORT : process.env.HTTP_PORT)
// : `http:${process.env.DEF_DOMAIM + process.env.HTTP_PORT}`;
// : `http:${process.env.DEF_DOMAIM + process.env.HTTP_PORT}`;
// export const watchTime = `wss://${DEF_DOMAIM}/v1/stats/channel/watchTime`
// export const watchTime = `wss://${DEF_DOMAIM}/v1/stats/channel/watchTime`
export
const
watchTime
=
`wss://bapidev.guangdianyun.tv/v1/stats/channel/watchTime`
let
watchTime
=
''
\ No newline at end of file
if
(
!
process
.
env
.
X_CA_STAGE
)
{
watchTime
=
`wss://bapiprod.guangdianyun.tv/v1/stats/channel/watchTime`
}
else
if
(
process
.
env
.
X_CA_STAGE
===
'PRE'
)
{
watchTime
=
`wss://bapipre.guangdianyun.tv/v1/stats/channel/watchTime`
}
else
if
(
process
.
env
.
X_CA_STAGE
===
'TEST'
)
{
watchTime
=
`wss://bapidev.guangdianyun.tv/v1/stats/channel/watchTime`
}
export
{
watchTime
}
\ No newline at end of file
store/mutations.js
View file @
02d5d3ff
...
@@ -11,6 +11,9 @@ const mutations = {
...
@@ -11,6 +11,9 @@ const mutations = {
set_uuid
(
state
,
info
)
{
set_uuid
(
state
,
info
)
{
state
.
uuid
=
info
;
state
.
uuid
=
info
;
},
},
set_drainage_state
(
state
,
info
)
{
state
.
drainage
[
'drainage_status'
]
=
info
;
},
set_welcomeInfo
(
state
,
info
)
{
set_welcomeInfo
(
state
,
info
)
{
state
.
welcomeInfo
=
info
;
state
.
welcomeInfo
=
info
;
},
},
...
...
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