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
7cb846ea
authored
Jan 07, 2021
by
MichaelJier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature<traffic_driving>
1. 判断ua中是否包含webview关键词区分内嵌页环境
parent
7be060cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
components/view/index.vue
+9
-2
store/mutations.js
+3
-0
No files found.
components/view/index.vue
View file @
7cb846ea
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getWatchLoginInfo
,
getDrainage
}
from
'@/plugins/API/apiAll'
;
import
{
getWatchLoginInfo
}
from
'@/plugins/API/apiAll'
;
import
{
mapGetters
,
mapMutations
,
mapActions
}
from
'vuex'
;
import
{
mapGetters
,
mapMutations
,
mapActions
}
from
'vuex'
;
import
encrypt
from
'@/components/encrypt/index'
;
import
encrypt
from
'@/components/encrypt/index'
;
import
white
from
'@/components/white/index'
;
import
white
from
'@/components/white/index'
;
...
@@ -57,9 +57,15 @@ export default {
...
@@ -57,9 +57,15 @@ export default {
isPeep
()
{
isPeep
()
{
const
peep
=
this
.
channelConfig
.
peep
||
{};
const
peep
=
this
.
channelConfig
.
peep
||
{};
return
!!
peep
.
isEnable
;
return
!!
peep
.
isEnable
;
},
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
);
this
.
get_userInfo
({
refererId
:
this
.
$route
.
query
.
refererId
});
this
.
get_userInfo
({
refererId
:
this
.
$route
.
query
.
refererId
});
this
.
set_nowDate
();
this
.
set_nowDate
();
...
@@ -71,7 +77,8 @@ export default {
...
@@ -71,7 +77,8 @@ export default {
PostInfo
:
'PostInfo'
PostInfo
:
'PostInfo'
}),
}),
...
mapMutations
({
...
mapMutations
({
set_userInfo
:
'set_userInfo'
set_userInfo
:
'set_userInfo'
,
set_drainage_state
:
'set_drainage_state'
}),
}),
async
get_userInfo
(
obj
)
{
async
get_userInfo
(
obj
)
{
const
res
=
await
getWatchLoginInfo
({
const
res
=
await
getWatchLoginInfo
({
...
...
store/mutations.js
View file @
7cb846ea
...
@@ -8,6 +8,9 @@ const mutations = {
...
@@ -8,6 +8,9 @@ const mutations = {
set_drainage
(
state
,
info
)
{
set_drainage
(
state
,
info
)
{
state
.
drainage
=
info
;
state
.
drainage
=
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