Commit 89ce947b by FE

Merge branch '00-formal' into dev

parents 8556f753 d2f86890
......@@ -4,7 +4,11 @@ import {http, SendMessageToApp, getParam} from '@/utils'
import CommonContainer from './../common/commonContainer/index'
import CourseItem from '../../../blessingPreheat/courseItem/index'
import {withRouter} from "react-router-dom"
import { connect } from 'react-redux';
@connect(({user}) => ({
user
}))
class YarnWish extends Component {
state = {
list: [],
......@@ -113,6 +117,7 @@ class YarnWish extends Component {
// 砍完价去支付
bargainToOrder = (id) => {
console.log(this.props);
const { history, user } = this.props;
if(user.hasError) {
this.toLogin();
......@@ -272,7 +277,7 @@ class YarnWish extends Component {
item.type === 4 &&
<>
<a
onClick={() => this.toContinueBargain(item.bargain_code)}
onClick={() => this.toContinueBargain(item.course_id, item.bargain_code)}
className="status-btn to-group"
>继续砍价</a>
<a
......
......@@ -14,13 +14,13 @@ class CourseItem extends Component {
this.startCountDown(time);
}
// componentWillReceiveProps(nextProps) {
// const { time: newTime } = nextProps
// const { time: oldTime } = this.props;
// if(oldTime != newTime) {
// this.startCountDown(newTime);
// }
// }
componentWillReceiveProps(nextProps) {
const { time: newTime } = nextProps
const { time: oldTime } = this.props;
if(oldTime != newTime) {
this.startCountDown(newTime);
}
}
startCountDown = (time) => {
if(time) {
......
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