Commit b6d3b129 authored by GuanHua's avatar GuanHua

fix: 订单结算合同数据加载时体验优化

parent 1913e34c
......@@ -70,7 +70,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
const [contracErrorInfo, setContracErrorInfo] = useState<any>()
const [electronicContractId, setElectronicContractId] = useState<number>()
const [agreeSingLoading, setAgreeSignLoading] = useState<boolean>(false)
const [btnDisabled, setBtnDisable] = useState<boolean>(true)
const [btnDisabled] = useState<boolean>(false)
const { storeId } = useStoreId(getLayoutType(layoutType, Number(type)))
useEffect(() => {
......@@ -131,7 +131,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
if (sessionStorage.getItem(`contract${spam_id}`)) {
setContractInfo(JSON.parse(sessionStorage.getItem(`contract${spam_id}`)))
setIsElectronicContract(true)
setBtnDisable(false)
setSpinningState(false)
} else {
// 根据电子合同模板id获取生成电子合同
const param: any = {
......@@ -156,19 +156,19 @@ const Order: React.FC<OrderPropsType> = (props) => {
setContracErrorInfo(signRes.message)
}
setIsElectronicContract(true)
setBtnDisable(false)
setSpinningState(false)
}
} else {
setBtnDisable(false)
setSpinningState(false)
}
} else {
setBtnDisable(false)
setSpinningState(false)
}
} catch (error) {
console.log("获取交易规则失败")
}
} else {
setBtnDisable(false)
setSpinningState(false)
}
}
......@@ -198,7 +198,6 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
setOrderList(result)
setOrderInfo(sessionOrderInfo)
setSpinningState(false)
}
const renderLogisticsInfo = (type, logisticsInfo) => {
......
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