Commit fcb6fca3 by xuzhenghua

python

parent 6f816124
...@@ -119,6 +119,9 @@ class PythonDes extends Component { ...@@ -119,6 +119,9 @@ class PythonDes extends Component {
} }
toLearn = () => { toLearn = () => {
http.post(`${API['home']}web/python/trial_course`, {course_id: getParam('id')}).then((res) => {
const {code, msg} = res.data
if (code == 200) {
if (!getParam('version')) { // H5 if (!getParam('version')) { // H5
this.setState({ this.setState({
toApp: true toApp: true
...@@ -126,6 +129,10 @@ class PythonDes extends Component { ...@@ -126,6 +129,10 @@ class PythonDes extends Component {
} else { // APP } else { // APP
SendMessageToApp("toLearn") SendMessageToApp("toLearn")
} }
} else {
Toast.info(msg, 2)
}
})
} }
closePop = () => { closePop = () => {
......
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