Skip to content

Commit

Permalink
fix(tenant): 加入租户信息选择修改
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaojingjing committed Jan 8, 2024
1 parent 74df67e commit 60cce39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ export const JoinTenantView: React.FC<JoinTenantProps> = ({ onBack }) => {
const [sent, setSent] = useState(false)
const [enterpriseEmail, setEnterpriseEmail] = useState('')

const handelJoinTenant = async (tenantId: string, passCode?: string) => {
const handelJoinTenant = async (tenantInfo: any, passCode?: string) => {
try {
const { isFlowEnd, data, onGuardHandling } = await authFlow(
TenantBusinessAction.JoinTenant,
{
tenantId,
tenantId: tenantInfo.tenantId,
email: enterpriseEmail || undefined,
passCode
}
)
console.log('tenantInfo: ', tenantInfo)

events?.onTenantSelect?.(tenantInfo)
if (tenantInfo?.host) {
http.setBaseUrl(tenantInfo?.host)
Expand Down Expand Up @@ -93,7 +95,7 @@ export const JoinTenantView: React.FC<JoinTenantProps> = ({ onBack }) => {
setCurrStepKey(JoinTenantStepEnum.NoEnterpriseDomain)
}
} else {
await handelJoinTenant(data.tenantId)
await handelJoinTenant(data)
}
} else {
message.error(tips)
Expand Down Expand Up @@ -205,7 +207,7 @@ export const JoinTenantView: React.FC<JoinTenantProps> = ({ onBack }) => {
setSent={setSent}
onFinish={() => {
handelJoinTenant(
tenantInfo.tenantId,
tenantInfo,
form.getFieldValue('emailCode')?.join('')
)
}}
Expand Down
1 change: 1 addition & 0 deletions packages/guard-core-v4/src/TenantPortalSelect/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
bottom: -38px;
width: 100%;
left: 0;
z-index: 9999;
span {
cursor: pointer;
color: #215AE5;
Expand Down

0 comments on commit 60cce39

Please sign in to comment.