Commit f9f64d94 by xuzhenghua

弹窗

parent 7a61d16d
......@@ -61,15 +61,11 @@ class PythonStudy extends Component {
console.log(key);
}
toPythonStudy = (id, isUnlock) => {
toPythonHome = (isUnlock) => {
if (isUnlock == 1) {
location.href = `/test/pythonStudy/${id}`
}
}
toPythonHomeWork = (id, isUnlock) => {
if (isUnlock == 1) {
location.href = `/test/pythonHomeWork?id=${id}`
this.setState({
toApp: true
})
}
}
......@@ -137,7 +133,7 @@ class PythonStudy extends Component {
<div className="python-study__subject"
style={{opacity: lessonsItem.info.is_unlock == 0 ? '.6' : '1'}}
onClick={() => {
this.toPythonStudy(lessonsItem.video_id, lessonsItem.info.is_unlock)
this.toPythonHome(lessonsItem.info.is_unlock)
}}
key={index}>
<img className="python-study__subject-icon"
......@@ -163,7 +159,7 @@ class PythonStudy extends Component {
<div className="python-study__subject"
style={{opacity: item.is_unlock == 0 ? '.6' : '1'}}
onClick={() => {
this.toPythonHomeWork(item.id, item.is_unlock)
this.toPythonHome(item.is_unlock)
}}
key={index}>
<img className="python-study__subject-icon"
......
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