Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-poster
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 52d2b38b
authored
Oct 30, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
ac9e433e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
src/views/poster/index.vue
src/views/poster/index.vue
View file @
52d2b38
...
...
@@ -36,7 +36,7 @@ export default {
},
mounted
()
{
this
.
initWx
()
//
this.id = window.localStorage.getItem('dj_scrm_id') ? JSON.parse(window.localStorage.getItem('dj_scrm_id')) : 0
this
.
id
=
window
.
localStorage
.
getItem
(
'dj_scrm_id'
)
?
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'dj_scrm_id'
))
:
0
this
.
getReportId
()
},
methods
:
{
...
...
@@ -46,10 +46,24 @@ export default {
window
.
$wx
.
hideOptionMenu
()
})
},
setTitle
()
{
this
.
batterData
.
type
==
3
?
(
document
.
title
=
'喜报通知'
)
:
(
document
.
title
=
'战报通知'
)
let
iframe
=
document
.
createElement
(
'iframe'
)
iframe
.
style
.
display
=
'none'
// 这个就是我们异步获取 title 的函数
let
fn
=
function
()
{
setTimeout
(
function
()
{
iframe
.
removeEventListener
(
'load'
,
fn
)
document
.
body
.
removeChild
(
iframe
)
},
0
)
}
iframe
.
addEventListener
(
'load'
,
fn
)
document
.
body
.
appendChild
(
iframe
)
},
getReportId
()
{
poster
.
getReportId
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
batterData
=
res
this
.
batterData
.
type
==
3
?
(
document
.
title
=
'喜报通知'
)
:
(
document
.
title
=
'战报通知'
)
this
.
setTitle
(
)
window
.
$wx
.
hideOptionMenu
()
})
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment