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
64ab5a81
Commit
64ab5a81
authored
Dec 13, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '00' into dev
parents
0f9cdcfa
6b78adcf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
15 deletions
+28
-15
src/components/activity/newyear-2019/landing/index.js
+28
-15
No files found.
src/components/activity/newyear-2019/landing/index.js
View file @
64ab5a81
...
@@ -118,7 +118,7 @@ class Landing extends Component {
...
@@ -118,7 +118,7 @@ class Landing extends Component {
})
})
}
}
joinSuccess
=
({
id
,
status
,
my_team
:
{
team_num
,
lack_member
,
is_team
}})
=>
{
joinSuccess
=
({
id
,
status
,
my_team
:
{
team_num
,
lack_member
,
is_team
,
treasure_code
}})
=>
{
const
{
history
}
=
this
.
props
const
{
history
}
=
this
.
props
this
.
joinSuccessPopup
=
Popup
({
this
.
joinSuccessPopup
=
Popup
({
title
:
<
div
className
=
{
'join-success'
}
>
title
:
<
div
className
=
{
'join-success'
}
>
...
@@ -132,7 +132,7 @@ class Landing extends Component {
...
@@ -132,7 +132,7 @@ class Landing extends Component {
status
===
2
status
===
2
?
'组队成功,恭喜你获得一个宝箱!'
?
'组队成功,恭喜你获得一个宝箱!'
:
is_team
:
is_team
?
`您的
${
<
span
>
{
team_num
}
<
/span>}号队伍还差${<span>{lack_member}</
span
>
}
人即可获得宝箱`
?
<>
您的
{
<
span
>
{
team_num
}
<
/span>}号队伍还差{<span>{lack_member}</
span
>
}
人即可获得宝箱
<
/
>
:
'自己当队长,宝箱内有专属奖品哦~'
:
'自己当队长,宝箱内有专属奖品哦~'
}
}
<
/div
>
<
/div
>
...
@@ -147,18 +147,22 @@ class Landing extends Component {
...
@@ -147,18 +147,22 @@ class Landing extends Component {
/
>
/
>
:
is_team
:
is_team
?
<
button
type
=
'button'
?
<
button
type
=
'button'
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
t
his
.
state
.
teamData
[
'my_team'
][
'treasure_code'
]
)}
>
继续组队
<
/button
>
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
t
reasure_code
)}
>
继续组队
<
/button
>
:
<
button
type
=
"button"
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button
>
:
<
button
type
=
"button"
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button
>
}
}
<
/div>
,
<
/div>
,
closeIcon
:
this
.
closeIcon
,
closeIcon
:
this
.
closeIcon
,
close
:
()
=>
{
close
:
()
=>
{
this
.
fetchPageData
()
this
.
fetchPageData
()
this
.
getFollowStatus
()
.
then
(
isFollow
=>
{
!
isFollow
&&
this
.
remind
(
'join'
,
getParam
(
'treasure_code'
))
})
}
}
})
})
}
}
inviteMembers
=
(
treasure_code
)
=>
{
inviteMembers
=
treasure_code
=>
{
const
{
history
,
match
,
user
,
location
}
=
this
.
props
const
{
history
,
match
,
user
,
location
}
=
this
.
props
if
(
browser
.
isWeixin
)
{
if
(
browser
.
isWeixin
)
{
wxShare
({
wxShare
({
...
@@ -171,19 +175,23 @@ class Landing extends Component {
...
@@ -171,19 +175,23 @@ class Landing extends Component {
sessionStorage
.
setItem
(
'showShareTip'
,
'1'
)
sessionStorage
.
setItem
(
'showShareTip'
,
'1'
)
history
.
replace
(
`
${
match
.
path
}
?treasure_code=
${
treasure_code
}
&origin=
${
1
}
`
)
history
.
replace
(
`
${
match
.
path
}
?treasure_code=
${
treasure_code
}
&origin=
${
1
}
`
)
this
.
createTeamSuccessPopup
&&
this
.
createTeamSuccessPopup
.
remove
()
&&
(
this
.
createTeamSuccessPopup
=
null
)
this
.
createTeamSuccessPopup
&&
this
.
createTeamSuccessPopup
.
remove
()
&&
(
this
.
createTeamSuccessPopup
=
null
)
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
&&
(
this
.
joinSuccessPopup
=
null
)
this
.
fetchPageData
({
treasure_code
,
origin
:
1
})
this
.
fetchPageData
({
treasure_code
,
origin
:
1
})
this
.
setState
({
isCaptain
:
true
})
}
}
createTeamSuccess
=
(
member
,
team_num
,
lack_member
,
treasure_code
)
=>
{
getFollowStatus
=
()
=>
http
.
get
(
`
${
API
.
home
}
/sys/user/isFollowWeChat`
)
let
isFollow
=
false
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
&&
(
this
.
joinSuccessPopup
=
null
)
http
.
get
(
`
${
API
.
home
}
/sys/user/isFollowWeChat`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
errno
,
status
}
=
res
.
data
const
{
code
,
data
}
=
res
.
data
if
(
errno
===
0
&&
status
===
1
)
{
return
code
===
200
&&
data
[
'is_follow'
]
isFollow
=
true
}
})
})
createTeamSuccess
=
(
member
,
team_num
,
lack_member
,
treasure_code
)
=>
{
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
&&
(
this
.
joinSuccessPopup
=
null
)
this
.
getFollowStatus
()
.
then
(
isFollow
=>
{
this
.
createTeamSuccessPopup
=
Popup
({
this
.
createTeamSuccessPopup
=
Popup
({
title
:
'创建成功'
,
title
:
'创建成功'
,
className
:
'landing-create-success'
,
className
:
'landing-create-success'
,
...
@@ -218,6 +226,8 @@ class Landing extends Component {
...
@@ -218,6 +226,8 @@ class Landing extends Component {
}
}
}
}
})
})
})
}
}
remind
=
(
type
=
'create'
,
treasure_code
)
=>
{
remind
=
(
type
=
'create'
,
treasure_code
)
=>
{
...
@@ -239,7 +249,7 @@ class Landing extends Component {
...
@@ -239,7 +249,7 @@ class Landing extends Component {
<
div
className
=
"des"
>
长按识别
/
扫码
关注【七月在线】服务号即可预约
<
/div
>
<
div
className
=
"des"
>
长按识别
/
扫码
关注【七月在线】服务号即可预约
<
/div
>
<
/div>
,
<
/div>
,
close
:
()
=>
{
close
:
()
=>
{
history
.
replace
(
`
${
match
.
path
}
?treasure_code=
${
treasure_code
}
&origin=1`
)
//
history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`)
this
.
fetchPageData
({
this
.
fetchPageData
({
treasure_code
,
treasure_code
,
origin
:
'1'
origin
:
'1'
...
@@ -290,7 +300,10 @@ class Landing extends Component {
...
@@ -290,7 +300,10 @@ class Landing extends Component {
closable
:
false
,
closable
:
false
,
close
:
()
=>
{
close
:
()
=>
{
sessionStorage
.
removeItem
(
'showShareTip'
)
sessionStorage
.
removeItem
(
'showShareTip'
)
this
.
remind
()
this
.
getFollowStatus
()
.
then
(
isFollow
=>
{
!
isFollow
&&
this
.
remind
(
'create'
,
getParam
(
'treasure_code'
))
})
}
}
})
})
}
}
...
@@ -473,7 +486,7 @@ class Landing extends Component {
...
@@ -473,7 +486,7 @@ class Landing extends Component {
<
/button
>
<
/button
>
}
}
{
{
prize_info
&&
!
activityEnd
&&
!
isCaptain
&&
<
div
className
=
"certainly-prompt"
>
prize_info
&&
prize_info
.
length
!==
0
&&
!
activityEnd
&&
!
isCaptain
&&
<
div
className
=
"certainly-prompt"
>
第
{
prize_info
[
0
].
stage_no
}
次必中
{
prize_info
[
0
].
name
}
第
{
prize_info
[
0
].
stage_no
}
次必中
{
prize_info
[
0
].
name
}
<
/div
>
<
/div
>
}
}
...
...
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