Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
linweijiong
jinfa-platform
Commits
90f46fa3
Commit
90f46fa3
authored
Oct 13, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改支付页面
parent
cf8357af
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
index.tsx
src/pages/lxMall/pay/components/transfer/index.tsx
+6
-3
index.tsx
src/pages/lxMall/pay/index.tsx
+17
-3
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+0
-1
No files found.
src/pages/lxMall/pay/components/transfer/index.tsx
View file @
90f46fa3
...
@@ -12,11 +12,12 @@ const { Dragger } = Upload
...
@@ -12,11 +12,12 @@ const { Dragger } = Upload
interface
TransferPayWayPropsType
{
interface
TransferPayWayPropsType
{
payInfo
:
GetOrderOrderPayDetailsResponse
payInfo
:
GetOrderOrderPayDetailsResponse
orderId
:
number
orderId
:
number
,
onChange
:
Function
}
}
const
TransferPayWay
:
React
.
FC
<
TransferPayWayPropsType
>
=
(
props
)
=>
{
const
TransferPayWay
:
React
.
FC
<
TransferPayWayPropsType
>
=
(
props
)
=>
{
const
{
payInfo
,
orderId
}
=
props
const
{
payInfo
,
orderId
,
onChange
}
=
props
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
payOrderUrl
,
setPayOrderUrls
]
=
useState
<
string
>
()
const
[
payOrderUrl
,
setPayOrderUrls
]
=
useState
<
string
>
()
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
...
@@ -75,11 +76,13 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => {
...
@@ -75,11 +76,13 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
message
.
destroy
()
message
.
success
(
"支付成功"
)
message
.
success
(
"支付成功"
)
onChange
(
true
)
}
else
{
}
else
{
setConfirmLoading
(
false
)
setConfirmLoading
(
false
)
onChange
(
false
)
}
}
}).
catch
(()
=>
{
}).
catch
(()
=>
{
onChange
(
false
)
setConfirmLoading
(
false
)
setConfirmLoading
(
false
)
})
})
}
}
...
...
src/pages/lxMall/pay/index.tsx
View file @
90f46fa3
...
@@ -48,6 +48,7 @@ const getPayTypeTitle = (type) => {
...
@@ -48,6 +48,7 @@ const getPayTypeTitle = (type) => {
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
const
[
payState
,
setPayState
]
=
useState
<
boolean
>
(
false
)
const
{
orderId
}
=
props
.
location
.
query
const
{
orderId
}
=
props
.
location
.
query
const
[
pageTitle
,
setPageTitle
]
=
useState
<
string
>
()
const
[
pageTitle
,
setPageTitle
]
=
useState
<
string
>
()
const
[
payType
]
=
useState
<
string
|
number
>
(
PayWayType
.
bank
)
const
[
payType
]
=
useState
<
string
|
number
>
(
PayWayType
.
bank
)
...
@@ -72,6 +73,10 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
...
@@ -72,6 +73,10 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
})
})
}
}
const
handlePayChangge
=
(
state
)
=>
{
setPayState
(
state
)
}
const
renderPayWay
=
()
=>
{
const
renderPayWay
=
()
=>
{
if
(
!
payInfo
)
{
if
(
!
payInfo
)
{
return
return
...
@@ -89,7 +94,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
...
@@ -89,7 +94,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
case
PayWayType
.
bank
:
case
PayWayType
.
bank
:
return
<
BankPayWay
/>
return
<
BankPayWay
/>
case
PayWayType
.
transfer
:
case
PayWayType
.
transfer
:
return
<
TransferPayWay
payInfo=
{
payInfo
}
orderId=
{
orderId
}
/>
return
<
TransferPayWay
payInfo=
{
payInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
/>
default
:
default
:
return
null
return
null
}
}
...
@@ -98,7 +103,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
...
@@ -98,7 +103,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
window
.
location
.
href
=
'/'
window
.
location
.
href
=
'/'
}
}
return
payInfo
?
(
return
payInfo
?
!
payState
?
(
<
div
className=
{
styles
.
pay
}
>
<
div
className=
{
styles
.
pay
}
>
<
CommonHeader
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
...
@@ -110,7 +115,16 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
...
@@ -110,7 +115,16 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
}
}
</
div
>
</
div
>
</
div
>
</
div
>
)
:
<
div
>
)
:
(<
div
>
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
title=
"支付成功"
/>
<
div
className=
{
styles
.
errmsg
}
>
<
p
>
支付成功
</
p
>
<
Button
type=
"primary"
className=
{
styles
.
backbtn
}
onClick=
{
()
=>
backHome
()
}
>
继续购物
</
Button
>
</
div
>
</
div
>)
:
<
div
>
<
CommonHeader
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
title=
"支付错误"
title=
"支付错误"
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
90f46fa3
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react'
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react'
import
CommonHeader
from
'../components/CommonHeader'
import
CommonHeader
from
'../components/CommonHeader'
import
InputNumber
from
'@/components/InputNumber'
import
InputNumber
from
'@/components/InputNumber'
import
Recommand
from
'../components/Recommand'
import
Recommand
from
'../components/Recommand'
import
{
history
}
from
'umi'
import
cx
from
'classnames'
import
cx
from
'classnames'
import
{
Checkbox
,
Affix
,
message
,
Modal
,
Button
}
from
'antd'
import
{
Checkbox
,
Affix
,
message
,
Modal
,
Button
}
from
'antd'
import
styles
from
'./index.less'
import
styles
from
'./index.less'
...
...
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