Commit fc9c7149 by zhanghaozhe

智能选课

parent 5774ac94
...@@ -90,10 +90,11 @@ class IntelligentRecommend extends Component { ...@@ -90,10 +90,11 @@ class IntelligentRecommend extends Component {
consult = (e) => { consult = (e) => {
e.preventDefault() e.preventDefault()
let target = e.target
http.post(`${API.home}/sys/icc/consult`, { http.post(`${API.home}/sys/icc/consult`, {
rid: this.props.result.rid, rid: this.props.intelligentRecommend.result.rid,
}).finally(() => { }).finally(() => {
window.location.href = e.target.getAttribute('href') window.location.href = target.getAttribute('href')
}) })
} }
...@@ -220,7 +221,7 @@ class IntelligentRecommend extends Component { ...@@ -220,7 +221,7 @@ class IntelligentRecommend extends Component {
{ {
item.c_type === 2 && <React.Fragment key={item.course_id}> item.c_type === 2 && <React.Fragment key={item.course_id}>
<a href="http://q.url.cn/s/Vbkup6m?_type=wpa" className={'contact'} <a href="http://q.url.cn/s/Vbkup6m?_type=wpa" className={'contact'}
onClick={this.consult.bind(this, item.rid)}>{item.consult}</a> onClick={this.consult}>{item.consult}</a>
<Link className={'register'} to={`/detail?id=${item.course_id}`}>{item.second_btn}</Link> <Link className={'register'} to={`/detail?id=${item.course_id}`}>{item.second_btn}</Link>
</React.Fragment> </React.Fragment>
} }
......
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