Commit 9f89dd3a by zhanghaozhe

小课加分销

parent 1d52297b
......@@ -64,7 +64,6 @@ class ShareRank extends Component {
} else {
const courseId = getParam('id')
const dist_first = info.dist_first_level_ti
const uid = info.uid
const dist_code = this.state.code
this.props.history.push(`/shareposter?courseId=${courseId}&dist_first=${dist_first}&uid=${uid}&dist_code=${dist_code}`)
}
......
......@@ -13,7 +13,7 @@ import {setCurrentUser, startFetchUser} from "@/store/userAction"
}),
{setCurrentUser, startFetchUser}
)
class Python extends Component {
class ML extends Component {
constructor(props) {
super(props)
this.state = {
......@@ -149,4 +149,4 @@ class Python extends Component {
}
}
export default Python
export default ML
......@@ -3,6 +3,7 @@
height: 100vh;
padding-bottom: 60px;
overflow: auto;
background: #fff;
.des__start {
position: relative;
......@@ -11,7 +12,6 @@
background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/banner.png")
center center no-repeat;
background-size: contain;
z-index: 100;
}
.python__define {
......
......@@ -5,6 +5,7 @@ import { http, getParam } from '@/utils';
import './index.scss';
import { connect } from "react-redux";
import Mask from './../poup/index.js'
import ShareRank from "@components/detail/shareRank"
class PythonStudy extends Component {
constructor(props) {
......@@ -88,7 +89,7 @@ class PythonStudy extends Component {
<HeaderBar title='Python基础语法' arrow={true}/>
<div className="python-study__header">
<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">
<span>{courseInfo.contact_type == 1 ? '上课请加QQ学习群' : '添加助教微信入群'}{courseInfo.course_qq}</span>
<span>并备注您的学号:{uid}</span>
......@@ -97,7 +98,12 @@ class PythonStudy extends Component {
{
learning.schedule > 0 &&
<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">
<i style={{width: learning.schedule + '%'}}/>
<span className="python-study__progress-tip"
......@@ -107,6 +113,11 @@ class PythonStudy extends Component {
}
</div>
{
!!courseInfo.is_dist && <div className={'dist-wrapper'}>
<ShareRank courseInfo={courseInfo}/>
</div>
}
<Accordion
defaultActiveKey="0"
className="python-study__stage"
......@@ -160,7 +171,7 @@ class PythonStudy extends Component {
}}
>
<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 &&
<i className="python-study__subject-status"
......
......@@ -46,6 +46,11 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
height: 100%;
background-color: #F4F5F6;
padding-bottom: 15px;
.dist-wrapper{
background: #fff;
margin: 20px 10px 30px;
}
}
.python-study__header {
......@@ -62,7 +67,7 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
position: relative;
height: 55px;
padding: 0 12px;
background-color: #1A9BFC;
background-color: #4B41FF;
&::after {
content: '';
......@@ -115,14 +120,21 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
.python-study__progress-title {
font-size: 14px;
font-weight: 600;
color: rgba(51, 51, 51, .6);
color: #333333;
line-height: 39px;
&>span{
color: #999;
span{
color: #09f;
}
}
}
.python-study__progress-bar {
position: relative;
height: 3px;
margin: 18px 0 15px;
width: 98%;
border-radius: 2px;
background-color: rgba(207, 219, 229, .6);
......
......@@ -11,6 +11,7 @@ import Mask from './../poup/index.js'
import {http, getParam, SendMessageToApp,} from '@/utils'
import {connect} from 'react-redux'
import {Toast} from "antd-mobile"
import ShareRank from "@components/detail/shareRank"
@connect(state => ({
user: state.user
......@@ -97,6 +98,7 @@ class PythonDes extends Component {
],
payMoney: 0,
isOnline: true, //课程是否上架
courseInfo: {},
}
}
......@@ -220,6 +222,7 @@ class PythonDes extends Component {
practice: data.practice.slice(0, 2),
allPractice: data.practice,
payMoney: data.course_info.price1,
courseInfo: data.course_info
})
} else {
Toast.info(msg)
......@@ -256,11 +259,16 @@ class PythonDes extends Component {
allPracticeShow,
toApp,
payMoney,
isOnline
isOnline,
courseInfo
} = this.state
console.log(courseInfo)
return (
<div className={'python__des'}>
<div className={'des__start'}></div>
{
!!courseInfo.is_dist && <ShareRank courseInfo={courseInfo}/>
}
<div className={'python__define'}>
<img className={'left__decorate'}
src={'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/left__decorate.png'}></img>
......
......@@ -6,6 +6,7 @@ import './index.scss';
import {Link} from "react-router-dom"
import {connect} from "react-redux";
import Mask from './../poup/index.js'
import ShareRank from "@components/detail/shareRank"
class PythonStudy extends Component {
constructor(props) {
......@@ -96,7 +97,7 @@ class PythonStudy extends Component {
</p>
</div>
{
learning.schedule == 0 &&
learning.schedule > 0 &&
<div className="python-study__progress">
<h2 className="python-study__progress-title">学习进度</h2>
<div className="python-study__progress-bar">
......@@ -108,6 +109,11 @@ class PythonStudy extends Component {
}
</div>
{
!!courseInfo.is_dist && <div className={'dist-wrapper'}>
<ShareRank courseInfo={courseInfo}/>
</div>
}
<Accordion
defaultActiveKey="0"
className="python-study__stage"
......
......@@ -46,6 +46,10 @@ html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-
height: 100%;
background-color: #F4F5F6;
padding-bottom: 15px;
.dist-wrapper{
background: #fff;
margin: 20px 10px 30px;
}
}
.python-study__header {
......
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