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
081884cc
Commit
081884cc
authored
Jul 13, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2020-717-formal' into dev
parents
483c6307
c16eaff9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
152 additions
and
29 deletions
+152
-29
src/components/activity/2020-717/activity/index.js
+40
-6
src/components/activity/2020-717/activity/index.scss
+76
-1
src/components/activity/2020-717/index.js
+8
-2
src/components/activity/2020-717/invitation/index.js
+16
-14
src/components/activity/2020-717/invitation/index.scss
+12
-6
No files found.
src/components/activity/2020-717/activity/index.js
View file @
081884cc
...
...
@@ -139,8 +139,8 @@ class Anniversary2020 extends Component {
http
.
get
(
`
${
API
.
home
}
/activity/anniversary/activityStage`
)
.
then
(
res
=>
{
const
{
code
,
msg
,
data
}
=
res
.
data
this
.
setupCountDown
(
data
.
count_down
)
if
(
code
===
200
)
{
this
.
setupCountDown
(
data
.
count_down
)
this
.
setState
({
activityData
:
data
,
},
this
.
bindNavAction
())
...
...
@@ -267,7 +267,7 @@ class Anniversary2020 extends Component {
const
_records
=
Array
.
isArray
(
data
)
?
data
:
[]
this
.
setState
(
state
=>
{
return
{
prizeRecords
:
_records
,
prizeRecords
:
state
.
prizeRecords
.
concat
(
_records
)
,
prizeRecordsPagination
:
state
.
prizeRecordsPagination
+
1
,
}
},
()
=>
{
...
...
@@ -716,6 +716,34 @@ class Anniversary2020 extends Component {
<
/Carousel
>
}
<
div
className
=
"prize-wrapper"
>
{
/*<ul className={'h--bar bar'}>
{
Array(11).fill('a').map((item, index) => {
return <li key={index}></li>
})
}
</ul>
<ul className={'h--bar bar'}>
{
Array(11).fill('a').map((item, index) => {
return <li key={index}></li>
})
}
</ul>
<ul className={'bar v--bar'}>
{
Array(8).fill('a').map((item, index) => {
return <li key={index}></li>
})
}
</ul>
<ul className={'bar v--bar'}>
{
Array(8).fill('a').map((item, index) => {
return <li key={index}></li>
})
}
</ul>*/
}
<
div
className
=
{
'h-bar'
}
><
/div
>
<
div
className
=
{
'h-bar'
}
><
/div
>
<
div
className
=
{
'v-bar'
}
><
/div
>
...
...
@@ -728,7 +756,7 @@ class Anniversary2020 extends Component {
{
active
:
drawingItemId
===
item
.
id
,
available
:
index
===
4
&&
(
user
.
hasError
||
prizeData
.
odd_times
),
unavailable
:
index
===
4
&&
(
activityData
.
stage
===
1
||
!
prizeData
.
odd_times
),
unavailable
:
index
===
4
&&
!
user
.
hasError
&&
(
activityData
.
stage
===
1
||
!
prizeData
.
odd_times
),
},
])}
onClick
=
{
this
.
draw
.
bind
(
this
,
index
)}
>
{
...
...
@@ -1084,10 +1112,16 @@ class Anniversary2020 extends Component {
Button
=
<
button
className
=
{
'unavailable'
}
>
活动已结束
<
/button
>
}
}
return
<
li
className
=
{
'course'
}
key
=
{
index
}
>
return
<
li
className
=
{
'course'
}
key
=
{
index
}
onClick
=
{(
e
)
=>
{
const
nodeName
=
e
.
target
.
nodeName
.
toLowerCase
()
if
(
nodeName
!==
'a'
)
{
history
.
push
(
`/detail?id=
${
item
.
course_id
}
`
)
}
}
}
>
<
div
className
=
"cover"
>
{
item
.
save
&&
<
span
>
立省
{
item
.
save
}
元
<
/span
>
!!
item
.
save
&&
<
span
>
立省
{
item
.
save
}
元
<
/span
>
}
<
img
src
=
{
item
.
image_name
}
alt
=
""
/>
...
...
@@ -1099,8 +1133,8 @@ class Anniversary2020 extends Component {
item
.
type
===
1
?
<
div
className
=
"purchased"
>
已购买
<
/div
>
:
<
div
className
=
"prices"
>
<
span
>
¥
{
item
.
price0
}
<
/span
>
<
span
>
¥
{
item
.
price1
}
<
/span
>
<
span
>
¥
{
item
.
price0
}
<
/span
>
<
/div
>
}
<
div
className
=
"btn"
>
...
...
src/components/activity/2020-717/activity/index.scss
View file @
081884cc
...
...
@@ -223,7 +223,7 @@
text-overflow
:
ellipsis
;
}
.title
{
.title
{
font-size
:
15px
;
font-weight
:
bold
;
}
...
...
@@ -387,6 +387,81 @@
}
}
$dot_size
:
5px
;
$twinkle_duration
:
1s
;
.bar
{
position
:
absolute
;
display
:
flex
;
li
{
flex
:
0
0
auto
;
width
:
$dot_size
;
height
:
$dot_size
;
border-radius
:
50%
;
background
:
#fff
;
}
}
.h--bar
{
left
:
50%
;
top
:
0
;
transform
:
translateX
(
-50%
);
justify-content
:
space-between
;
width
:
280px
;
height
:
$dot_size
;
li
{
animation
:
$twinkle_duration
ease-in-out
infinite
twinkle
;
&
:nth-child
(
even
)
{
animation-delay
:
$twinkle_duration
/
2
;
}
}
&
+
.h--bar
{
top
:
initial
;
bottom
:
0
;
}
}
.v--bar
{
top
:
3px
;
left
:
5px
;
flex-direction
:
column
;
justify-content
:
space-between
;
width
:
$dot_size
;
height
:
198px
;
li
{
animation
:
$twinkle_duration
ease-in-out
$twinkle_duration
/
2
infinite
twinkle
;
&
:nth-child
(
even
)
{
animation-delay
:
$twinkle_duration
/
4
;
}
}
&
+
.v--bar
{
left
:
initial
;
right
:
5px
;
}
}
@keyframes
twinkle
{
from
{
background
:
#fff
;
}
50
%
{
background
:
#FFDA09
;
}
to
{
background
:
#fff
;
}
}
.prizes
{
display
:
flex
;
justify-content
:
space-around
;
...
...
src/components/activity/2020-717/index.js
View file @
081884cc
import
React
,
{
Component
}
from
'react'
;
import
{
Switch
,
Route
}
from
"react-router-dom"
;
import
React
,
{
Component
}
from
'react'
;
import
{
Switch
,
Route
}
from
"react-router-dom"
;
import
Anniversary2020
from
"@components/activity/2020-717/activity"
import
Question
from
"@components/activity/2020-717/question"
import
Invitation
from
"@components/activity/2020-717/invitation"
class
Anniversary2020Entry
extends
Component
{
componentDidMount
()
{
document
.
title
=
'7.17 五周年庆,AI好课1分起购,答题、购课100%有奖!华为P40 Pro+,课程免单等你来!--七月在线'
}
render
()
{
const
match
=
this
.
props
.
match
return
(
...
...
src/components/activity/2020-717/invitation/index.js
View file @
081884cc
...
...
@@ -78,6 +78,9 @@ class Invitation extends Component {
teamInfo
:
data
,
isMaster
:
data
.
is_captain
||
!
getParam
(
'team_code'
),
});
if
(
data
.
is_captain
){
this
.
getInvitationInfo
()
}
}
else
{
Toast
.
info
(
msg
)
}
...
...
@@ -90,7 +93,7 @@ class Invitation extends Component {
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
(
url
+
"&aa=bb"
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
window
.
location
.
href
+
"&aa=bb"
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
}
else
{
history
.
push
(
'/passport'
)
}
...
...
@@ -175,6 +178,17 @@ class Invitation extends Component {
})
}
<
/ul
>
<
/div
>
{
isShowGuide
&&
<
div
className
=
"guide"
onClick
=
{()
=>
{
this
.
setState
({
isShowGuide
:
false
,
});
}}
>
<
i
className
=
{
'indicator'
}
><
/i
>
<
div
className
=
"tip"
>
点击右上角,分享给好友
<
/div
>
<
/div
>
}
<
div
className
=
"op"
>
{
isMaster
?
...
...
@@ -204,19 +218,8 @@ class Invitation extends Component {
drawQuestions
=
{
this
.
drawQuestions
}
isAnswered
=
{
teamInfo
.
is_answer
}
/
>
<
/
>
}
<
/div
>
<
/div
>
{
isShowGuide
&&
<
div
className
=
"guide"
onClick
=
{()
=>
{
this
.
setState
({
isShowGuide
:
false
,
});
}}
>
<
i
className
=
{
'indicator'
}
><
/i
>
<
div
className
=
"tip"
>
点击右上角,分享给好友
<
/div
>
<
/div
>
}
<
/div
>
);
}
...
...
@@ -236,7 +239,6 @@ function BottomButton({status, isActivityEnd, isAnswered, joinTeam, drawQuestion
}
export
default
compose
(
WithFullSize
,
connect
(
({
user
})
=>
({
user
}),
null
,
...
...
src/components/activity/2020-717/invitation/index.scss
View file @
081884cc
html
,
body
,
#root
{
min-height
:
100%
;
}
#invitation
{
height
:
100%
;
min-height
:
100%
;
padding-bottom
:
60px
;
background
:
#2E00DC
;
.banner
{
...
...
@@ -12,9 +18,8 @@
.prize-container
{
position
:
relative
;
padding
:
15px
;
margin
:
0
auto
8px
;
margin
:
0
auto
;
width
:
355px
;
height
:
219px
;
background
:
rgba
(
39
,
27
,
211
,
1
);
border
:
4px
solid
;
border-image
:
linear-gradient
(
0deg
,
rgba
(
33
,
32
,
244
,
1
)
,
rgba
(
94
,
167
,
248
,
1
))
10
10
;
...
...
@@ -136,9 +141,10 @@
}
.op
{
position
:
fixed
;
bottom
:
40px
;
left
:
0
;
//position: fixed;
//bottom: 40px;
//left: 0;
margin-top
:
163px
;
width
:
100%
;
text-align
:
center
;
...
...
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