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
黄庭坚
jinfa-platform
Commits
0b7d2410
Commit
0b7d2410
authored
Jul 26, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 手动添加 无 选项
parent
e308c27c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
9 deletions
+35
-9
fetchDetailHoc.tsx
src/pages/member/common/hoc/fetchDetailHoc.tsx
+10
-3
verify.tsx
src/pages/member/memberPrVerifyComingData/verify.tsx
+25
-6
No files found.
src/pages/member/common/hoc/fetchDetailHoc.tsx
View file @
0b7d2410
...
...
@@ -7,11 +7,16 @@
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
export
type
ResponseType
<
P
>
=
{
data
:
P
,
code
:
number
}
export
interface
IConfig
<
P
>
{
/**
* 请求详情方法
*/
fetchDetail
:
()
=>
Promise
<
{
data
:
P
}
>
;
fetchDetail
:
()
=>
Promise
<
ResponseType
<
P
>
>
;
/**
* fetch callback
*/
...
...
@@ -27,8 +32,10 @@ const FetchDetailHoc = <P, T extends {}>(config: IConfig<P>, WrapComponent: Reac
if
(
fetchDetail
)
{
setLoading
(
true
);
fetchDetail
().
then
((
res
)
=>
{
setDetail
(
res
.
data
);
fetchCallback
?.(
res
.
data
);
if
(
res
.
code
===
1000
)
{
setDetail
(
res
.
data
);
fetchCallback
?.(
res
.
data
);
}
}).
finally
(()
=>
{
setLoading
(
false
);
});
...
...
src/pages/member/memberPrVerifyComingData/verify.tsx
View file @
0b7d2410
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:01:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-
14 11:43
:28
* @LastEditTime: 2021-07-
26 11:44
:28
* @Description: 审核入库资料
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -23,8 +23,8 @@ import { normalizeFiledata } from '@/utils';
import
VerifyComingDataDrawer
,
{
ValueType
as
VerifyData
}
from
'./components/VerifyComingDataDrawer'
;
import
ChangeComingDataDrawer
,
{
ValueType
as
ComingData
,
RefHandle
}
from
'./components/ChangeComingDataDrawer'
;
import
UploadQualificationsDrawer
,
{
SubmitValueType
as
QualificationData
}
from
'./components/UploadQualificationsDrawer'
;
import
fetchDetailHoc
from
'../common/hoc/fetchDetailHoc'
;
import
MemberProfile
,
{
AreaCodeType
}
from
'../components/MemberProfile'
;
import
fetchDetailHoc
,
{
ResponseType
}
from
'../common/hoc/fetchDetailHoc'
;
import
MemberProfile
,
{
AreaCodeType
,
DetailType
}
from
'../components/MemberProfile'
;
const
MemberPrVerifyComingDataVerify
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
validateId
}
=
usePageStatus
();
...
...
@@ -105,10 +105,29 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
});
};
const
fetchDetail
=
():
Promise
<
ResponseType
<
DetailType
>>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberDepositVerifyDetail
({
validateId
,
}).
then
((
res
)
=>
{
const
newUpperMembers
=
res
.
data
?.
upperMembers
;
// 手动添加一个选项
if
(
newUpperMembers
.
findIndex
((
item
)
=>
item
.
upperRelationId
===
0
)
===
-
1
)
{
newUpperMembers
.
unshift
({
upperRelationId
:
0
,
name
:
'无'
,
});
}
resolve
(
res
);
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
const
MemberProfilePro
=
fetchDetailHoc
({
fetchDetail
:
()
=>
PublicApi
.
getMemberDepositVerifyDetail
({
validateId
,
}),
fetchDetail
:
fetchDetail
,
fetchCallback
:
(
info
)
=>
{
// 要手动将旧数据带过去
const
depositDetails
=
{};
...
...
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