diff --git a/src/components/payment/Payment.tsx b/src/components/payment/Payment.tsx
index 73eaeed..694420f 100644
--- a/src/components/payment/Payment.tsx
+++ b/src/components/payment/Payment.tsx
@@ -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 (
@@ -314,10 +316,23 @@ export default function Payment(props: IPaymentProps) {
{
+ 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: '请上传打款凭证'}]}
>
{
@@ -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(','));
- }}
>
@@ -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) {
{
form.setFieldValue('thirdParty', e.target.value);
setThirdParty(e.target.value);
- }} defaultValue="a">
+ }}>
微信
支付宝
{/*银联*/}
diff --git a/src/util/AjaxUtils.ts b/src/util/AjaxUtils.ts
index 1e92f10..e953a2c 100644
--- a/src/util/AjaxUtils.ts
+++ b/src/util/AjaxUtils.ts
@@ -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 = {
messageApi: MessageInstance;