Commit 52830ee3 authored by GuanHua's avatar GuanHua

feat:修改下单参数

parent 5b0d8c05
......@@ -92,7 +92,6 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
}
}
return (
<div className={styles.information_detail}>
<div className={styles.information_detail_container}>
......
......@@ -27,6 +27,7 @@ interface OrderPropsType {
}
const Order: React.FC<OrderPropsType> = (props) => {
let checkoutCount = 0
const userInfo = getAuth()
const { shopInfo, mallInfo, layoutType, } = props
const { query: { type = COMMODITY_TYPE.prompt } } = props.location
......@@ -287,6 +288,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}]
if (needTheInvoice) {
params.theInvoiceId = selectInvoiceInfo.id
params.theInvoiceInfo = selectInvoiceInfo
}
setConfirmLoading(true)
PublicApi.postOrderProcurementOrderAdd(params).then(res => {
......@@ -346,6 +348,8 @@ const Order: React.FC<OrderPropsType> = (props) => {
// @ts-ignore
PublicApi.postOrderSignatureOrderSettleSign(param).then((res: any) => {
if (res.code === 1000) {
message.destroy()
checkoutCount = 0
pollingCheckStatus(res.data.signatureLogId)
} else {
setAgreeSignLoading(false)
......@@ -359,7 +363,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
let param = {
signatureLogId
}
PublicApi.postOrderSignatureOrderSettleSignDetail(param).then(res => {
PublicApi.getOrderSignatureOrderSettleSignDetail(param).then(res => {
let timer = null
if (res.code === 1000) {
if (res.data.state === 4) {
......@@ -368,9 +372,20 @@ const Order: React.FC<OrderPropsType> = (props) => {
submitOrder()
} else {
timer = setTimeout(() => {
pollingCheckStatus(signatureLogId)
}, 1500);
if (checkoutCount < 20) {
checkoutCount++
pollingCheckStatus(signatureLogId)
} else {
timer = null
clearTimeout(timer)
setAgreeSignLoading(false)
message.error("签署合同失败,请重新签署")
}
}, 3000);
}
} else {
setAgreeSignLoading(false)
message.error("签署合同失败,请重新签署")
}
})
}
......
......@@ -70,10 +70,12 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => {
payOrderUrls: [payOrderUrl]
}
setConfirmLoading(true)
//@ts-ignore
PublicApi.postOrderPendingOrderPay(param).then(res => {
if (res.code === 1000) {
message.destroy()
message.success("支付成功")
} else {
}
......
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