Commit 0776c5fc by xuzhenghua

pull

parent 5b4f2323
...@@ -119,17 +119,21 @@ class PythonDes extends Component { ...@@ -119,17 +119,21 @@ class PythonDes extends Component {
} }
toLearn = () => { toLearn = () => {
alert('免费试学')
http.post(`${API['home']}/m/it/user/trialCourse`, {course_id: getParam('id')}).then((res) => { http.post(`${API['home']}/m/it/user/trialCourse`, {course_id: getParam('id')}).then((res) => {
const {code, msg} = res.data const {code, msg} = res.data
if (code == 200) { if (code == 200) {
alert('code == 200')
if (!getParam('version')) { // H5 if (!getParam('version')) { // H5
this.setState({ this.setState({
toApp: true toApp: true
}) })
} else { // APP } else { // APP
alert('app')
SendMessageToApp("toLearn") SendMessageToApp("toLearn")
} }
} else { } else {
alert('code != 200')
Toast.info(msg, 2) Toast.info(msg, 2)
} }
}) })
......
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