Commit 21a19d1c by xuzhenghua

pull

parent 0776c5fc
...@@ -119,21 +119,17 @@ class PythonDes extends Component { ...@@ -119,21 +119,17 @@ 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