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
8928b3d7
Commit
8928b3d7
authored
Aug 11, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
静态渲染改为动态渲染注册页
parent
876024c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
18 deletions
+21
-18
index.js
scripts/services/index.js
+0
-4
register.tsx
src/pages/user/register.tsx
+21
-14
index.ts
src/services/index.ts
+0
-0
No files found.
scripts/services/index.js
View file @
8928b3d7
...
...
@@ -22,10 +22,6 @@ const serviceConfig = {
useType
:
{
url
:
'/member/menu/register/type'
,
method
:
'get'
},
useDetail
:
{
url
:
'/member/menu/register/detail'
,
method
:
'get'
}
}
}
...
...
src/pages/user/register.tsx
View file @
8928b3d7
...
...
@@ -87,11 +87,7 @@ let timeChange: any; // 定时器
const
actions
=
createFormActions
()
const
UserRegistry
=
()
=>
{
const
[
identityForm1
]
=
Form
.
useForm
();
const
[
licenseForm
]
=
Form
.
useForm
();
const
[
current
,
setCurrent
]
=
useState
(
0
)
const
[
identityFormData
,
setIdentityFormData
]
=
useState
<
IFormControllers
[]
>
([])
const
[
licenseFormData
,
setLicenseFormData
]
=
useState
<
IFormControllers
[]
>
([])
const
stepList
=
[
{
title
:
'填写信息'
,
key
:
'message'
,
name
:
'message'
},
{
title
:
'完善资料'
,
key
:
'over'
,
name
:
'over'
},
...
...
@@ -99,6 +95,8 @@ const UserRegistry = () => {
{
title
:
'注册成功'
,
key
:
'success'
,
name
:
'success'
},
]
const
[
registerDetail
,
setRegisterDetail
]
=
useState
<
any
>
([])
const
handleJumpLogin
=
()
=>
{
history
.
push
(
'/user/login'
)
}
...
...
@@ -177,8 +175,6 @@ const UserRegistry = () => {
label
:
v
.
typeName
}
})
console
.
log
(
mapMemberType
)
const
mapServerType
=
GlobalConfig
.
userRegister
.
useType
.
businessType
.
map
(
v
=>
{
return
{
value
:
v
.
id
,
...
...
@@ -186,6 +182,23 @@ const UserRegistry = () => {
}
})
const
nextStepAction
=
()
=>
{
actions
.
submit
().
then
(
data
=>
{
const
{
values
}
=
data
formCache
=
values
const
{
businessTypeId
,
typeId
}
=
values
PublicApi
.
getMemberMenuRegisterDetail
({
businessTypeId
,
memberTypeId
:
typeId
}).
then
(
res
=>
{
const
{
data
}
=
res
// 动态渲染第三步
setRegisterDetail
(
data
)
setCurrent
(
current
+
1
)
})
})
}
// @todo 注册成功后 交互功能未完成
const
submitForm
=
()
=>
{
actions
.
submit
().
then
(
data
=>
{
...
...
@@ -253,7 +266,7 @@ const UserRegistry = () => {
{
/* 注册主体类型, 为多输入框 */
}
<
Field
name=
'detail'
type=
'object'
>
{
GlobalConfig
.
userRegister
.
use
Detail
.
map
(
v
=>
{
register
Detail
.
map
(
v
=>
{
return
(
<
FormBlock
className=
{
styles
[
'mr_t-40'
]
}
visible=
{
current
===
2
}
key=
{
v
.
groupName
}
title=
{
<
span
className=
{
styles
.
commonPanelTitle
}
>
{
v
.
groupName
}
</
span
>
}
>
<
FormMegaLayout
columns=
{
2
}
grid
autoRow
size=
'large'
className=
{
styles
[
'mr_t-24'
]
}
>
...
...
@@ -308,13 +321,7 @@ const UserRegistry = () => {
}
{
current
===
1
&&
<
Button
type=
'primary'
className=
{
styles
.
continueButton
}
onClick=
{
()
=>
{
actions
.
submit
().
then
(
data
=>
{
const
{
values
}
=
data
formCache
=
values
setCurrent
(
current
+
1
)
})
}
}
>
下一步:继续完善
</
Button
>
<
Button
type=
'primary'
className=
{
styles
.
continueButton
}
onClick=
{
nextStepAction
}
>
下一步:继续完善
</
Button
>
}
{
current
===
2
&&
...
...
src/services/index.ts
View file @
8928b3d7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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