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
9e599aa4
Commit
9e599aa4
authored
Jan 04, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增一得一活动页
parent
1bfa2f93
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
14 deletions
+42
-14
src/components/activity/give-courses/assistance/index.js
+13
-0
src/components/activity/give-courses/give-courses.scss
+1
-0
src/components/activity/give-courses/index.js
+21
-12
src/router/router-config.js
+7
-2
No files found.
src/components/activity/give-courses/assistance/index.js
0 → 100644
View file @
9e599aa4
import
React
,
{
Component
}
from
'react'
class
GiveCourseAssistance
extends
Component
{
render
()
{
return
(
<
div
>
<
/div
>
)
}
}
export
default
GiveCourseAssistance
src/components/activity/give-courses/give-courses.scss
View file @
9e599aa4
...
...
@@ -221,6 +221,7 @@
thead
tr
{
background-color
:
#fadc7f
;
height
:
px2rem
(
30
);
line-height
:
px2rem
(
30
);
@include
px2px
(
font-size
,
26
);
color
:
#ad4700
;
}
...
...
src/components/activity/give-courses/index.js
View file @
9e599aa4
import
React
,
{
Component
}
from
'react'
import
'./give-courses.scss'
import
{
http
}
from
"@/utils"
import
{
getParam
,
http
}
from
"@/utils"
import
{
Toast
}
from
"antd-mobile"
import
{
Link
}
from
"react-router-dom"
...
...
@@ -32,9 +32,12 @@ class GiveCourses extends Component {
banner
:
data
.
active_info
.
m_banner
,
courses
:
data
.
course_info
,
rule
:
data
.
active_info
.
rule
,
awardstext
:
data
.
active_info
.
awards_text
.
split
(
'
\
n
\
n'
)
awardstext
:
data
.
active_info
.
awards_text
.
split
(
'
\
n
\
n'
),
query
:
data
.
active_info
.
activity_name
})
this
.
isRouter
(
data
.
active_info
.
activity_name
)
}
else
{
showToast
(
msg
)
}
...
...
@@ -98,6 +101,12 @@ class GiveCourses extends Component {
})
}
isRouter
=
param
=>
{
if
(
decodeURIComponent
(
getParam
(
'activename'
))
!=
param
){
this
.
props
.
history
.
push
(
'/'
)
}
}
render
()
{
const
{
...
...
@@ -119,7 +128,7 @@ class GiveCourses extends Component {
{
courses
.
map
(
course
=>
{
return
(
<
div
className
=
'give-course'
>
<
div
className
=
'give-course'
key
=
{
course
.
id
}
>
<
Link
className
=
'give-course-img'
to
=
{
`/detail?id=
${
course
.
course_id
}
`
}
>
<
img
src
=
{
course
.
image_name
}
alt
=
""
/>
<
/Link
>
...
...
@@ -148,7 +157,7 @@ class GiveCourses extends Component {
marqueeList
.
map
((
item
,
index
)
=>
{
return
(
<
li
key
=
{
index
}
>
<
img
src
=
{
item
.
head_img
}
alt
/>
<
img
src
=
{
item
.
head_img
}
alt
=
""
/>
<
span
>
{
item
.
nickname
}
<
/span
>
{
item
.
word
}
<
/li
>
...
...
@@ -160,21 +169,21 @@ class GiveCourses extends Component {
<
/div
>
<
/div
>
<
div
class
=
"set-prize"
>
<
p
class
=
"set-prize-title"
>
<
div
class
Name
=
"set-prize"
>
<
p
class
Name
=
"set-prize-title"
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jpsz_icon.png"
alt
=
""
/>
奖品设置
<
/p
>
<
div
class
=
"set-prize-content"
>
<
div
class
Name
=
"set-prize-content"
>
{
awardstext
&&
awardstext
.
length
&&
awardstext
.
map
((
item
,
index
)
=>
<
p
key
=
{
index
}
>
{
item
}
<
/p>
)
}
<
/div
>
<
/div
>
<
div
class
=
"ranking-list"
>
<
div
class
=
"ranking_title"
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jbei_icon.png"
alt
/>
<
div
class
Name
=
"ranking-list"
>
<
div
class
Name
=
"ranking_title"
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jbei_icon.png"
alt
=
""
/>
<
span
>
排行榜
<
/span
>
<
p
>
数据实时更新
只显示
Top50
<
/p
>
<
/div
>
...
...
@@ -223,7 +232,7 @@ class GiveCourses extends Component {
{
rankList
.
list
&&
rankList
.
list
.
length
&&
rankList
.
list
.
length
>
3
?
rankList
.
other
.
map
((
item
,
index
)
=>
{
return
(
<
tr
key
=
'index'
>
<
tr
key
=
{
index
}
>
<
td
>
{
index
+
4
}
<
/td
>
<
td
><
img
src
=
{
item
.
head_img
}
alt
=
""
/><
span
>
{
item
.
name
}
<
/span></
td
>
<
td
>
{
item
.
num
}
<
/td
>
...
...
@@ -244,7 +253,7 @@ class GiveCourses extends Component {
<
/tbody
>
<
/table
>
<
p
class
=
"btm"
><
/p
>
<
p
class
Name
=
"btm"
><
/p
>
<
/div
>
<
p
className
=
"julynotice"
>*
本活动最终解释权归七月在线所有
*<
/p
>
...
...
src/router/router-config.js
View file @
9e599aa4
...
...
@@ -256,6 +256,11 @@ export default [
{
path
:
'/activity/givecourses'
,
exact
:
true
,
component
:
loadable
(()
=>
import
(
/* activity/give-courses */
'@components/activity/give-courses/index'
))
}
component
:
loadable
(()
=>
import
(
/* activity-give-courses */
'@components/activity/give-courses/index'
))
},
{
path
:
'/activity/assistance'
,
exact
:
true
,
component
:
loadable
(()
=>
import
(
/* activity-give-courses-assistance */
'@components/activity/give-courses/assistance/index'
))
},
]
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