Commit 1b055870 by xuzhenghua

app

parents 2f1bfa52 7cd88a63
...@@ -20,6 +20,15 @@ class ReserveCourse extends Component { ...@@ -20,6 +20,15 @@ class ReserveCourse extends Component {
this.fetchAICourse(); this.fetchAICourse();
} }
shouldComponentUpdate(nextProps, nextState, nextContext) {
if(this.props.isApp !== nextProps.isApp) {
this.fetchAICourse();
return false;
}
return true;
}
fetchAICourse = () => { fetchAICourse = () => {
http.get(`${API.home}/sys/pre_coursee`).then(res => { http.get(`${API.home}/sys/pre_coursee`).then(res => {
const {code, data, msg} = res.data; const {code, data, msg} = res.data;
......
...@@ -467,7 +467,7 @@ class BlessingPreheat extends Component { ...@@ -467,7 +467,7 @@ class BlessingPreheat extends Component {
isFormal === 0 && isFormal === 0 &&
<> <>
<ListHeader id={'deposit'} text="预付1元定金,最高可省100元" styles={{margin: '30px 0 15px'}}/> <ListHeader id={'deposit'} text="预付1元定金,最高可省100元" styles={{margin: '30px 0 15px'}}/>
<ReserveCourse/> <ReserveCourse isApp={isApp}/>
</> </>
} }
......
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