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
f24316c8
Commit
f24316c8
authored
Jun 22, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detail
parent
2f49609e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
45 deletions
+60
-45
src/components/Index/index.js
+1
-2
src/components/detail/audition/index.js
+4
-1
src/components/detail/carousel/index.js
+7
-7
src/components/detail/index.js
+2
-2
src/components/detail/outline/index.js
+10
-6
src/components/detail/shareRank/index.js
+36
-26
src/components/detail/shareRank/index.scss
+0
-1
No files found.
src/components/Index/index.js
View file @
f24316c8
...
...
@@ -109,8 +109,7 @@ class Index extends Component {
<
div
className
=
'header'
>
<
img
className
=
"logo"
src
=
"http://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/img/index/logo.png"
alt
=
""
/>
{
/*<button className='to-app'>在APP打开</button>*/
}
<
CallApp
className
=
'to-app'
><
/CallApp
>
<
CallApp
className
=
'to-app'
text
=
'在APP打开'
><
/CallApp
>
<
i
className
=
'iconfont iconiconfront- search'
onClick
=
{
this
.
toSearch
.
bind
(
this
)}
><
/i
>
<
/div
>
...
...
src/components/detail/audition/index.js
View file @
f24316c8
import
React
,
{
Component
}
from
'react'
import
'./index.scss'
import
{
CallApp
}
from
'../../../common'
class
Audition
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
colse
=
()
=>
{
this
.
props
.
boxHide
(
false
);
}
...
...
@@ -18,7 +21,7 @@ class Audition extends Component {
<
div
className
=
'content audition-box'
>
<
p
className
=
'audition-header'
>
当前页面不支持试听
<
/p
>
<
p
className
=
'audition-dec'
>
请前往
APP
试听
<
/p
>
<
div
className
=
'btn btn-18B4ED'
>
立即前往
<
/div
>
<
CallApp
className
=
'btn btn-18B4ED'
text
=
'立即前往'
><
/CallApp
>
<
/div
>
<
i
onClick
=
{
this
.
colse
}
className
=
{
'iconfont iconiconfront-2 close'
}
><
/i
>
<
/div
>
...
...
src/components/detail/carousel/index.js
View file @
f24316c8
import
React
,
{
Component
}
from
'react'
;
import
{
Carousel
,
WingBlank
}
from
'antd-mobile'
;
import
React
,
{
Component
}
from
'react'
import
{
Carousel
,
WingBlank
}
from
'antd-mobile'
import
'./index.scss'
import
{
api
,
getParam
,
http
}
from
"@/utils"
;
import
{
api
,
getParam
,
http
}
from
"@/utils"
// 课程页面滚动广告
class
Carouselw
extends
Component
{
constructor
(
props
)
{
super
(
props
)
...
...
@@ -18,7 +18,7 @@ class Carouselw extends Component {
_this
.
getList
()
this
.
timer
=
setInterval
(
function
()
{
_this
.
getList
()
},
10000
);
},
10000
);
}
...
...
@@ -63,4 +63,4 @@ class Carouselw extends Component {
}
}
export
default
Carouselw
;
\ No newline at end of file
export
default
Carouselw
\ No newline at end of file
src/components/detail/index.js
View file @
f24316c8
...
...
@@ -11,8 +11,8 @@ import BtnStatus from "./btnstatus"
import
Carouselw
from
"./carousel"
import
{
connect
}
from
"react-redux"
import
{
fetchCoursesListIfNeeded
}
from
"./actions"
import
{
api
,
getParam
,
http
,
browser
}
from
"@/utils"
;
import
{
Toast
}
from
'antd-mobile'
;
import
{
api
,
getParam
,
http
,
browser
}
from
"@/utils"
import
{
Toast
}
from
'antd-mobile'
class
Detail
extends
Component
{
...
...
src/components/detail/outline/index.js
View file @
f24316c8
...
...
@@ -19,8 +19,12 @@ class OutLine extends Component {
return
e
.
childNodes
.
length
===
0
?
""
:
e
.
childNodes
[
0
].
nodeValue
;
}
componentDidMount
()
{
this
.
getList
()
}
// 获取大纲数据
getList
=
()
=>
{
http
.
get
(
`
${
api
.
home
}
/m/course/syllabuses/
${
getParam
(
'id'
)}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
...
...
@@ -104,15 +108,15 @@ class OutLine extends Component {
}
<
/h2
>
{
item
.
point
.
map
((
item
,
index
)
=>
{
item
.
point
&&
item
.
point
.
length
>
0
&&
item
.
point
.
map
((
item
,
index
)
=>
{
const
type
=
(
<
span
>
{
item
.
type
===
1
&&
<
span
>
知识点
{
index
+
1
}
:
<
/span
>
}
{
item
.
type
===
2
&&
{
item
.
type
===
1
&&
<
span
>
知识点
{
index
+
1
}
:
<
/span
>
}
{
item
.
type
===
2
&&
<
span
className
=
'red'
>
实战项目:
<
/span
>
}
<
/span
>
<
/span
>
)
return
(
...
...
src/components/detail/shareRank/index.js
View file @
f24316c8
...
...
@@ -10,15 +10,20 @@ class ShareRank extends Component {
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
list
:
[],
rankingslice
:
[],
code
:
''
,
list
:
[],
// 分销排行榜
rankingslice
:
[],
// 分销排行榜前两名
code
:
''
,
// 分销code
shareRank
:
false
}
}
componentDidMount
()
{
// 获取排行榜
this
.
getRankList
()
this
.
getCode
()
}
// 获取排行榜
getRankList
=
()
=>
{
http
.
get
(
`
${
api
.
home
}
/dist/rankList/
${
getParam
(
'id'
)}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
...
...
@@ -29,7 +34,10 @@ class ShareRank extends Component {
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
// 获取分销码
}
// 获取分销码
getCode
=
()
=>
{
let
data
=
{
course_id
:
getParam
(
'id'
)
}
...
...
@@ -44,6 +52,7 @@ class ShareRank extends Component {
})
}
// 点击分销跳转到海报页
share
=
(
info
)
=>
{
const
courseId
=
getParam
(
'id'
)
const
dist_first
=
info
.
dist_first_level_ti
...
...
@@ -75,30 +84,31 @@ class ShareRank extends Component {
return
(
<
div
className
=
'share-ranking'
>
<
Flex
className
=
'share-container'
justify
=
'between'
>
<
Flex
className
=
'share-list'
>
<
span
className
=
"title"
>
排行榜:
<
/span
>
<
div
className
=
'ranking-box'
onClick
=
{
this
.
openRanking
}
>
{
this
.
state
.
rankingslice
&&
this
.
state
.
rankingslice
.
length
>
0
&&
this
.
state
.
rankingslice
.
map
((
item
,
index
)
=>
{
return
(
<
span
key
=
{
index
}
className
=
"ranking-mess"
>
<
Flex
className
=
'share-list'
>
<
span
className
=
"title"
>
排行榜:
<
/span
>
<
div
className
=
'ranking-box'
onClick
=
{
this
.
openRanking
}
>
{
this
.
state
.
rankingslice
&&
this
.
state
.
rankingslice
.
length
>
0
&&
this
.
state
.
rankingslice
.
map
((
item
,
index
)
=>
{
return
(
<
span
key
=
{
index
}
className
=
"ranking-mess"
>
<
img
src
=
{
item
.
head_imgurl
}
alt
=
""
/>
<
i
>
{
item
.
amount
}
元
<
/i
>
<
/span
>
)
})
}
)
})
}
<
/div
>
<
/Flex
>
<
Flex
className
=
'share-money'
justify
=
'between'
align
=
'center'
>
<
img
onClick
=
{
this
.
openRanking
}
className
=
"ranking-ellipsis"
src
=
"https://julyedu-img.oss-cn-beijing.aliyuncs.com/Image/train/ellipsis.png"
alt
=
""
/>
<
button
className
=
"share"
onClick
=
{
this
.
share
.
bind
(
this
,
info
)}
>
分享赚
{
info
.
dist_first_level_ti
}
元
<
/button
>
<
/Flex
>
<
/div
>
<
/Flex
>
<
Flex
className
=
'share-money'
justify
=
'between'
align
=
'center'
>
<
img
onClick
=
{
this
.
openRanking
}
className
=
"ranking-ellipsis"
src
=
"https://julyedu-img.oss-cn-beijing.aliyuncs.com/Image/train/ellipsis.png"
alt
=
""
/>
<
button
className
=
"share"
onClick
=
{
this
.
share
.
bind
(
this
,
info
)}
>
分享赚
{
info
.
dist_first_level_ti
}
元
<
/button
>
<
/Flex
>
<
/Flex
>
{
this
.
state
.
shareRank
&&
...
...
@@ -122,11 +132,11 @@ class ShareRank extends Component {
}
<
/ul
>
<
div
className
=
'shareBtn'
>
<
button
onClick
=
{
this
.
share
.
bind
(
this
,
info
)}
>
分享赚
{
info
.
dist_first_level_ti
}
元
<
/button
>
<
button
onClick
=
{
this
.
share
.
bind
(
this
,
info
)}
>
分享赚
{
info
.
dist_first_level_ti
}
元
<
/button
>
<
/div
>
<
i
onClick
=
{
this
.
colse
}
className
=
{
'iconfont iconiconfront-2 close'
}
><
/i
>
<
/div
>
<
/div
>
}
<
/div
>
...
...
src/components/detail/shareRank/index.scss
View file @
f24316c8
...
...
@@ -63,7 +63,6 @@
border-radius
:
3px
;
color
:
$red
;
background-color
:
$bg_fff
;
width
:
76px
;
height
:
22px
;
line-height
:
20px
;
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