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
1d1a7560
Commit
1d1a7560
authored
Jan 03, 2020
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add number in study module
parent
3df467cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletions
+23
-1
src/components/python/pythomDes/Study/index.js
+23
-1
No files found.
src/components/python/pythomDes/Study/index.js
View file @
1d1a7560
...
...
@@ -2,6 +2,27 @@ import React, { Component } from 'react'
import
'./index.scss'
export
default
class
Study
extends
Component
{
Change
=
(
data
)
=>
{
let
cn
=
[
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
,
"七"
,
"八"
,
"九"
,
'十'
];
let
newStr
=
''
let
str
=
data
.
toString
()
let
ci
=
Number
(
str
)
%
10
let
cs
=
Math
.
floor
(
Number
(
str
)
/
10
)
let
cv
=
''
if
(
str
.
length
>
1
)
{
if
(
cs
==
1
){
cv
=
ci
>=
1
?
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
9
]
}
else
{
cv
=
ci
>
1
?
cn
[
cs
-
1
]
+
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
cs
-
1
]
+
cn
[
9
]
}
}
else
{
cv
=
cn
[
ci
-
1
]
}
newStr
=
str
.
replace
(
str
,
cv
)
return
newStr
;
}
render
()
{
return
(
<
div
className
=
{
'study__container'
}
>
...
...
@@ -37,7 +58,8 @@ export default class Study extends Component {
this
.
props
.
syllabus
.
map
((
item
,
index
)
=>
{
return
(
<
div
className
=
{
'item__container'
}
key
=
{
index
}
>
<
div
className
=
{
'item__title'
}
>
{
item
.
name
}
<
/div
>
<
div
className
=
{
'item__title'
}
>
{
'第'
+
this
.
Change
(
index
+
1
)
+
'阶段 '
+
item
.
name
}
<
/div
>
{
item
.
lessons
.
map
((
item
,
index
)
=>
{
return
(
...
...
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