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
d3b6aa74
Commit
d3b6aa74
authored
Jul 15, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2020-717-formal'
parents
0b6398a8
ae43cd42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
53 deletions
+62
-53
src/components/Index/TopSwiper/index.js
+56
-52
src/components/Index/index.js
+0
-0
src/components/activity/2020-717/activity/index.js
+1
-1
src/components/activity/2020-717/question/index.scss
+5
-0
No files found.
src/components/Index/TopSwiper/index.js
View file @
d3b6aa74
...
...
@@ -6,63 +6,66 @@ import { Link } from "react-router-dom";
class
Index
extends
Component
{
container
=
null
swiper
=
null
container
=
null
swiper
=
null
componentDidMount
()
{
this
.
swiper
=
new
Swiper
(
'.swiper-container'
,
{
direction
:
'horizontal'
,
loop
:
true
,
spaceBetween
:
12
,
centeredSlides
:
true
,
slidesPerView
:
'auto'
,
loopedSlides
:
3
,
autoplay
:
true
})
componentDidMount
()
{
if
(
this
.
props
.
bannerList
.
length
>
1
)
{
this
.
swiper
=
new
Swiper
(
'.swiper-container'
,
{
direction
:
'horizontal'
,
loop
:
true
,
spaceBetween
:
12
,
centeredSlides
:
true
,
slidesPerView
:
'auto'
,
loopedSlides
:
3
,
autoplay
:
true
,
})
}
}
componentWillUnmount
()
{
this
.
swiper
.
destroy
()
}
componentWillUnmount
()
{
this
.
swiper
.
destroy
()
}
render
()
{
const
{
bannerList
}
=
this
.
props
return
(
<
div
className
=
{
'index-banner-swiper'
}
>
<
div
className
=
{
'swiper-container'
}
ref
=
{
el
=>
this
.
container
=
el
}
>
<
ul
className
=
"swiper-wrapper"
>
{
bannerList
&&
bannerList
.
length
>
0
&&
bannerList
.
map
((
item
,
index
)
=>
{
return
(
<
li
className
=
{
'swiper-slide'
}
key
=
{
index
}
>
{
Number
.
isNaN
(
parseInt
(
item
.
jump_url
))
?
<
a
href
=
{
item
.
jump_url
}
key
=
{
index
}
>
<
img
className
=
"item"
src
=
{
item
.
name
}
alt
=
""
/>
<
/a>
:
<
Link
to
=
{{
pathname
:
'/detail'
,
search
:
`?id=
${
item
.
jump_url
}
`
}}
key
=
{
index
}
>
<
img
className
=
"item"
src
=
{
item
.
name
}
alt
=
""
/>
<
/Link
>
}
<
/li
>
)
})
}
<
/ul
>
<
/div
>
<
/div
>
);
}
render
()
{
const
{
bannerList
}
=
this
.
props
return
(
<
div
className
=
{
'index-banner-swiper'
}
>
<
div
className
=
{
'swiper-container'
}
ref
=
{
el
=>
this
.
container
=
el
}
>
<
ul
className
=
"swiper-wrapper"
>
{
bannerList
&&
bannerList
.
length
>
0
&&
bannerList
.
map
((
item
,
index
)
=>
{
return
(
<
li
className
=
{
'swiper-slide'
}
key
=
{
index
}
>
{
Number
.
isNaN
(
parseInt
(
item
.
jump_url
))
?
<
a
href
=
{
item
.
jump_url
}
key
=
{
index
}
>
<
img
className
=
"item"
src
=
{
item
.
name
}
alt
=
""
/>
<
/a>
:
<
Link
to
=
{{
pathname
:
'/detail'
,
search
:
`?id=
${
item
.
jump_url
}
`
,
}}
key
=
{
index
}
>
<
img
className
=
"item"
src
=
{
item
.
name
}
alt
=
""
/>
<
/Link
>
}
<
/li
>
)
})
}
<
/ul
>
<
/div
>
<
/div
>
);
}
}
export
default
Index
;
\ No newline at end of file
src/components/Index/index.js
View file @
d3b6aa74
This diff is collapsed.
Click to expand it.
src/components/activity/2020-717/activity/index.js
View file @
d3b6aa74
...
...
@@ -1002,7 +1002,7 @@ class Anniversary2020 extends Component {
<
/table
>
}
{
!!
_rankList
.
length
&&
!
isShowAllRankList
&&
<
div
className
=
"btn"
>
!!
_rankList
.
length
&&
_rankList
.
length
===
10
&&
!
isShowAllRankList
&&
<
div
className
=
"btn"
>
<
button
onClick
=
{()
=>
{
this
.
setState
({
isShowAllRankList
:
true
,
...
...
src/components/activity/2020-717/question/index.scss
View file @
d3b6aa74
...
...
@@ -123,11 +123,16 @@
ul
{
display
:
flex
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
}
li
{
width
:
160px
;
height
:
115px
;
&
:nth-child
(
odd
)
{
margin-bottom
:
20px
;
}
}
img
{
...
...
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