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
d572dd3d
Commit
d572dd3d
authored
Dec 18, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信分享文案
parent
8cb09317
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
src/components/activity/newyear-2019/landing/index.js
+17
-6
No files found.
src/components/activity/newyear-2019/landing/index.js
View file @
d572dd3d
...
...
@@ -19,6 +19,8 @@ class Landing extends Component {
joinSuccessPopup
=
null
shareTipPopup
=
null
swiper
=
null
shareTitle
=
''
shareDesc
=
''
state
=
{
...
...
@@ -65,10 +67,12 @@ class Landing extends Component {
activityEnd
:
data
.
status
==
5
})
this
.
setupWxShareConfig
(
data
.
member
)
if
(
browser
.
isWeixin
)
{
wxShare
({
title
:
`@
${
data
.
member
[
0
].
user_name
}
邀您一起组队拿豪礼!`
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
title
:
this
.
shareTitle
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
getParam
(
'treasure_code'
)}
&origin=2`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
...
...
@@ -91,6 +95,13 @@ class Landing extends Component {
})
}
setupWxShareConfig
=
member
=>
{
const
len
=
member
.
length
let
count
=
5
-
len
<=
0
?
4
:
5
-
len
this
.
shareTitle
=
`还差
${
count
}
人即可开宝箱,100%有奖!`
this
.
shareDesc
=
'加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!--七月在线'
}
showSharePromptWithParam
=
()
=>
{
if
(
sessionStorage
.
getItem
(
'showShareTip'
)
&&
!
sessionStorage
.
getItem
(
'closedRemind'
))
{
this
.
showShareTip
()
...
...
@@ -187,8 +198,8 @@ class Landing extends Component {
const
{
history
,
match
,
user
,
location
}
=
this
.
props
if
(
getParam
(
'version'
))
{
let
data
=
{
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
title
:
this
.
shareTitle
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
treasure_code
}
&origin=2`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
}
...
...
@@ -304,8 +315,8 @@ class Landing extends Component {
if
(
browser
.
isAndroidApp
||
browser
.
isIOSApp
)
{
SendMessageToApp
(
'toShare'
,
{
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
title
:
this
.
shareTitle
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
getParam
(
'treasure_code'
)}
&origin=2`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
...
...
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