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
黄庭坚
jinfa-platform
Commits
3b0abbe0
Commit
3b0abbe0
authored
Nov 09, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
c37de69f
5ef1bae9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
14 deletions
+27
-14
index.tsx
src/pages/lxMall/order/index.tsx
+4
-2
index.tsx
src/pages/lxMall/pay/components/credit/index.tsx
+15
-11
index.tsx
src/pages/lxMall/pay/index.tsx
+8
-1
No files found.
src/pages/lxMall/order/index.tsx
View file @
3b0abbe0
...
...
@@ -280,6 +280,8 @@ const Order: React.FC<OrderPropsType> = (props) => {
temp
.
brand
=
orderItem
.
brand
temp
.
logistics
=
orderItem
.
logistics
temp
.
deliveryType
=
orderItem
.
logistics
.
deliveryType
temp
.
memberId
=
orderInfo
.
supplyMembersId
temp
.
memberRoleId
=
orderInfo
.
supplyMembersRoleId
orderProductRequests
.
push
(
temp
)
}
}
...
...
@@ -307,9 +309,9 @@ const Order: React.FC<OrderPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
if
(
selectPayWay
.
payType
===
4
)
{
history
.
push
(
`/pay/result?orderId=
${
data
.
orderId
}
`
)
history
.
replace
(
`/pay/result?orderId=
${
data
.
orderId
}
`
)
}
else
{
history
.
push
(
`/pay?orderId=
${
data
.
orderId
}
&spam_id=
${
spam_id
}
`
)
history
.
replace
(
`/pay?orderId=
${
data
.
orderId
}
&spam_id=
${
spam_id
}
`
)
}
}
setConfirmLoading
(
false
)
...
...
src/pages/lxMall/pay/components/credit/index.tsx
View file @
3b0abbe0
...
...
@@ -32,12 +32,18 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
}
useEffect
(()
=>
{
if
(
orderInfo
)
{
fetchCreditInfo
()
fetchSecurity
()
},
[])
}
},
[
orderInfo
])
const
fetchCreditInfo
=
()
=>
{
PublicApi
.
getPayCreditGetCredit
().
then
(
res
=>
{
let
param
=
{
parentMemberId
:
orderInfo
.
supplyMembersId
,
parentMemberRoleId
:
orderInfo
.
supplyMembersRoleId
}
PublicApi
.
getPayCreditGetCredit
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
data
.
isUsable
===
0
)
{
message
.
error
(
"授信额度不可用"
)
...
...
@@ -50,11 +56,8 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
}
const
fetchSecurity
=
()
=>
{
let
param
=
{
parentMemberId
:
orderInfo
.
supplyMembersId
,
parentMemberRoleId
:
orderInfo
.
supplyMembersRoleId
}
PublicApi
.
getMemberSecurityGet
(
param
).
then
(
res
=>
{
PublicApi
.
getMemberSecurityGet
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setSecurityInfo
(
res
.
data
)
}
...
...
@@ -68,11 +71,12 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
}
if
(
!
payPassword
||
payPassword
.
length
<
6
)
{
message
.
error
(
"请输入支付密码"
)
return
}
let
param
=
{
id
:
orderId
,
paymentInformationId
:
payInfo
.
paymentInformationId
,
payPassword
id
:
Number
(
orderId
)
,
paymentInformationId
:
Number
(
payInfo
.
paymentInformationId
)
,
payPassword
:
Number
(
payPassword
)
}
setConfirmLoading
(
true
)
//@ts-ignore
...
...
@@ -80,7 +84,7 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
message
.
success
(
"支付成功"
)
history
.
push
(
`/pay/result?orderId=
${
orderId
}
`
)
history
.
replace
(
`/pay/result?orderId=
${
orderId
}
`
)
}
else
{
setConfirmLoading
(
false
)
message
.
destroy
()
...
...
src/pages/lxMall/pay/index.tsx
View file @
3b0abbe0
...
...
@@ -53,6 +53,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
const
[
payState
,
setPayState
]
=
useState
<
boolean
>
(
false
)
const
{
orderId
,
spam_id
}
=
props
.
location
.
query
const
[
pageTitle
,
setPageTitle
]
=
useState
<
string
>
()
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
payType
]
=
useState
<
string
|
number
>
(
PayWayType
.
bank
)
const
[
payInfo
,
setPayInfo
]
=
useState
<
GetOrderOrderPayDetailsResponse
>
()
const
[
errMsg
,
setErrMsg
]
=
useState
<
string
>
(
''
)
...
...
@@ -77,12 +78,15 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
const
fetchOrderInfo
=
()
=>
{
PublicApi
.
getOrderOrderPayDetails
({
id
:
orderId
}).
then
(
res
=>
{
message
.
destroy
()
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
setPayInfo
(
res
.
data
)
setPageTitle
(
getPayTypeTitle
(
res
.
data
.
paymentChannelsId
))
}
else
{
setErrMsg
(
res
.
message
)
}
}).
catch
(()
=>
{
setLoading
(
false
)
})
}
...
...
@@ -137,7 +141,8 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
<
p
>
支付成功
</
p
>
<
Button
type=
"primary"
className=
{
styles
.
backbtn
}
onClick=
{
()
=>
backHome
()
}
>
继续购物
</
Button
>
</
div
>
</
div
>)
:
<
div
>
</
div
>)
:
loading
?
null
:
(
<
div
>
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
title=
"支付错误"
...
...
@@ -147,6 +152,8 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
<
Button
type=
"primary"
className=
{
styles
.
backbtn
}
onClick=
{
()
=>
backHome
()
}
>
返回首页
</
Button
>
</
div
>
</
div
>
)
}
export
default
PayPage
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