Commit 97fc38f9 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理商品导出二维码错误提示,e账户充值快捷方式进入直接开启倒计时

parent 8b10b388
......@@ -534,10 +534,10 @@ const Products: React.FC<{}> = () => {
setExportLoading(true)
postProductCommodityExportCommodityQrCode({idList: currentRef.current}, { responseType: 'blob', getResponse: true }).then((res:any) => {
const { code, data, response } = res
const filename = response.headers.get('content-disposition').split('=')[1]
if(code) {
throw new TypeError(res.message)
if(code !== 1000) {
throw new Error(res.message)
} else {
const filename = response.headers.get('content-disposition').split('=')[1]
let blob = new Blob([data], {type: "application/x-zip-compressed"})
// let objectUrl = URL.createObjectURL(blob)
// window.location.href = objectUrl
......@@ -547,7 +547,8 @@ const Products: React.FC<{}> = () => {
a.click();
window.URL.revokeObjectURL(url);
}
}).catch(error =>{
}).catch(error => {
console.log(error, 'error')
message.error(error)
}).finally(() => {
setExportLoading(false)
......
......@@ -268,6 +268,7 @@ const EAccountDetail: React.FC<{}> = () => {
modalRef.current.setVisible(false)
setSendCodeVisible(true)
setTradeCode(data.tradeCode)
start()
} else if(code === 1000 && parasm.type === 'GATEWAY_VSP') {
modalRef.current.setVisible(false)
setPayResultVisible(true)
......@@ -283,6 +284,7 @@ const EAccountDetail: React.FC<{}> = () => {
const handleRecharge = () => {
modalRef.current.setVisible(true)
}
const applyWithdraw = () => {
......@@ -291,11 +293,11 @@ const EAccountDetail: React.FC<{}> = () => {
}
const handleWithdraw = () => {
setLoading(true)
withdrawForm.submit()
}
const handleWidthdrawSubmit = (values) => {
setLoading(true)
const amount = Number(values.amount)
if (amount > 0 && amount <= details.usableBalance) { // 大于0并且小于可用金额
let params = {
......
......@@ -103,7 +103,7 @@ const CompanyFinish: React.FC<{}> = () => {
</Col>
<Col span={12}>
<Row className={styles['card-list']}>
<Col span={6} className={styles['card-list_title']}>{intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.zhihanghanghao', defaultMessage: '支行号' })}</Col>
<Col span={6} className={styles['card-list_title']}>{intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.zhihanghanghao', defaultMessage: '支行号' })}</Col>
<Col>{data.bankNo}</Col>
</Row>
</Col>
......
......@@ -104,8 +104,6 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
const payObj = data.payments.filter(item => item.showPayment)[0]
setCurrentPayInfoId(payObj?.paymentId ? payObj.paymentId : data.payments[0].paymentId)
}
} else {
message.error(msg)
}
})
}
......
......@@ -384,6 +384,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
setPayStep(3)
setTradeCode(res.data.tradeNo)
setCurrent(1000)
start()
} else if(tonglian && checked.id === 14) {
console.log(current, checked, '通联快捷跳转')
setCurrent(1000)
......
......@@ -131,7 +131,6 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
effects={($, ctx) => {
$('onFormMount').subscribe(() => {
// 四级联动
console.log($, ctx, 1)
useChainEffects($, ctx)
})
......
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