Commit 3f357618 by FE

参团下单时,增加参数

parent cb6577ea
...@@ -39,7 +39,13 @@ class Group extends Component { ...@@ -39,7 +39,13 @@ class Group extends Component {
toPay = (pdd_order_id) => { toPay = (pdd_order_id) => {
const {courseInfo, history} = this.props; const {courseInfo, history} = this.props;
if (courseInfo.group_status === 3) { if (courseInfo.group_status === 3) {
history.push(`/order?id=${getParam('id')}`, {group: 1}); history.push(
`/order?id=${getParam('id')}`,
{
group: 1,
pdd_order_id
}
);
} else { } else {
this.setState({ this.setState({
isShowMore: false, isShowMore: false,
......
...@@ -121,8 +121,17 @@ class Order extends Component { ...@@ -121,8 +121,17 @@ class Order extends Component {
if (!this.state.perfect) { if (!this.state.perfect) {
Toast.info('请完善报名信息!'); Toast.info('请完善报名信息!');
} }
if(this.props.location.state && this.props.location.state.group === 1) { const { location: { state ={} } } = this.props;
http.post(`${API['base-api']}/pdd/m`, {course_id: getParam("id"),ischeck:this.state.useBalance}).then(res => { if(state.group === 1) {
let params = state.pdd_order_id? {
course_id: getParam("id"),
ischeck: this.state.useBalance,
pdd_order_id: state.pdd_order_id
} : {
course_id: getParam("id"),
ischeck: this.state.useBalance,
}
http.post(`${API['base-api']}/pdd/m`, params).then(res => {
console.log(res); console.log(res);
if(res.data.errno === 200) { if(res.data.errno === 200) {
sessionStorage.removeItem('orderUseCacheObj'); sessionStorage.removeItem('orderUseCacheObj');
......
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