Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
5ba07c91
authored
May 28, 2026
by
Archer
Committed by
GitHub
May 28, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc (#7013)
parent
fad680a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
29 deletions
+23
-29
projects/app/src/pageComponents/login/index.tsx
+17
-29
projects/app/src/service/common/system/index.ts
+6
-0
No files found.
projects/app/src/pageComponents/login/index.tsx
View file @
5ba07c91
...
...
@@ -3,7 +3,6 @@ import { Box, Flex } from '@chakra-ui/react';
import
{
LoginPageTypeEnum
}
from
'@/web/support/user/login/constants'
;
import
{
useSystemStore
}
from
'@/web/common/system/useSystemStore'
;
import
{
useChatStore
}
from
'@/web/core/chat/context/useChatStore'
;
import
dynamic
from
'next/dynamic'
;
import
Script
from
'next/script'
;
import
{
useTranslation
}
from
'next-i18next'
;
import
ChineseRedirectModal
from
'./components/ChineseRedirectModal'
;
...
...
@@ -15,8 +14,6 @@ import { useSystem } from '@fastgpt/web/hooks/useSystem';
type
LoginSuccessHandler
=
(
res
:
LoginSuccessResponseType
)
=>
void
|
Promise
<
void
>
;
const
CommunityModal
=
dynamic
(()
=>
import
(
'@/components/CommunityModal'
));
// login container component
export
const
LoginContainer
=
({
children
,
...
...
@@ -32,7 +29,6 @@ export const LoginContainer = ({
const
loginGuideDocUrl
=
feConfigs
?.
loginGuideDocUrl
?.
trim
();
const
[
pageType
,
setPageType
]
=
useState
<
`
${
LoginPageTypeEnum
}
`
>
(
LoginPageTypeEnum
.
passwordLogin
);
const
[
showCommunityModal
,
setShowCommunityModal
]
=
useState
(
false
);
// login success handler
const
loginSuccess
=
useCallback
(
...
...
@@ -77,8 +73,7 @@ export const LoginContainer = ({
setPageType=
{
setPageType
}
loginSuccess=
{
loginSuccess
}
reserveLoginGuideSpace=
{
pageType
===
LoginPageTypeEnum
.
passwordLogin
&&
!!
(
loginGuideDocUrl
||
feConfigs
?.
concatMd
)
pageType
===
LoginPageTypeEnum
.
passwordLogin
&&
!!
loginGuideDocUrl
}
/>
...
...
@@ -86,33 +81,26 @@ export const LoginContainer = ({
{
children
}
{
/* help link for login */
}
{
pageType
===
LoginPageTypeEnum
.
passwordLogin
&&
(
loginGuideDocUrl
||
feConfigs
?.
concatMd
)
&&
(
<
Box
mt=
{
[
8
,
8
]
}
color=
{
'primary.700'
}
fontSize=
{
'mini'
}
fontWeight=
{
'medium'
}
lineHeight=
{
'16px'
}
cursor=
{
'pointer'
}
textAlign=
{
'center'
}
onClick=
{
()
=>
{
if
(
loginGuideDocUrl
)
{
window
.
open
(
loginGuideDocUrl
,
'_blank'
,
'noopener,noreferrer'
);
}
else
{
setShowCommunityModal
(
true
);
}
}
}
>
{
t
(
'common:support.user.login.can_not_login'
)
}
</
Box
>
)
}
{
pageType
===
LoginPageTypeEnum
.
passwordLogin
&&
loginGuideDocUrl
&&
(
<
Box
mt=
{
[
8
,
8
]
}
color=
{
'primary.700'
}
fontSize=
{
'mini'
}
fontWeight=
{
'medium'
}
lineHeight=
{
'16px'
}
cursor=
{
'pointer'
}
textAlign=
{
'center'
}
onClick=
{
()
=>
{
window
.
open
(
loginGuideDocUrl
,
'_blank'
,
'noopener,noreferrer'
);
}
}
>
{
t
(
'common:support.user.login.can_not_login'
)
}
</
Box
>
)
}
</
Flex
>
<
CookieConsentModal
/>
<
ChineseRedirectModal
/>
{
showCommunityModal
&&
<
CommunityModal
onClose=
{
()
=>
setShowCommunityModal
(
false
)
}
/>
}
</>
);
};
...
...
projects/app/src/service/common/system/index.ts
View file @
5ba07c91
...
...
@@ -27,6 +27,8 @@ import { hasAIProxyApiEndpoint } from '@fastgpt/service/thirdProvider/aiproxy/co
import
{
appEnv
}
from
'@/env'
;
const
logger
=
getLogger
(
LogCategories
.
SYSTEM
);
const
defaultOpenSourceLoginGuideDocUrl
=
'https://doc.fastgpt.io/zh-CN/guide/version/cloud/faq#%E8%B4%A6%E5%8F%B7%E7%99%BB%E5%BD%95%E9%97%AE%E9%A2%98'
;
export
const
readConfigData
=
async
(
name
:
string
)
=>
{
const
splitName
=
name
.
split
(
'.'
);
...
...
@@ -175,6 +177,10 @@ export async function initSystemConfig() {
subPlans
:
fastgptConfig
.
subPlans
};
if
(
!
licenseData
)
{
config
.
feConfigs
.
loginGuideDocUrl
=
defaultOpenSourceLoginGuideDocUrl
;
}
// set config
initFastGPTConfig
(
config
);
...
...
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