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
9f89dd3a
Commit
9f89dd3a
authored
Mar 27, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小课加分销
parent
1d52297b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
21 deletions
+68
-21
src/components/detail/shareRank/index.js
+0
-1
src/components/ml/index.js
+2
-2
src/components/ml/pythomDes/index.js
+17
-10
src/components/ml/pythomDes/index.scss
+1
-1
src/components/ml/pythonStudy/index.js
+14
-3
src/components/ml/pythonStudy/index.scss
+14
-2
src/components/python/pythomDes/index.js
+9
-1
src/components/python/pythonStudy/index.js
+7
-1
src/components/python/pythonStudy/index.scss
+4
-0
No files found.
src/components/detail/shareRank/index.js
View file @
9f89dd3a
...
@@ -64,7 +64,6 @@ class ShareRank extends Component {
...
@@ -64,7 +64,6 @@ class ShareRank extends Component {
}
else
{
}
else
{
const
courseId
=
getParam
(
'id'
)
const
courseId
=
getParam
(
'id'
)
const
dist_first
=
info
.
dist_first_level_ti
const
dist_first
=
info
.
dist_first_level_ti
const
uid
=
info
.
uid
const
dist_code
=
this
.
state
.
code
const
dist_code
=
this
.
state
.
code
this
.
props
.
history
.
push
(
`/shareposter?courseId=
${
courseId
}
&dist_first=
${
dist_first
}
&uid=
${
uid
}
&dist_code=
${
dist_code
}
`
)
this
.
props
.
history
.
push
(
`/shareposter?courseId=
${
courseId
}
&dist_first=
${
dist_first
}
&uid=
${
uid
}
&dist_code=
${
dist_code
}
`
)
}
}
...
...
src/components/ml/index.js
View file @
9f89dd3a
...
@@ -13,7 +13,7 @@ import {setCurrentUser, startFetchUser} from "@/store/userAction"
...
@@ -13,7 +13,7 @@ import {setCurrentUser, startFetchUser} from "@/store/userAction"
}),
}),
{
setCurrentUser
,
startFetchUser
}
{
setCurrentUser
,
startFetchUser
}
)
)
class
Python
extends
Component
{
class
ML
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
...
@@ -149,4 +149,4 @@ class Python extends Component {
...
@@ -149,4 +149,4 @@ class Python extends Component {
}
}
}
}
export
default
Python
export
default
ML
src/components/ml/pythomDes/index.js
View file @
9f89dd3a
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
'./index.scss'
import
'./index.scss'
import
Description
from
'./Description/index.js'
import
Description
from
'./Description/index.js'
import
Study
from
'./Study/index.js'
import
Study
from
'./Study/index.js'
...
@@ -8,9 +8,10 @@ import Progream from './Progream/index.js'
...
@@ -8,9 +8,10 @@ import Progream from './Progream/index.js'
import
Selection
from
'./Selection'
import
Selection
from
'./Selection'
import
Mask
from
'./../poup/index.js'
import
Mask
from
'./../poup/index.js'
import
InAction
from
"./InAction"
import
InAction
from
"./InAction"
import
{
http
,
getParam
,
SendMessageToApp
,}
from
'@/utils'
import
ShareRank
from
"@components/detail/shareRank"
import
{
connect
}
from
'react-redux'
import
{
http
,
getParam
,
SendMessageToApp
,
}
from
'@/utils'
import
{
Toast
}
from
"antd-mobile"
import
{
connect
}
from
'react-redux'
import
{
Toast
}
from
"antd-mobile"
@
connect
(
state
=>
({
@
connect
(
state
=>
({
user
:
state
.
user
user
:
state
.
user
...
@@ -26,6 +27,7 @@ class PythonDes extends Component {
...
@@ -26,6 +27,7 @@ class PythonDes extends Component {
toApp
:
false
,
toApp
:
false
,
payMoney
:
0
,
payMoney
:
0
,
isOnline
:
true
,
//课程是否上架
isOnline
:
true
,
//课程是否上架
courseInfo
:
{}
}
}
}
}
...
@@ -59,7 +61,7 @@ class PythonDes extends Component {
...
@@ -59,7 +61,7 @@ class PythonDes extends Component {
toApp
:
true
toApp
:
true
})
})
}
else
{
// APP
}
else
{
// APP
if
(
backwardVersion
)
{
if
(
backwardVersion
)
{
Toast
.
info
(
'当前版本不支持该课程模式,请升级到最新版本或前往PC端体验'
,
2
)
Toast
.
info
(
'当前版本不支持该课程模式,请升级到最新版本或前往PC端体验'
,
2
)
}
else
{
}
else
{
SendMessageToApp
(
"toLearn"
,
getParam
(
'id'
))
SendMessageToApp
(
"toLearn"
,
getParam
(
'id'
))
...
@@ -89,7 +91,7 @@ class PythonDes extends Component {
...
@@ -89,7 +91,7 @@ class PythonDes extends Component {
}
}
})
})
}
else
{
// APP
}
else
{
// APP
if
(
backwardVersion
)
{
if
(
backwardVersion
)
{
Toast
.
info
(
'当前版本不支持该课程模式,请升级到最新版本或前往PC端购买'
,
2
);
Toast
.
info
(
'当前版本不支持该课程模式,请升级到最新版本或前往PC端购买'
,
2
);
let
onlyoneUse
=
setTimeout
(()
=>
{
let
onlyoneUse
=
setTimeout
(()
=>
{
clearTimeout
(
onlyoneUse
);
clearTimeout
(
onlyoneUse
);
...
@@ -148,6 +150,7 @@ class PythonDes extends Component {
...
@@ -148,6 +150,7 @@ class PythonDes extends Component {
allSyllabus
:
data
.
syllabus
,
allSyllabus
:
data
.
syllabus
,
allPractice
:
data
.
practice
,
allPractice
:
data
.
practice
,
payMoney
:
data
.
course_info
.
price1
,
payMoney
:
data
.
course_info
.
price1
,
courseInfo
:
data
.
course_info
})
})
}
else
{
}
else
{
Toast
.
info
(
msg
)
Toast
.
info
(
msg
)
...
@@ -159,7 +162,7 @@ class PythonDes extends Component {
...
@@ -159,7 +162,7 @@ class PythonDes extends Component {
this
.
getStatus
()
this
.
getStatus
()
const
{
backwardVersion
,
isPay
}
=
this
.
props
;
const
{
backwardVersion
,
isPay
}
=
this
.
props
;
if
(
backwardVersion
&&
isPay
===
1
)
{
if
(
backwardVersion
&&
isPay
===
1
)
{
Toast
.
info
(
'当前版本不支持该课程模式,请升级到最新版本或前往PC端学习'
,
2
);
Toast
.
info
(
'当前版本不支持该课程模式,请升级到最新版本或前往PC端学习'
,
2
);
}
}
}
}
...
@@ -179,11 +182,15 @@ class PythonDes extends Component {
...
@@ -179,11 +182,15 @@ class PythonDes extends Component {
allSyllabusShow
,
allSyllabusShow
,
toApp
,
toApp
,
payMoney
,
payMoney
,
isOnline
isOnline
,
courseInfo
}
=
this
.
state
}
=
this
.
state
return
(
return
(
<
div
className
=
{
'python__des'
}
>
<
div
className
=
{
'python__des'
}
>
<
div
className
=
{
'des__start'
}
><
/div
>
<
div
className
=
{
'des__start'
}
><
/div
>
{
!!
courseInfo
.
is_dist
&&
<
ShareRank
courseInfo
=
{
courseInfo
}
/
>
}
<
div
className
=
{
'course__introduce'
}
><
/div
>
<
div
className
=
{
'course__introduce'
}
><
/div
>
{
{
isOnline
isOnline
...
@@ -226,7 +233,7 @@ class PythonDes extends Component {
...
@@ -226,7 +233,7 @@ class PythonDes extends Component {
<
Team
/>
<
Team
/>
{
/* 试学体验 */
}
{
/* 试学体验 */
}
<
Experience
tryLearn
=
{
this
.
tryLearn
}
isOnline
=
{
isOnline
}
/
>
<
Experience
tryLearn
=
{
this
.
tryLearn
}
isOnline
=
{
isOnline
}
/
>
<
img
<
img
style
=
{{
style
=
{{
display
:
'block'
,
display
:
'block'
,
...
@@ -238,7 +245,7 @@ class PythonDes extends Component {
...
@@ -238,7 +245,7 @@ class PythonDes extends Component {
/>
/>
{
/* 常见问题 */
}
{
/* 常见问题 */
}
<
Progream
/>
<
Progream
/>
{
{
toApp
&&
(
<
Mask
type
=
{
1
}
closePop
=
{
this
.
closePop
}
/>
)
toApp
&&
(
<
Mask
type
=
{
1
}
closePop
=
{
this
.
closePop
}
/>
)
}
}
...
...
src/components/ml/pythomDes/index.scss
View file @
9f89dd3a
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
height
:
100vh
;
height
:
100vh
;
padding-bottom
:
60px
;
padding-bottom
:
60px
;
overflow
:
auto
;
overflow
:
auto
;
background
:
#fff
;
.des__start
{
.des__start
{
position
:
relative
;
position
:
relative
;
...
@@ -11,7 +12,6 @@
...
@@ -11,7 +12,6 @@
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/banner.png")
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/banner.png")
center
center
no-repeat
;
center
center
no-repeat
;
background-size
:
contain
;
background-size
:
contain
;
z-index
:
100
;
}
}
.python__define
{
.python__define
{
...
...
src/components/ml/pythonStudy/index.js
View file @
9f89dd3a
...
@@ -5,6 +5,7 @@ import { http, getParam } from '@/utils';
...
@@ -5,6 +5,7 @@ import { http, getParam } from '@/utils';
import
'./index.scss'
;
import
'./index.scss'
;
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
;
import
Mask
from
'./../poup/index.js'
import
Mask
from
'./../poup/index.js'
import
ShareRank
from
"@components/detail/shareRank"
class
PythonStudy
extends
Component
{
class
PythonStudy
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -88,7 +89,7 @@ class PythonStudy extends Component {
...
@@ -88,7 +89,7 @@ class PythonStudy extends Component {
<
HeaderBar
title
=
'Python基础语法'
arrow
=
{
true
}
/
>
<
HeaderBar
title
=
'Python基础语法'
arrow
=
{
true
}
/
>
<
div
className
=
"python-study__header"
>
<
div
className
=
"python-study__header"
>
<
div
className
=
"python-study__course"
>
<
div
className
=
"python-study__course"
>
<
h2
className
=
"python-study__course-name"
>
Python
人工智能
<
/h2
>
<
h2
className
=
"python-study__course-name"
>
机器学习小课
第一期
<
/h2
>
<
p
className
=
"python-study__course-contact"
>
<
p
className
=
"python-study__course-contact"
>
<
span
>
{
courseInfo
.
contact_type
==
1
?
'上课请加QQ学习群'
:
'添加助教微信入群'
}
:
{
courseInfo
.
course_qq
}
<
/span
>
<
span
>
{
courseInfo
.
contact_type
==
1
?
'上课请加QQ学习群'
:
'添加助教微信入群'
}
:
{
courseInfo
.
course_qq
}
<
/span
>
<
span
>
并备注您的学号:
{
uid
}
<
/span
>
<
span
>
并备注您的学号:
{
uid
}
<
/span
>
...
@@ -97,7 +98,12 @@ class PythonStudy extends Component {
...
@@ -97,7 +98,12 @@ class PythonStudy extends Component {
{
{
learning
.
schedule
>
0
&&
learning
.
schedule
>
0
&&
<
div
className
=
"python-study__progress"
>
<
div
className
=
"python-study__progress"
>
<
h2
className
=
"python-study__progress-title"
>
学习进度
<
/h2
>
<
h2
className
=
"python-study__progress-title"
>
学习进度
{
!!
learning
.
day
&&
<
span
>
(已连续学习
<
span
>
{
learning
.
day
}
<
/span>天)</
span
>
}
<
/h2
>
<
div
className
=
"python-study__progress-bar"
>
<
div
className
=
"python-study__progress-bar"
>
<
i
style
=
{{
width
:
learning
.
schedule
+
'%'
}}
/
>
<
i
style
=
{{
width
:
learning
.
schedule
+
'%'
}}
/
>
<
span
className
=
"python-study__progress-tip"
<
span
className
=
"python-study__progress-tip"
...
@@ -107,6 +113,11 @@ class PythonStudy extends Component {
...
@@ -107,6 +113,11 @@ class PythonStudy extends Component {
}
}
<
/div
>
<
/div
>
{
!!
courseInfo
.
is_dist
&&
<
div
className
=
{
'dist-wrapper'
}
>
<
ShareRank
courseInfo
=
{
courseInfo
}
/
>
<
/div
>
}
<
Accordion
<
Accordion
defaultActiveKey
=
"0"
defaultActiveKey
=
"0"
className
=
"python-study__stage"
className
=
"python-study__stage"
...
@@ -160,7 +171,7 @@ class PythonStudy extends Component {
...
@@ -160,7 +171,7 @@ class PythonStudy extends Component {
}}
}}
>
>
<
img
className
=
"python-study__subject-icon"
<
img
className
=
"python-study__subject-icon"
src
=
{
lessonsItem
.
project
.
icon
}
alt
=
""
/>
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project-icon.png"
alt
=
""
/>
{
{
lessonsItem
.
project
.
is_unlock
==
1
&&
lessonsItem
.
project
.
complete
==
1
&&
lessonsItem
.
project
.
is_unlock
==
1
&&
lessonsItem
.
project
.
complete
==
1
&&
<
i
className
=
"python-study__subject-status"
<
i
className
=
"python-study__subject-status"
...
...
src/components/ml/pythonStudy/index.scss
View file @
9f89dd3a
...
@@ -46,6 +46,11 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
...
@@ -46,6 +46,11 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
height
:
100%
;
height
:
100%
;
background-color
:
#F4F5F6
;
background-color
:
#F4F5F6
;
padding-bottom
:
15px
;
padding-bottom
:
15px
;
.dist-wrapper
{
background
:
#fff
;
margin
:
20px
10px
30px
;
}
}
}
.python-study__header
{
.python-study__header
{
...
@@ -62,7 +67,7 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
...
@@ -62,7 +67,7 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
position
:
relative
;
position
:
relative
;
height
:
55px
;
height
:
55px
;
padding
:
0
12px
;
padding
:
0
12px
;
background-color
:
#
1A9BFC
;
background-color
:
#
4B41FF
;
&
:
:
after
{
&
:
:
after
{
content
:
''
;
content
:
''
;
...
@@ -115,14 +120,21 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
...
@@ -115,14 +120,21 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
.python-study__progress-title
{
.python-study__progress-title
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
600
;
font-weight
:
600
;
color
:
rgba
(
51
,
51
,
51
,
.6
)
;
color
:
#333333
;
line-height
:
39px
;
line-height
:
39px
;
&
>
span
{
color
:
#999
;
span
{
color
:
#09f
;
}
}
}
}
.python-study__progress-bar
{
.python-study__progress-bar
{
position
:
relative
;
position
:
relative
;
height
:
3px
;
height
:
3px
;
margin
:
18px
0
15px
;
margin
:
18px
0
15px
;
width
:
98%
;
border-radius
:
2px
;
border-radius
:
2px
;
background-color
:
rgba
(
207
,
219
,
229
,
.6
);
background-color
:
rgba
(
207
,
219
,
229
,
.6
);
...
...
src/components/python/pythomDes/index.js
View file @
9f89dd3a
...
@@ -11,6 +11,7 @@ import Mask from './../poup/index.js'
...
@@ -11,6 +11,7 @@ import Mask from './../poup/index.js'
import
{
http
,
getParam
,
SendMessageToApp
,}
from
'@/utils'
import
{
http
,
getParam
,
SendMessageToApp
,}
from
'@/utils'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
Toast
}
from
"antd-mobile"
import
{
Toast
}
from
"antd-mobile"
import
ShareRank
from
"@components/detail/shareRank"
@
connect
(
state
=>
({
@
connect
(
state
=>
({
user
:
state
.
user
user
:
state
.
user
...
@@ -97,6 +98,7 @@ class PythonDes extends Component {
...
@@ -97,6 +98,7 @@ class PythonDes extends Component {
],
],
payMoney
:
0
,
payMoney
:
0
,
isOnline
:
true
,
//课程是否上架
isOnline
:
true
,
//课程是否上架
courseInfo
:
{},
}
}
}
}
...
@@ -220,6 +222,7 @@ class PythonDes extends Component {
...
@@ -220,6 +222,7 @@ class PythonDes extends Component {
practice
:
data
.
practice
.
slice
(
0
,
2
),
practice
:
data
.
practice
.
slice
(
0
,
2
),
allPractice
:
data
.
practice
,
allPractice
:
data
.
practice
,
payMoney
:
data
.
course_info
.
price1
,
payMoney
:
data
.
course_info
.
price1
,
courseInfo
:
data
.
course_info
})
})
}
else
{
}
else
{
Toast
.
info
(
msg
)
Toast
.
info
(
msg
)
...
@@ -256,11 +259,16 @@ class PythonDes extends Component {
...
@@ -256,11 +259,16 @@ class PythonDes extends Component {
allPracticeShow
,
allPracticeShow
,
toApp
,
toApp
,
payMoney
,
payMoney
,
isOnline
isOnline
,
courseInfo
}
=
this
.
state
}
=
this
.
state
console
.
log
(
courseInfo
)
return
(
return
(
<
div
className
=
{
'python__des'
}
>
<
div
className
=
{
'python__des'
}
>
<
div
className
=
{
'des__start'
}
><
/div
>
<
div
className
=
{
'des__start'
}
><
/div
>
{
!!
courseInfo
.
is_dist
&&
<
ShareRank
courseInfo
=
{
courseInfo
}
/
>
}
<
div
className
=
{
'python__define'
}
>
<
div
className
=
{
'python__define'
}
>
<
img
className
=
{
'left__decorate'
}
<
img
className
=
{
'left__decorate'
}
src
=
{
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/left__decorate.png'
}
><
/img
>
src
=
{
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/left__decorate.png'
}
><
/img
>
...
...
src/components/python/pythonStudy/index.js
View file @
9f89dd3a
...
@@ -6,6 +6,7 @@ import './index.scss';
...
@@ -6,6 +6,7 @@ import './index.scss';
import
{
Link
}
from
"react-router-dom"
import
{
Link
}
from
"react-router-dom"
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
;
import
Mask
from
'./../poup/index.js'
import
Mask
from
'./../poup/index.js'
import
ShareRank
from
"@components/detail/shareRank"
class
PythonStudy
extends
Component
{
class
PythonStudy
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -96,7 +97,7 @@ class PythonStudy extends Component {
...
@@ -96,7 +97,7 @@ class PythonStudy extends Component {
<
/p
>
<
/p
>
<
/div
>
<
/div
>
{
{
learning
.
schedule
==
0
&&
learning
.
schedule
>
0
&&
<
div
className
=
"python-study__progress"
>
<
div
className
=
"python-study__progress"
>
<
h2
className
=
"python-study__progress-title"
>
学习进度
<
/h2
>
<
h2
className
=
"python-study__progress-title"
>
学习进度
<
/h2
>
<
div
className
=
"python-study__progress-bar"
>
<
div
className
=
"python-study__progress-bar"
>
...
@@ -108,6 +109,11 @@ class PythonStudy extends Component {
...
@@ -108,6 +109,11 @@ class PythonStudy extends Component {
}
}
<
/div
>
<
/div
>
{
!!
courseInfo
.
is_dist
&&
<
div
className
=
{
'dist-wrapper'
}
>
<
ShareRank
courseInfo
=
{
courseInfo
}
/
>
<
/div
>
}
<
Accordion
<
Accordion
defaultActiveKey
=
"0"
defaultActiveKey
=
"0"
className
=
"python-study__stage"
className
=
"python-study__stage"
...
...
src/components/python/pythonStudy/index.scss
View file @
9f89dd3a
...
@@ -46,6 +46,10 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
...
@@ -46,6 +46,10 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
height
:
100%
;
height
:
100%
;
background-color
:
#F4F5F6
;
background-color
:
#F4F5F6
;
padding-bottom
:
15px
;
padding-bottom
:
15px
;
.dist-wrapper
{
background
:
#fff
;
margin
:
20px
10px
30px
;
}
}
}
.python-study__header
{
.python-study__header
{
...
...
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