Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
d8eb6e95
Commit
d8eb6e95
authored
May 12, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 去掉HOC形式,改为hook + component
parent
8c2a0c4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
18 deletions
+34
-18
verify.tsx
src/pages/member/memberPrComingClassify/verify.tsx
+17
-9
verify.tsx
src/pages/supplier/memberPrComingClassify/verify.tsx
+17
-9
No files found.
src/pages/member/memberPrComingClassify/verify.tsx
View file @
d8eb6e95
...
...
@@ -12,9 +12,10 @@ import {
}
from
'@ant-design/icons'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
{
postMemberDepositClassify
,
getMemberDepositClassifyDetail
}
from
'@/services/MemberV2Api'
;
import
fetchDetailHoc
from
'../common/hoc/fetchDetailHoc
'
;
import
MemberProfile
from
'../components/MemberProfile'
;
import
{
IRequestSuccess
}
from
'@/index
'
;
import
MemberProfile
,
{
DetailType
}
from
'../components/MemberProfile'
;
import
{
MemberDocCategoryProRef
,
MemberDocCategoryProProps
,
SubmitValueType
}
from
'../components/MemberDocCategoryPro'
;
import
VerifyModal
,
{
ValueType
as
VerifyData
}
from
'../components/VerifyModal'
;
...
...
@@ -28,6 +29,17 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
const
intl
=
useIntl
();
const
fetchDetail
=
():
Promise
<
IRequestSuccess
<
DetailType
>>
=>
(
getMemberDepositClassifyDetail
({
validateId
,
})
);
const
{
data
:
dataSource
,
loading
,
}
=
useHttpRequest
<
DetailType
>
(
fetchDetail
,
{
manual
:
false
});
const
handleVisibleVerifyModal
=
(
flag
?)
=>
{
setVisibleVerifyModal
(
!!
flag
);
};
...
...
@@ -58,12 +70,6 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
});
};
const
MemberProfilePro
=
fetchDetailHoc
({
fetchDetail
:
()
=>
getMemberDepositClassifyDetail
({
validateId
,
}),
},
MemberProfile
);
const
handleVerify
=
()
=>
{
categoryFormRef
?.
current
.
submit
();
};
...
...
@@ -74,7 +80,9 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
};
return
(
<
MemberProfilePro
<
MemberProfile
dataSource=
{
dataSource
}
loading=
{
loading
}
extra=
{
()
=>
(
<>
<
Button
...
...
src/pages/supplier/memberPrComingClassify/verify.tsx
View file @
d8eb6e95
...
...
@@ -12,9 +12,10 @@ import {
}
from
'@ant-design/icons'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
{
postMemberDepositClassify
,
getMemberDepositClassifyDetail
}
from
'@/services/MemberV2Api'
;
import
fetchDetailHoc
from
'../common/hoc/fetchDetailHoc
'
;
import
MemberProfile
from
'../components/MemberProfile'
;
import
{
IRequestSuccess
}
from
'@/index
'
;
import
MemberProfile
,
{
DetailType
}
from
'../components/MemberProfile'
;
import
{
MemberDocCategoryProRef
,
MemberDocCategoryProProps
,
SubmitValueType
}
from
'../components/MemberDocCategoryPro'
;
import
VerifyModal
,
{
ValueType
as
VerifyData
}
from
'../components/VerifyModal'
;
...
...
@@ -29,6 +30,17 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
const
intl
=
useIntl
();
const
fetchDetail
=
():
Promise
<
IRequestSuccess
<
DetailType
>>
=>
(
getMemberDepositClassifyDetail
({
validateId
,
})
);
const
{
data
:
dataSource
,
loading
,
}
=
useHttpRequest
<
DetailType
>
(
fetchDetail
,
{
manual
:
false
});
const
handleVisibleVerifyModal
=
(
flag
?)
=>
{
setVisibleVerifyModal
(
!!
flag
);
};
...
...
@@ -59,12 +71,6 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
});
};
const
MemberProfilePro
=
fetchDetailHoc
({
fetchDetail
:
()
=>
getMemberDepositClassifyDetail
({
validateId
,
}),
},
MemberProfile
);
const
handleVerify
=
()
=>
{
categoryFormRef
?.
current
.
submit
();
};
...
...
@@ -75,7 +81,9 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
};
return
(
<
MemberProfilePro
<
MemberProfile
dataSource=
{
dataSource
}
loading=
{
loading
}
extra=
{
()
=>
(
<>
<
Button
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment