perf: auth token

This commit is contained in:
archer
2023-04-29 15:59:53 +08:00
parent 78762498eb
commit ea100d84bf
35 changed files with 38 additions and 52 deletions

View File

@@ -8,6 +8,7 @@ import type { ResLogin } from '@/api/response/user';
import { useScreen } from '@/hooks/useScreen';
import { useToast } from '@/hooks/useToast';
import { useRouter } from 'next/router';
import { postCreateModel } from '@/api/model';
interface Props {
loginSuccess: (e: ResLogin) => void;
@@ -64,6 +65,10 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
title: `注册成功`,
status: 'success'
});
// aut register a model
postCreateModel({
name: '模型1'
});
} catch (error: any) {
toast({
title: error.message || '注册异常',