This commit is contained in:
archer
2023-07-18 16:26:57 +08:00
parent 2330186a09
commit a993eba7f0
13 changed files with 45 additions and 42 deletions

View File

@@ -8,7 +8,7 @@ import type { ResLogin } from '@/api/response/user';
import { useToast } from '@/hooks/useToast';
import { useRouter } from 'next/router';
import { postCreateApp } from '@/api/app';
import { chatAppDemo } from '@/constants/app';
import { appTemplates } from '@/constants/flow/ModuleTemplate';
interface Props {
loginSuccess: (e: ResLogin) => void;
@@ -65,9 +65,12 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
status: 'success'
});
// aut register a model
postCreateApp({
name: '应用1',
modules: chatAppDemo.modules
appTemplates.forEach((template) => {
postCreateApp({
avatar: template.avatar,
name: template.name,
modules: template.modules
});
});
} catch (error: any) {
toast({