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
fe903686
Commit
fe903686
authored
Sep 06, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
2
parents
4d836938
034128b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
90 deletions
+1
-90
src/components/detail/carousel/index.js
+0
-67
src/components/detail/carousel/index.scss
+0
-21
src/router/router-config.js
+1
-2
No files found.
src/components/detail/carousel/index.js
deleted
100644 → 0
View file @
4d836938
import
React
,
{
Component
}
from
'react'
import
{
Carousel
,
WingBlank
}
from
'antd-mobile'
import
'./index.scss'
import
{
api
,
getParam
,
http
}
from
"@/utils"
// 课程页面滚动广告
class
Carouselw
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
list
:
[]
}
}
componentDidMount
()
{
const
_this
=
this
_this
.
getList
()
this
.
timer
=
setInterval
(
function
()
{
_this
.
getList
()
},
10000
);
}
componentWillUnmount
()
{
this
.
timer
&&
clearTimeout
(
this
.
timer
);
}
// 获取课程接口
getList
=
()
=>
{
let
data
=
{
course_id
:
getParam
(
'id'
)
}
http
.
post
(
`
${
API
.
home
}
/m/course/barrages`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
list
:
res
.
data
.
data
,
});
}
})
}
render
()
{
return
(
<
WingBlank
>
<
Carousel
className
=
"my-carousel"
vertical
dots
=
{
false
}
autoplay
infinite
>
{
this
.
state
.
list
&&
<
div
className
=
"v-item text-overflow-one"
>
<
img
src
=
{
this
.
state
.
list
.
avatar
}
alt
=
""
/>
{
this
.
state
.
list
.
user_name
}
{
this
.
state
.
list
.
live_msg
}
<
/div
>
}
<
/Carousel
>
<
/WingBlank
>
)
}
}
export
default
Carouselw
\ No newline at end of file
src/components/detail/carousel/index.scss
deleted
100644 → 0
View file @
4d836938
.detail-box
{
.my-carousel
{
position
:
absolute
!
important
;
top
:
66px
;
width
:
168px
!
important
;
background
:
rgba
(
0
,
0
,
0
,
.6
);
font-size
:
12px
;
color
:
$white
;
border-radius
:
3px
;
padding
:
6px
9px
;
z-index
:
99
;
img
{
width
:
18px
;
height
:
18px
;
border-radius
:
50%
;
vertical-align
:
middle
;
margin-right
:
7px
;
}
}
}
\ No newline at end of file
src/router/router-config.js
View file @
fe903686
...
...
@@ -156,8 +156,7 @@ export default [
},
{
path
:
'/togroup'
,
component
:
ToGroup
,
isPrivate
:
true
component
:
ToGroup
},
{
path
:
'/aist-share'
,
...
...
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