Commit 6674d66f by wangshuo

微信支付

parent 187aa5e5
......@@ -97,7 +97,8 @@ export default class PayOrder extends Component {
pay = () => {
const {payType, orderId} = this.state;
if(payType === 0) {
this.alipayPay(orderId)
this.alipayPay(orderId);
} else if (payType === 1) {
this.weixinPay(orderId)
}
......@@ -152,14 +153,13 @@ export default class PayOrder extends Component {
clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null;
// 获取课程类型
http.get(`${API.home}/m/app_order/detail/${getParam('oid')}`).then(res => {
if(res.data.data.course_type === '2') {
this.props.history.replace(`/togroup?id=${getParam('oid')}`);
http.get(`${API['base-api']}/m/app_order/detail/${getParam('oid')}`).then(res => {
if(Number(res.data.data.course_type) === 2) {
_this.props.history.replace(`/togroup?id=${getParam('oid')}`);
}else{
// 跳转到已购课程 /purchased 不需要传递任何参数
this.props.history.replace(`/purchased`);
_this.props.history.replace(`/purchased`);
}
});
}
})
......
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