Commit 69927e77 by wangshuo

Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu

parents 81c9ebfc f4becc9b
...@@ -307,15 +307,19 @@ ...@@ -307,15 +307,19 @@
.bargain { .bargain {
width: 165px; width: 165px;
height: 30px; height: 30px;
background: $bg_077FD0; background: $bg_FADD29;
border-radius: 2px; border-radius: 2px;
border: none; border: none;
color: $white; color: $color_FF4000;
-webkit-appearance: none; -webkit-appearance: none;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
line-height: 30px; line-height: 30px;
} }
.button--study {
color: $white;
background: $bg_077FD0;
}
.btns { .btns {
display: flex; display: flex;
......
...@@ -11,6 +11,7 @@ import Overlay from '../detail/overlay' ...@@ -11,6 +11,7 @@ import Overlay from '../detail/overlay'
import { compose } from "redux" import { compose } from "redux"
import { connect } from "react-redux"; import { connect } from "react-redux";
import {getCourses} from './../detail/actions'; import {getCourses} from './../detail/actions';
import classnames from 'classnames';
@connect(state => ({ @connect(state => ({
user: state.user user: state.user
...@@ -544,9 +545,9 @@ function CourseBottom(props) { ...@@ -544,9 +545,9 @@ function CourseBottom(props) {
let Buttons let Buttons
if (props.item.bargain_status === 2) { if (props.item.bargain_status === 2) {
// Buttons = <Link to={`/detail?id=${props.item.course_id}`} className={'bargain'}>我要砍价</Link> // Buttons = <Link to={`/detail?id=${props.item.course_id}`} className={'bargain'}>我要砍价</Link>
Buttons = <a href="javascript:;" onClick={() => props.toDetail(props.item.course_id)} className={'bargain'}>我要砍价</a> Buttons = <a href="javascript:;" onClick={() => props.toDetail(props.item.course_id)} className={'bargain bargian-study'}>我要砍价</a>
} else if (props.item.bargain_status === 3) { } else if (props.item.bargain_status === 3) {
Buttons = <Link to={`/play/video?id=${props.item.v_course_id}`} className={'bargain'}>去学习</Link> Buttons = <Link to={`/play/video?id=${props.item.v_course_id}`} className={classnames('bargain', 'button--study')}>去学习</Link>
} else { } else {
Buttons = ( Buttons = (
<div className="btns"> <div className="btns">
......
...@@ -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