Commit f9f64d94 by xuzhenghua

弹窗

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