Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
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
baiguangyao
mr-julyedu
Commits
a02e3eaa
Commit
a02e3eaa
authored
Dec 24, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享
parent
5457b3fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
src/components/activity/newyear-2019/landing/index.js
+21
-0
No files found.
src/components/activity/newyear-2019/landing/index.js
View file @
a02e3eaa
...
...
@@ -45,6 +45,7 @@ class Landing extends Component {
landing
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
boxContainer
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
}
this
.
createMeta
();
}
componentDidUpdate
(
prevProps
)
{
...
...
@@ -53,6 +54,26 @@ class Landing extends Component {
}
}
createMeta
=
()
=>
{
let
meta
=
document
.
createElement
(
'meta'
);
meta
.
setAttribute
(
'name'
,
'description'
)
meta
.
setAttribute
(
'itemprop'
,
'description'
)
meta
.
setAttribute
(
'content'
,
'这里是自定义分享的描述'
)
let
meta2
=
document
.
createElement
(
'meta'
);
meta2
.
setAttribute
(
'itemprop'
,
'name'
)
meta2
.
setAttribute
(
'content'
,
'这里是标题'
)
let
meta3
=
document
.
createElement
(
'meta'
);
meta3
.
setAttribute
(
'itemprop'
,
'image'
)
meta3
.
setAttribute
(
'content'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
)
let
head
=
document
.
getElementsByTagName
(
'head'
)[
0
];
head
.
appendChild
(
meta
);
head
.
appendChild
(
meta2
);
head
.
appendChild
(
meta3
);
}
componentWillUnmount
()
{
this
.
shareTipPopup
&&
this
.
shareTipPopup
.
remove
()
}
...
...
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