Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
8a164bde
Commit
8a164bde
authored
Oct 23, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加字段
parent
2bc4b1e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
src/components/order/deposit/deposit-order/index.js
+13
-7
src/components/order/deposit/deposit-pay-order/index.js
+3
-1
src/components/order/deposit/deposit-pay-order/index.scss
+3
-0
No files found.
src/components/order/deposit/deposit-order/index.js
View file @
8a164bde
...
@@ -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
>
·
7
月
17
日
00
:
00
:
00
开始支付尾款
<
/li
>
<
li
>
·
{
finalStartTime
}
开始支付尾款
<
/li
>
<
li
>
·
代金券只能在支付尾款时使用
<
/li
>
<
li
>
·
代金券只能在支付尾款时使用
<
/li
>
<
/ul
>
<
/ul
>
<
div
className
=
"order-bar"
>
<
div
className
=
"order-bar"
>
...
...
src/components/order/deposit/deposit-pay-order/index.js
View file @
8a164bde
...
@@ -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
>
)
)
}
}
...
...
src/components/order/deposit/deposit-pay-order/index.scss
View file @
8a164bde
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment