mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 05:19:51 +00:00
fix: register
This commit is contained in:
@@ -35,9 +35,9 @@ function App({ Component, pageProps, isPc }: AppProps & { isPc?: boolean; respon
|
||||
const [baiduTongji, setBaiduTongji] = useState<string>();
|
||||
const { initIsPc } = useGlobalStore();
|
||||
|
||||
if (isPc !== undefined) {
|
||||
initIsPc(isPc);
|
||||
}
|
||||
// if (isPc !== undefined) {
|
||||
// initIsPc(isPc);
|
||||
// }
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
|
@@ -64,16 +64,17 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
window.onbeforeunload =
|
||||
const listen =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? (e) => {
|
||||
? (e: any) => {
|
||||
e.preventDefault();
|
||||
e.returnValue = '内容已修改,确认离开页面吗?';
|
||||
}
|
||||
: null;
|
||||
: () => {};
|
||||
window.addEventListener('beforeunload', listen);
|
||||
|
||||
return () => {
|
||||
window.onbeforeunload = null;
|
||||
window.removeEventListener('beforeunload', listen);
|
||||
clearAppModules();
|
||||
};
|
||||
}, []);
|
||||
|
@@ -6,6 +6,7 @@ import { postFindPassword } from '@/api/user';
|
||||
import { useSendCode } from '@/hooks/useSendCode';
|
||||
import type { ResLogin } from '@/api/response/user';
|
||||
import { useToast } from '@/hooks/useToast';
|
||||
import { feConfigs } from '@/store/static';
|
||||
|
||||
interface Props {
|
||||
setPageType: Dispatch<`${PageTypeEnum}`>;
|
||||
|
@@ -9,6 +9,7 @@ import { useToast } from '@/hooks/useToast';
|
||||
import { useRouter } from 'next/router';
|
||||
import { postCreateApp } from '@/api/app';
|
||||
import { appTemplates } from '@/constants/flow/ModuleTemplate';
|
||||
import { feConfigs } from '@/store/static';
|
||||
|
||||
interface Props {
|
||||
loginSuccess: (e: ResLogin) => void;
|
||||
|
Reference in New Issue
Block a user