Commit 8a164bde by zhanghaozhe

加字段

parent 2bc4b1e6
......@@ -120,6 +120,7 @@ class Order extends Component {
depositPrice: 0,
course_id: getParam('oid'),
user_account: '',
finalStartTime: '',
}
}
......@@ -133,10 +134,13 @@ class Order extends Component {
}).then(res => {
const {data} = res
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']}`)
}else {
this.props.history.replace({pathname: '/deposit-pay-order', search: `?oid=${data.data['order_id']}`})
} else {
this.props.history.replace({
pathname: '/deposit-pay-order',
search: `?oid=${data.data['order_id']}`
})
}
} else {
Toast.info(data.msg)
......@@ -161,7 +165,8 @@ class Order extends Component {
this.setState({
orderList: [data.data.course],
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 {
Toast.info(data.msg)
......@@ -177,7 +182,7 @@ class Order extends Component {
useBalance = () => {
let {user_account, depositPrice} = this.state
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}))
}
......@@ -194,7 +199,8 @@ class Order extends Component {
user_account,
useBalance,
info,
offset
offset,
finalStartTime
} = this.state
return (
......@@ -248,7 +254,7 @@ class Order extends Component {
</div>
<ul className={'deposit-limit-time'}>
<li>· 717 00:00:00开始支付尾款</li>
<li>· {finalStartTime}开始支付尾款</li>
<li>· 代金券只能在支付尾款时使用</li>
</ul>
<div className="order-bar">
......
......@@ -6,6 +6,7 @@ import { Link } from 'react-router-dom'
import './index.scss'
import { VList } from '@/common'
import { WithFullSize } from '@/HOCs'
import classnames from 'classnames'
const RadioItem = Radio.RadioItem
......@@ -232,6 +233,7 @@ class PayOrder extends Component {
singleMoney,
periodNumber,
categoryList,
agree
} = this.state
return (
<div className='pay-order'>
......@@ -318,7 +320,7 @@ class PayOrder extends Component {
</Flex>
{/*<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>
)
}
......
......@@ -114,6 +114,9 @@
font-size: 18px;
background-color: #18b4ed;
z-index: 9;
&.invalid{
background: #BBB;
}
}
.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