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
6527783f
Commit
6527783f
authored
Nov 20, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学习的时候去APP
parent
d888037e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
src/components/python/pythonStudy/index.js
+20
-3
No files found.
src/components/python/pythonStudy/index.js
View file @
6527783f
...
...
@@ -5,11 +5,13 @@ import {http, getParam} from '@/utils';
import
'./index.scss'
;
import
{
Link
}
from
"react-router-dom"
import
{
connect
}
from
"react-redux"
;
import
Mask
from
'./../poup/index.js'
class
PythonStudy
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
toApp
:
false
,
courseInfo
:
''
,
syllabus
:
''
,
learning
:
''
...
...
@@ -71,10 +73,21 @@ class PythonStudy extends Component {
}
}
toLearn
=
()
=>
{
this
.
setState
({
toApp
:
true
})
}
closePop
=
()
=>
{
this
.
setState
({
toApp
:
false
,
})
}
render
()
{
const
{
user
}
=
this
.
props
;
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
const
{
courseInfo
,
syllabus
,
learning
}
=
this
.
state
;
const
{
courseInfo
,
syllabus
,
learning
,
toApp
}
=
this
.
state
;
return
(
<
div
className
=
"python-study"
>
<
HeaderBar
title
=
'Python基础语法'
arrow
=
{
true
}
/
>
...
...
@@ -188,16 +201,20 @@ class PythonStudy extends Component {
<
/Accordion
>
{
learning
.
schedule
==
0
&&
<
Link
to
=
{
`/test/pythonStudy/
${
courseInfo
.
course_id
}
`
}
className
=
"python-study__button"
>
开始学习
<
/Link
>
<
span
onClick
=
{
this
.
toLearn
}
className
=
"python-study__button"
>
开始学习
<
/span
>
}
{
learning
.
schedule
!=
0
&&
learning
.
schedule
!=
100
&&
<
Link
to
=
{
`/test/pythonStudy/
${
courseInfo
.
course_id
}
`
}
className
=
"python-study__button"
>
继续学习
<
/Link
>
<
span
onClick
=
{
this
.
toLearn
}
className
=
"python-study__button"
>
继续学习
<
/span
>
}
{
learning
.
schedule
==
100
&&
<
button
className
=
"python-study__button python-study__over"
>
已学完全部课时
<
/button
>
}
{
toApp
&&
<
Mask
closePop
=
{
this
.
closePop
}
type
=
{
2
}
/
>
}
<
/div
>
)
}
...
...
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