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";
...
@@ -6,63 +6,66 @@ import { Link } from "react-router-dom";
class
Index
extends
Component
{
class
Index
extends
Component
{
container
=
null
container
=
null
swiper
=
null
swiper
=
null
componentDidMount
()
{
componentDidMount
()
{
this
.
swiper
=
new
Swiper
(
'.swiper-container'
,
{
if
(
this
.
props
.
bannerList
.
length
>
1
)
{
direction
:
'horizontal'
,
this
.
swiper
=
new
Swiper
(
'.swiper-container'
,
{
loop
:
true
,
direction
:
'horizontal'
,
spaceBetween
:
12
,
loop
:
true
,
centeredSlides
:
true
,
spaceBetween
:
12
,
slidesPerView
:
'auto'
,
centeredSlides
:
true
,
loopedSlides
:
3
,
slidesPerView
:
'auto'
,
autoplay
:
true
loopedSlides
:
3
,
})
autoplay
:
true
,
})
}
}
}
componentWillUnmount
()
{
componentWillUnmount
()
{
this
.
swiper
.
destroy
()
this
.
swiper
.
destroy
()
}
}
render
()
{
render
()
{
const
{
bannerList
}
=
this
.
props
const
{
bannerList
}
=
this
.
props
return
(
return
(
<
div
className
=
{
'index-banner-swiper'
}
>
<
div
className
=
{
'index-banner-swiper'
}
>
<
div
className
=
{
'swiper-container'
}
ref
=
{
el
=>
this
.
container
=
el
}
>
<
div
className
=
{
'swiper-container'
}
ref
=
{
el
=>
this
.
container
=
el
}
>
<
ul
className
=
"swiper-wrapper"
>
<
ul
className
=
"swiper-wrapper"
>
{
bannerList
&&
bannerList
.
length
>
0
&&
bannerList
.
map
((
item
,
index
)
=>
{
{
return
(
bannerList
&&
bannerList
.
length
>
0
&&
bannerList
.
map
((
item
,
index
)
=>
{
<
li
className
=
{
'swiper-slide'
}
key
=
{
index
}
>
return
(
{
<
li
className
=
{
'swiper-slide'
}
key
=
{
index
}
>
Number
.
isNaN
(
parseInt
(
item
.
jump_url
))
?
{
<
a
href
=
{
item
.
jump_url
}
key
=
{
index
}
>
Number
.
isNaN
(
parseInt
(
item
.
jump_url
))
?
<
img
className
=
"item"
src
=
{
item
.
name
}
alt
=
""
/>
<
a
href
=
{
item
.
jump_url
}
key
=
{
index
}
>
<
/a>
:
<
img
className
=
"item"
src
=
{
item
.
name
}
alt
=
""
/>
<
Link
<
/a>
:
to
=
{{
<
Link
pathname
:
'/detail'
,
to
=
{{
search
:
`?id=
${
item
.
jump_url
}
`
pathname
:
'/detail'
,
}}
search
:
`?id=
${
item
.
jump_url
}
`
,
key
=
{
index
}
}}
>
key
=
{
index
}
<
img
>
className
=
"item"
<
img
src
=
{
item
.
name
}
className
=
"item"
alt
=
""
src
=
{
item
.
name
}
/>
alt
=
""
<
/Link
>
/>
}
<
/Link
>
<
/li
>
}
)
<
/li
>
})
)
}
})
<
/ul
>
}
<
/div
>
<
/ul
>
<
/div
>
<
/div
>
);
<
/div
>
}
);
}
}
}
export
default
Index
;
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 {
...
@@ -1002,7 +1002,7 @@ class Anniversary2020 extends Component {
<
/table
>
<
/table
>
}
}
{
{
!!
_rankList
.
length
&&
!
isShowAllRankList
&&
<
div
className
=
"btn"
>
!!
_rankList
.
length
&&
_rankList
.
length
===
10
&&
!
isShowAllRankList
&&
<
div
className
=
"btn"
>
<
button
onClick
=
{()
=>
{
<
button
onClick
=
{()
=>
{
this
.
setState
({
this
.
setState
({
isShowAllRankList
:
true
,
isShowAllRankList
:
true
,
...
...
src/components/activity/2020-717/question/index.scss
View file @
d3b6aa74
...
@@ -123,11 +123,16 @@
...
@@ -123,11 +123,16 @@
ul
{
ul
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
}
}
li
{
li
{
width
:
160px
;
width
:
160px
;
height
:
115px
;
height
:
115px
;
&
:nth-child
(
odd
)
{
margin-bottom
:
20px
;
}
}
}
img
{
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