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
shenshaokai
jinfa-platform
Commits
5f3945aa
Commit
5f3945aa
authored
Sep 25, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:订单结算页面参数调整
parent
fe54f9d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
19 deletions
+38
-19
detail.tsx
src/pages/lxMall/information/detail.tsx
+1
-0
index.tsx
src/pages/lxMall/order/index.tsx
+27
-17
index.tsx
src/pages/lxMall/pay/index.tsx
+10
-2
No files found.
src/pages/lxMall/information/detail.tsx
View file @
5f3945aa
...
@@ -23,6 +23,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
...
@@ -23,6 +23,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
const
{
query
:
{
id
}
}
=
props
.
location
const
{
query
:
{
id
}
}
=
props
.
location
const
[
newsDetail
,
setNewsDetail
]
=
useState
<
GetManageContentInformationFindByIdResponse
>
()
const
[
newsDetail
,
setNewsDetail
]
=
useState
<
GetManageContentInformationFindByIdResponse
>
()
let
collectFlg
=
true
let
collectFlg
=
true
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
id
)
{
if
(
id
)
{
fetchNewsDetail
()
fetchNewsDetail
()
...
...
src/pages/lxMall/order/index.tsx
View file @
5f3945aa
...
@@ -78,20 +78,21 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -78,20 +78,21 @@ const Order: React.FC<OrderPropsType> = (props) => {
result
.
push
(
item
)
result
.
push
(
item
)
}
}
const
productId
=
sessionOrderInfo
?.
orderList
[
0
]?.
orderList
[
0
].
id
const
productId
=
sessionOrderInfo
?.
orderList
[
0
]?.
orderList
[
0
].
id
if
(
productId
)
{
// 根据商品ID获取工作流信息,判断是否需要签署合同
try
{
// if (productId) {
const
rulesRes
=
await
PublicApi
.
getOrderTradingRulesByProductId
({
productId
})
// try {
const
{
data
}
=
rulesRes
// const rulesRes = await PublicApi.getOrderTradingRulesByProductId({ productId })
if
(
data
)
{
// const { data } = rulesRes
// 是否选用电子合同
// if (data) {
if
(
data
.
isElectronicContract
)
{
// // 是否选用电子合同
setIsElectronicContract
(
true
)
// if (data.isElectronicContract) {
}
// setIsElectronicContract(true)
}
// }
}
catch
(
error
)
{
// }
console
.
log
(
"获取交易规则失败"
)
// } catch (error) {
}
// console.log("获取交易规则失败")
}
// }
// }
setOrderList
(
result
)
setOrderList
(
result
)
setOrderInfo
(
sessionOrderInfo
)
setOrderInfo
(
sessionOrderInfo
)
setSpinningState
(
false
)
setSpinningState
(
false
)
...
@@ -235,6 +236,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -235,6 +236,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
temp
.
memberDiscount
=
orderItem
.
memberDiscount
temp
.
memberDiscount
=
orderItem
.
memberDiscount
temp
.
category
=
orderItem
.
category
temp
.
category
=
orderItem
.
category
temp
.
brand
=
orderItem
.
brand
temp
.
brand
=
orderItem
.
brand
temp
.
logistics
=
orderItem
.
logistics
orderProductRequests
.
push
(
temp
)
orderProductRequests
.
push
(
temp
)
}
}
}
}
...
@@ -252,10 +254,13 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -252,10 +254,13 @@ const Order: React.FC<OrderPropsType> = (props) => {
setConfirmLoading
(
true
)
setConfirmLoading
(
true
)
PublicApi
.
postOrderProcurementOrderAdd
(
params
).
then
(
res
=>
{
PublicApi
.
postOrderProcurementOrderAdd
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
if
(
res
.
data
.
isPay
===
0
)
{
history
.
push
(
`/pay?orderId=
${
data
.
orderId
}
`
)
const
data
=
res
.
data
history
.
push
(
`/pay?orderId=
${
data
.
orderId
}
`
)
}
else
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/orderDetail?modelType=5&spam_id=
${
spam_id
}
`
)
}
}
}
// history.push(`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/orderDetail?modelType=5&spam_id=${spam_id}`)
setConfirmLoading
(
false
)
setConfirmLoading
(
false
)
}).
catch
(()
=>
{
}).
catch
(()
=>
{
setConfirmLoading
(
false
)
setConfirmLoading
(
false
)
...
@@ -264,6 +269,11 @@ const Order: React.FC<OrderPropsType> = (props) => {
...
@@ -264,6 +269,11 @@ const Order: React.FC<OrderPropsType> = (props) => {
const
checkOrder
=
()
=>
{
const
checkOrder
=
()
=>
{
message
.
destroy
()
message
.
destroy
()
if
(
!
selectAddressInfo
)
{
message
.
info
(
'请选择收货地址'
)
return
}
if
(
isEmpty
(
selectPayWay
))
{
if
(
isEmpty
(
selectPayWay
))
{
message
.
info
(
'请选择支付方式'
)
message
.
info
(
'请选择支付方式'
)
return
return
...
...
src/pages/lxMall/pay/index.tsx
View file @
5f3945aa
...
@@ -8,10 +8,14 @@ import BankPayWay from './components/bank'
...
@@ -8,10 +8,14 @@ import BankPayWay from './components/bank'
import
TransferPayWay
from
'./components/transfer'
import
TransferPayWay
from
'./components/transfer'
import
{
PublicApi
}
from
'@/services/api'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetOrderOrderPayDetailsResponse
}
from
'@/services/OrderApi'
import
{
GetOrderOrderPayDetailsResponse
}
from
'@/services/OrderApi'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
styles
from
'./index.less'
import
styles
from
'./index.less'
interface
PayPagePropsType
{
interface
PayPagePropsType
{
location
:
any
location
:
any
;
shopInfo
:
any
;
mallInfo
:
any
;
layoutType
:
LAYOUT_TYPE
;
}
}
enum
PayWayType
{
enum
PayWayType
{
...
@@ -42,6 +46,7 @@ const getPayTypeTitle = (type) => {
...
@@ -42,6 +46,7 @@ const getPayTypeTitle = (type) => {
}
}
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
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
)
...
@@ -87,7 +92,10 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
...
@@ -87,7 +92,10 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
return
payInfo
?
(
return
payInfo
?
(
<
div
className=
{
styles
.
pay
}
>
<
div
className=
{
styles
.
pay
}
>
<
CommonHeader
title=
{
pageTitle
}
/>
<
CommonHeader
logoUrl=
{
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
shopInfo
?.
logo
:
mallInfo
.
logoUrl
}
title=
{
pageTitle
}
/>
<
div
className=
{
styles
.
pay_container
}
>
<
div
className=
{
styles
.
pay_container
}
>
{
{
payInfo
&&
renderPayWay
()
payInfo
&&
renderPayWay
()
...
...
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