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
2deb35ad
Commit
2deb35ad
authored
Jul 09, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周年庆
parent
bf513c26
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
31 deletions
+32
-31
src/components/activity/2020-717/activity/index.js
+27
-18
src/components/activity/2020-717/activity/index.scss
+5
-3
src/components/activity/2020-717/question/index.js
+0
-10
No files found.
src/components/activity/2020-717/activity/index.js
View file @
2deb35ad
...
...
@@ -30,6 +30,7 @@ class Anniversary2020 extends Component {
4.每人只能当1次队员哦
`
drawTimer
=
null
hasMore
=
true
state
=
{
//静态数据
...
...
@@ -113,9 +114,6 @@ class Anniversary2020 extends Component {
this
.
getBulletScreenData
()
this
.
getRankList
()
this
.
getStageCourses
(
'zero'
)
if
(
!
this
.
props
.
user
.
hasError
)
{
this
.
getPrizeRecords
()
}
if
(
this
.
store
.
session
.
get
(
'toInvitation'
)
&&
!
this
.
props
.
user
.
hasError
)
{
this
.
getFollowStaus
()
this
.
store
.
session
.
remove
(
'toInvitation'
)
...
...
@@ -250,9 +248,9 @@ class Anniversary2020 extends Component {
}
getPrizeRecords
=
(()
=>
{
let
hasMore
=
true
,
isFetching
=
false
let
isFetching
=
false
return
()
=>
{
if
(
isFetching
||
!
hasMore
)
{
if
(
isFetching
||
!
this
.
hasMore
)
{
return
}
isFetching
=
true
...
...
@@ -261,7 +259,7 @@ class Anniversary2020 extends Component {
const
{
code
,
msg
,
data
}
=
res
.
data
if
(
code
===
200
)
{
if
(
isEmpty
(
data
))
{
hasMore
=
false
this
.
hasMore
=
false
}
const
_records
=
Array
.
isArray
(
data
)
?
data
:
[]
this
.
setState
(
state
=>
{
...
...
@@ -422,10 +420,8 @@ class Anniversary2020 extends Component {
}
draw
=
debounce
((
i
)
=>
{
if
(
i
!==
4
)
{
return
}
if
(
this
.
state
.
isDrawing
)
{
const
{
activityData
,
prizeData
,
isDrawing
}
=
this
.
state
if
(
i
!==
4
||
isDrawing
||
prizeData
.
odd_times
===
0
||
activityData
.
stage
===
4
)
{
return
}
this
.
startDraw
()
...
...
@@ -451,6 +447,8 @@ class Anniversary2020 extends Component {
}
else
{
Toast
.
info
(
msg
)
}
}).
catch
(
e
=>
{
Toast
.
fail
(
'操作频繁,请稍后再试'
)
})
}
...
...
@@ -498,11 +496,7 @@ class Anniversary2020 extends Component {
isGotoLogin
=
()
=>
{
const
{
user
,
history
}
=
this
.
props
if
(
user
.
hasError
)
{
if
(
browser
.
isWeixin
)
{
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
window
.
location
.
href
+
"?aa=bb"
)
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
}
else
{
history
.
push
(
'/passport'
)
}
return
true
}
return
false
...
...
@@ -726,6 +720,7 @@ class Anniversary2020 extends Component {
return
}
document
.
body
.
style
.
overflow
=
'hidden'
this
.
getPrizeRecords
()
this
.
setState
({
isShowPrizesRecords
:
true
,
},
()
=>
{
...
...
@@ -785,8 +780,13 @@ class Anniversary2020 extends Component {
<
div
className
=
"invite"
>
{
activityData
.
stage
===
1
?
<
button
className
=
{
'invite'
}
>
7
月
15
日开始
<
/button>
:
<
Link
to
=
{
'/anniversary_2020/invitation'
}
onClick
=
{()
=>
{
<
Link
to
=
{
'/anniversary_2020/invitation'
}
onClick
=
{(
e
)
=>
{
if
(
user
.
hasError
)
{
e
.
preventDefault
()
history
.
push
(
'/passport'
)
}
else
{
this
.
store
.
session
.
set
(
'toInvitation'
,
'1'
)
}
}}
>
<
button
className
=
{
'invite'
}
>
邀请好友加入队伍
<
/button
>
<
/Link
>
...
...
@@ -815,7 +815,12 @@ class Anniversary2020 extends Component {
:
<>
{
activityData
.
practice_num
?
<
Link
to
=
{
'/anniversary_2020/question/1'
}
>
?
<
Link
to
=
{
'/anniversary_2020/question/1'
}
onClick
=
{(
e
)
=>
{
if
(
user
.
hasError
)
{
e
.
preventDefault
()
history
.
push
(
'/passport'
)
}
}}
>
<
div
className
=
"btn"
>
<
button
><
i
><
/i>开始练习</
button
>
<
/div
>
...
...
@@ -824,7 +829,9 @@ class Anniversary2020 extends Component {
<
button
><
i
><
/i>开始练习</
button
>
<
/div
>
}
<
div
className
=
"chance"
>
今日剩余
<
span
>
{
activityData
.
practice_num
}
<
/span>次</
div
>
{
!
user
.
hasError
&&
<
div
className
=
"chance"
>
今日剩余
<
span
>
{
activityData
.
practice_num
}
<
/span>次</
div
>
}
<
/
>
}
<
/div
>
...
...
@@ -1106,8 +1113,10 @@ class Anniversary2020 extends Component {
<
i
className
=
{
'iconfont iconiconfront-2 close'
}
onClick
=
{()
=>
{
this
.
records
.
removeEventListener
(
'scroll'
,
this
.
handleRecordsScroll
)
document
.
body
.
style
.
overflow
=
'auto'
this
.
hasMore
=
true
this
.
setState
({
isShowPrizesRecords
:
false
,
prizeRecordsPagination
:
0
});
}}
><
/i
>
<
/div
>
...
...
@@ -1157,7 +1166,7 @@ function WinPrize({name, close, info}) {
<
div
className
=
"modal win-prize"
>
<
div
className
=
"title"
>
恭喜您
<
/div
>
<
div
className
=
"des"
>
抽中了
XXX
<
span
className
=
{
'name'
}
>
{
name
}
<
/span></
div
>
<
div
className
=
"contact"
>
{
info
}
<
/div
>
<
div
className
=
"contact"
>
{
/*{info}*/
}
请添加客服微信号:
********
请添加客服微信号:
<
/div
>
<
button
onClick
=
{
close
}
>
我知道了
<
/button
>
<
/div
>
<
/div
>
...
...
src/components/activity/2020-717/activity/index.scss
View file @
2deb35ad
...
...
@@ -863,6 +863,10 @@
}
}
a
{
text-decoration
:
underline
;
}
td
:nth-of-type
(
1
)
{
font-size
:
16px
;
...
...
@@ -1055,12 +1059,10 @@
.contact
{
width
:
250px
;
height
:
4
0px
;
padding
:
12px
1
0px
;
margin-bottom
:
40px
;
line-height
:
40px
;
border
:
1px
solid
rgba
(
221
,
221
,
221
,
1
);
color
:
#271BD3
;
text-align
:
center
;
}
button
{
...
...
src/components/activity/2020-717/question/index.js
View file @
2deb35ad
...
...
@@ -25,16 +25,6 @@ class Question extends Component {
}
componentDidMount
()
{
const
{
history
,
user
}
=
this
.
props
if
(
user
.
hasError
)
{
if
(
browser
.
isWeixin
)
{
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
url
+
"&aa=bb"
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
}
else
{
history
.
push
(
'/passport'
)
}
return
}
if
(
this
.
props
.
cache
.
recommends
.
length
===
0
)
{
this
.
getQuestion
()
}
...
...
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