Commit 6ba4e3e0 by wangshuo

教学团队

parent 92935324
import React, { Component } from 'react'
import './index.scss'
export default class Team extends Component {
constructor(props) {
super(props);
this.state = {
teacherList: [
{
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数七月在线AI Lab负责人兼科学家。历任浪潮集团数七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,国家电网人工智能行业应用方向团队负责人。参与过一国家863项目,且曾主持一山东省自主创新及成果转化专项,发明专利十余项,专业论文十余年哈哈塑料袋科技发牢骚'
},
{
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,国家电网人工智能行业应用方向团队负责人。参与过一国家863项目,且曾主持一山东省自主创新及成果转化专项,发明专利十余项,专业论文十余年哈哈塑料袋科技发牢骚'
},
{
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,国家电网人工智能行业应用方向团队负责人。参与过一国家863项目,且曾主持一山东省自主创新及成果转化专项,发明专利十余项,专业论文十余年哈哈塑料袋科技发牢骚'
},{
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,国家电网人工智能行业应用方向团队负责人。参与过一国家863项目,且曾主持一山东省自主创新及成果转化专项,发明专利十余项,专业论文十余年哈哈塑料袋科技发牢骚'
}
]
}
}
render() {
const {teacherList} = this.state;
return (
<div className={'team_container'}>
<p className={'title'}>///</p>
<p className={'sub_title'}>讲师+助教+班主任全程陪伴,哪里不会问哪里</p>
<ul>
{
teacherList.map((item,index)=>{
return (
<li key={index} className={'item_li'}>
<div className={'item_image'}></div>
<div className={'item_info'}>
<span className={'name'}>{item.name}</span>
<div className={'des'}>{item.des}</div>
</div>
</li>
)
})
}
</ul>
</div>
)
}
}
.team_container {
padding-top: 32px;
background: #0096ff;
p {
text-align: center;
text-align-last: center;
}
.title {
font-size: 22px;
line-height: 22px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
}
.sub_title {
font-size: 12px;
line-height: 12px;
font-weight: 300;
color: rgba(255, 255, 255, 1);
margin: 12px auto 18px;
}
.item_li {
width: 352px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin: 0 auto 12px;
padding: 12px 14px 14px 12px;
.item_image {
width: 44px;
height: 44px;
border-radius: 22px;
background: #0099ff;
flex: 0 0 auto;
margin-right: 14px;
}
.item_info {
.name {
font-size: 16px;
line-height: 16px;
font-weight: 600;
color: rgba(82, 92, 101, 1);
}
.des {
font-size: 12px;
line-height: 14px;
font-weight: 300;
color: rgba(82, 92, 101, 0.8);
text-align: left;
text-align-last: left;
margin-top: 6px;
width: 266px;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
overflow: hidden;
// text-overflow: ellipsis;
}
}
}
}
......@@ -2,8 +2,27 @@ import React, { Component } from 'react'
import './index.scss'
export default class Test 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() {
console.log(this.props);
return (
<div className={'test_container'}>
<p className={'title'}> / / / </p>
......@@ -17,7 +36,7 @@ export default class Test extends Component {
{
this.props.practice.map((item, index)=>{
return <div key={index}>
<div className='stage'>{item.name}</div>
<div className='stage'>{`第${this.Change(item.stage)}阶段 ${item.name}`}</div>
{
item.questions.map((question, index)=>{
return <div key={index} className={'line'}>
......
......@@ -3,7 +3,8 @@ import './index.scss'
import Description from './Description/index.js';
import NoWorry from './NoWorry/index.js';
import Study from './Study/index.js';
import Test from './Test/index.js'
import Test from './Test/index.js';
import Team from './Team/index.js';
export default class PythonDes extends Component {
constructor(props) {
......@@ -91,6 +92,7 @@ export default class PythonDes extends Component {
<NoWorry list={worryList}></NoWorry>
<Study syllabus={this.props.syllabus} allSyllabusShow={this.props.allSyllabusShow} show={this.props.show} hide={this.props.hide}></Study>
<Test practice={this.props.practice} allPracticeShow={this.props.allPracticeShow} show={this.props.show} hide={this.props.hide}></Test>
<Team />
</div>
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment