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
77752f72
Commit
77752f72
authored
Mar 18, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 注册页面开启saas多租户是只有一个会员类型时自动跳转下一步实现
parent
dea09c15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
register.tsx
src/pages/user/register.tsx
+22
-1
No files found.
src/pages/user/register.tsx
View file @
77752f72
...
@@ -116,14 +116,33 @@ const UserRegistry = () => {
...
@@ -116,14 +116,33 @@ const UserRegistry = () => {
label
:
item
.
memberTypeName
label
:
item
.
memberTypeName
}
}
});
});
});
});
if
(
res
.
data
.
length
===
1
)
{
const
dataItem
=
res
.
data
[
0
]
actions
.
setFieldValue
(
'typeId'
,
dataItem
.
memberTypeId
)
if
(
dataItem
.
businessTypes
&&
dataItem
.
businessTypes
.
length
>
0
)
{
actions
.
setFieldState
(
'businessTypeId'
,
state
=>
{
state
.
props
.
enum
=
dataItem
.
businessTypes
.
map
(
v
=>
({
label
:
v
.
businessTypeName
,
value
:
v
.
businessTypeId
}))
})
if
(
dataItem
.
businessTypes
.
length
===
1
)
{
const
businessTypeItem
=
dataItem
.
businessTypes
[
0
]
actions
.
setFieldValue
(
'businessTypeId'
,
businessTypeItem
.
businessTypeId
)
nextStepAction
()
}
}
}
useType
.
current
=
res
.
data
as
unknown
as
UseTypeItem
[]
useType
.
current
=
res
.
data
as
unknown
as
UseTypeItem
[]
// setUseType(res.data as unknown as UseTypeItem[])
// setUseType(res.data as unknown as UseTypeItem[])
}
}
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
redirect
)
{
if
(
redirect
&&
current
===
1
)
{
const
redirectUrl
=
decodeURIComponent
(
Base64
.
decode
(
redirect
))
const
redirectUrl
=
decodeURIComponent
(
Base64
.
decode
(
redirect
))
// 判断来源是自营商城时从链接获取自营商城的memberId
// 判断来源是自营商城时从链接获取自营商城的memberId
if
(
source
&&
source
===
'own'
)
{
if
(
source
&&
source
===
'own'
)
{
...
@@ -132,7 +151,9 @@ const UserRegistry = () => {
...
@@ -132,7 +151,9 @@ const UserRegistry = () => {
return
return
}
}
}
}
},
[
current
])
useEffect
(()
=>
{
useType
.
current
=
GlobalConfig
.
userRegister
.
useType
useType
.
current
=
GlobalConfig
.
userRegister
.
useType
// setUseType(GlobalConfig.userRegister.useType)
// setUseType(GlobalConfig.userRegister.useType)
fetchAgreement
()
fetchAgreement
()
...
...
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