Commit 8a164bde by zhanghaozhe

加字段

parent 2bc4b1e6
...@@ -120,6 +120,7 @@ class Order extends Component { ...@@ -120,6 +120,7 @@ class Order extends Component {
depositPrice: 0, depositPrice: 0,
course_id: getParam('oid'), course_id: getParam('oid'),
user_account: '', user_account: '',
finalStartTime: '',
} }
} }
...@@ -133,10 +134,13 @@ class Order extends Component { ...@@ -133,10 +134,13 @@ class Order extends Component {
}).then(res => { }).then(res => {
const {data} = res const {data} = res
if (data.errno == 200) { if (data.errno == 200) {
if(data.data['pay_jump']){ if (data.data['pay_jump']) {
this.props.history.replace(`/expand/callback?order_id=${data.data['order_id']}`) this.props.history.replace(`/expand/callback?order_id=${data.data['order_id']}`)
}else { } else {
this.props.history.replace({pathname: '/deposit-pay-order', search: `?oid=${data.data['order_id']}`}) this.props.history.replace({
pathname: '/deposit-pay-order',
search: `?oid=${data.data['order_id']}`
})
} }
} else { } else {
Toast.info(data.msg) Toast.info(data.msg)
...@@ -161,7 +165,8 @@ class Order extends Component { ...@@ -161,7 +165,8 @@ class Order extends Component {
this.setState({ this.setState({
orderList: [data.data.course], orderList: [data.data.course],
depositPrice: data.data.course['sale_price'], depositPrice: data.data.course['sale_price'],
user_account: data.data['user_account'] user_account: data.data['user_account'],
finalStartTime: data.data['final_start_time']
}) })
} else { } else {
Toast.info(data.msg) Toast.info(data.msg)
...@@ -177,7 +182,7 @@ class Order extends Component { ...@@ -177,7 +182,7 @@ class Order extends Component {
useBalance = () => { useBalance = () => {
let {user_account, depositPrice} = this.state let {user_account, depositPrice} = this.state
let offset = parseFloat(user_account) - parseFloat(depositPrice) let offset = parseFloat(user_account) - parseFloat(depositPrice)
offset = offset > 0 ? depositPrice : user_account offset = offset > 0 ? depositPrice : user_account
this.setState(prevState => ({useBalance: !prevState.useBalance, offset})) this.setState(prevState => ({useBalance: !prevState.useBalance, offset}))
} }
...@@ -194,7 +199,8 @@ class Order extends Component { ...@@ -194,7 +199,8 @@ class Order extends Component {
user_account, user_account,
useBalance, useBalance,
info, info,
offset offset,
finalStartTime
} = this.state } = this.state
return ( return (
...@@ -248,7 +254,7 @@ class Order extends Component { ...@@ -248,7 +254,7 @@ class Order extends Component {
</div> </div>
<ul className={'deposit-limit-time'}> <ul className={'deposit-limit-time'}>
<li>· 717 00:00:00开始支付尾款</li> <li>· {finalStartTime}开始支付尾款</li>
<li>· 代金券只能在支付尾款时使用</li> <li>· 代金券只能在支付尾款时使用</li>
</ul> </ul>
<div className="order-bar"> <div className="order-bar">
......
...@@ -6,6 +6,7 @@ import { Link } from 'react-router-dom' ...@@ -6,6 +6,7 @@ import { Link } from 'react-router-dom'
import './index.scss' import './index.scss'
import { VList } from '@/common' import { VList } from '@/common'
import { WithFullSize } from '@/HOCs' import { WithFullSize } from '@/HOCs'
import classnames from 'classnames'
const RadioItem = Radio.RadioItem const RadioItem = Radio.RadioItem
...@@ -232,6 +233,7 @@ class PayOrder extends Component { ...@@ -232,6 +233,7 @@ class PayOrder extends Component {
singleMoney, singleMoney,
periodNumber, periodNumber,
categoryList, categoryList,
agree
} = this.state } = this.state
return ( return (
<div className='pay-order'> <div className='pay-order'>
...@@ -318,7 +320,7 @@ class PayOrder extends Component { ...@@ -318,7 +320,7 @@ class PayOrder extends Component {
</Flex> </Flex>
{/*<div className='pay-tip'>请在15分钟内完成支付,否则届时系统将关闭该订单。</div>*/} {/*<div className='pay-tip'>请在15分钟内完成支付,否则届时系统将关闭该订单。</div>*/}
<div className='pay-button' onClick={this.pay}>确认支付</div> <div className={classnames(['pay-button', !agree && 'invalid'])} onClick={this.pay}>确认支付</div>
</div> </div>
) )
} }
......
...@@ -114,6 +114,9 @@ ...@@ -114,6 +114,9 @@
font-size: 18px; font-size: 18px;
background-color: #18b4ed; background-color: #18b4ed;
z-index: 9; z-index: 9;
&.invalid{
background: #BBB;
}
} }
.check-staging { .check-staging {
......
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