diff --git a/client/src/api/app.ts b/client/src/api/app.ts index 0822b3ae6..284769378 100644 --- a/client/src/api/app.ts +++ b/client/src/api/app.ts @@ -1,8 +1,9 @@ import { GET, POST, DELETE, PUT } from './request'; import type { AppSchema } from '@/types/mongoSchema'; -import type { AppUpdateParams } from '@/types/app'; +import type { AppModuleItemType, AppUpdateParams } from '@/types/app'; import { RequestPaging } from '../types/index'; import type { AppListResponse } from './response/app'; +import type { Props as CreateAppProps } from '@/pages/api/app/create'; /** * 获取模型列表 @@ -12,7 +13,7 @@ export const getMyModels = () => GET('/app/list'); /** * 创建一个模型 */ -export const postCreateModel = (data: { name: string }) => POST('/app/create', data); +export const postCreateApp = (data: CreateAppProps) => POST('/app/create', data); /** * 根据 ID 删除模型 diff --git a/client/src/components/Layout/navbarPhone.tsx b/client/src/components/Layout/navbarPhone.tsx index c6fe40194..33b3c2076 100644 --- a/client/src/components/Layout/navbarPhone.tsx +++ b/client/src/components/Layout/navbarPhone.tsx @@ -20,8 +20,8 @@ const NavbarPhone = ({ unread }: { unread: number }) => { { label: '应用', icon: 'tabbarModel', - link: `/model`, - activeLink: ['/model'], + link: `/app/list`, + activeLink: ['/app/list'], unread: 0 }, { diff --git a/client/src/components/PageContainer/index.tsx b/client/src/components/PageContainer/index.tsx new file mode 100644 index 000000000..0745de257 --- /dev/null +++ b/client/src/components/PageContainer/index.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { Box, useTheme, type BoxProps } from '@chakra-ui/react'; + +const PageContainer = ({ children, ...props }: BoxProps) => { + const theme = useTheme(); + return ( + + + {children} + + + ); +}; + +export default PageContainer; diff --git a/client/src/components/SlideTabs/index.tsx b/client/src/components/SlideTabs/index.tsx index 21a36cdcc..046afa8a7 100644 --- a/client/src/components/SlideTabs/index.tsx +++ b/client/src/components/SlideTabs/index.tsx @@ -42,20 +42,19 @@ const SlideTabs = ({ list, size = 'md', activeId, onChange, ...props }: Props) = px={3} mb={2} alignItems={'center'} - _hover={{ - bg: 'myWhite.600' - }} {...(activeId === item.id ? { - // backgroundImage: 'linear-gradient(to right, #85b1ff 0%, #EBF7FD 100%)', - bg: ' myBlue.300', + bg: ' myBlue.300 !important', fontWeight: 'bold', - color: 'myBlue.700', + color: 'myBlue.700 ', cursor: 'default' } : { cursor: 'pointer' })} + _hover={{ + bg: 'myWhite.600' + }} onClick={() => { if (activeId === item.id) return; onChange(item.id); diff --git a/client/src/pages/404.tsx b/client/src/pages/404.tsx index e6db7d280..f85507355 100644 --- a/client/src/pages/404.tsx +++ b/client/src/pages/404.tsx @@ -4,7 +4,7 @@ import { useRouter } from 'next/router'; const NonePage = () => { const router = useRouter(); useEffect(() => { - router.push('/model'); + router.push('/app/list'); }, [router]); return
; diff --git a/client/src/pages/_app.tsx b/client/src/pages/_app.tsx index 4cfa561bd..5f58580e9 100644 --- a/client/src/pages/_app.tsx +++ b/client/src/pages/_app.tsx @@ -50,10 +50,10 @@ function App({ Component, pageProps }: AppProps) { - - - - {baiduTongji && } + + + + {baiduTongji && } {googleVerKey && ( <>