处理充值问题
This commit is contained in:
parent
74d6a0543e
commit
b9ef03390b
@ -161,12 +161,14 @@ export default function Payment(props: IPaymentProps) {
|
||||
rechargeMoney: 300
|
||||
})
|
||||
setThirdParty(ThirdPartyEnum.DGZZ)
|
||||
return;
|
||||
}
|
||||
getPay();
|
||||
}, [thirdParty, isRechargeMoneyEdit, refreshQrCodeCount]);
|
||||
|
||||
|
||||
const renderMoney = () => {
|
||||
console.log(form.getFieldValue('rechargeMoney'))
|
||||
if (isRechargeMoneyEdit) {
|
||||
return (
|
||||
<div>
|
||||
@ -314,10 +316,23 @@ export default function Payment(props: IPaymentProps) {
|
||||
<Form.Item
|
||||
name="rechargeVoucher"
|
||||
style={{marginBottom: '0'}}
|
||||
valuePropName="fileList"
|
||||
getValueFromEvent={(e: any) => {
|
||||
console.log(e);
|
||||
if(e.file.status === 'done') {
|
||||
rechargeVoucherArray.push(e.file.response.data.fileId);
|
||||
setRechargeVoucherArray(rechargeVoucherArray);
|
||||
}
|
||||
if(e.file.status === 'removed') {
|
||||
const idArray = rechargeVoucherArray.filter(item => item != e.file.response.data.fileId);
|
||||
setRechargeVoucherArray(idArray);
|
||||
}
|
||||
return e.fileList;
|
||||
}}
|
||||
rules={[{required: true, message: '请上传打款凭证'}]}
|
||||
>
|
||||
<Upload name="image"
|
||||
maxCount={9}
|
||||
maxCount={2}
|
||||
action={uploadImageUrl()}
|
||||
headers={{'X-USER-ID': DevUserId}}
|
||||
beforeUpload={(file: FileType) => {
|
||||
@ -327,26 +342,6 @@ export default function Payment(props: IPaymentProps) {
|
||||
}
|
||||
return isJpgOrPng;
|
||||
}}
|
||||
onChange={(info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
setIsLoading(true);
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
setIsLoading(false);
|
||||
info.file.uid = info.file.response.data.fileId;
|
||||
rechargeVoucherArray.push(info.file.uid);
|
||||
setRechargeVoucherArray([...rechargeVoucherArray]);
|
||||
form.setFieldValue('rechargeVoucher', rechargeVoucherArray.join(','));
|
||||
return;
|
||||
}
|
||||
}}
|
||||
onRemove={(info) => {
|
||||
console.log((info.uid))
|
||||
const idArray = rechargeVoucherArray.filter(item => item != info.uid);
|
||||
setRechargeVoucherArray([...idArray]);
|
||||
form.setFieldValue('rechargeVoucher', rechargeVoucherArray.join(','));
|
||||
}}
|
||||
>
|
||||
<Button icon={<UploadOutlined/>}>上传凭证图片</Button>
|
||||
</Upload>
|
||||
@ -396,7 +391,7 @@ export default function Payment(props: IPaymentProps) {
|
||||
orgBank: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgBank') : '',
|
||||
orgNumber: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgNumber') : '',
|
||||
rechargeFinalTime: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeFinalTime') : '',
|
||||
rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeVoucher') : '',
|
||||
rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? rechargeVoucherArray.join(',') : '',
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
@ -419,7 +414,7 @@ export default function Payment(props: IPaymentProps) {
|
||||
<Radio.Group onChange={(e) => {
|
||||
form.setFieldValue('thirdParty', e.target.value);
|
||||
setThirdParty(e.target.value);
|
||||
}} defaultValue="a">
|
||||
}}>
|
||||
<Radio value="微信">微信</Radio>
|
||||
<Radio value="支付宝">支付宝</Radio>
|
||||
{/*<Radio value="银联">银联</Radio>*/}
|
||||
|
@ -5,14 +5,14 @@ export const Axios = axios;
|
||||
|
||||
// axios.defaults.baseURL = 'http://192.168.0.163:7025/copyright';
|
||||
// axios.defaults.baseURL = 'http://192.168.43.145:7025/copyright';
|
||||
axios.defaults.baseURL = 'http://192.168.0.15:7025/copyright';
|
||||
// axios.defaults.baseURL = 'http://127.0.0.1:7025/copyright';
|
||||
// axios.defaults.baseURL = 'https://www.aimzhu.com/copyright';
|
||||
// axios.defaults.baseURL = '/copyright';
|
||||
export const WebSocketBaseUrl: string = 'ws://192.168.0.15:7025/copyright';
|
||||
// export const WebSocketBaseUrl: string = '/copyright';
|
||||
export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671'; // 18634604067
|
||||
axios.defaults.baseURL = '/copyright';
|
||||
// export const WebSocketBaseUrl: string = 'ws://127.0.0.1:7025/copyright';
|
||||
export const WebSocketBaseUrl: string = '/copyright';
|
||||
// export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671'; // 18634604067
|
||||
// export const DevUserId: string = 'c2438eb8-2685-49a9-bf02-5111a5192d96'; // 18647109157
|
||||
// export const DevUserId: string = '';
|
||||
export const DevUserId: string = '';
|
||||
|
||||
type Req<T> = {
|
||||
messageApi: MessageInstance;
|
||||
|
Loading…
Reference in New Issue
Block a user