diff --git a/client/src/components/Avatar/index.tsx b/client/src/components/Avatar/index.tsx index ab45d8c0c..27f7e271e 100644 --- a/client/src/components/Avatar/index.tsx +++ b/client/src/components/Avatar/index.tsx @@ -9,7 +9,7 @@ const Avatar = ({ w = '30px', ...props }: ImageProps) => { fallbackSrc={LOGO_ICON} fallbackStrategy={'onError'} borderRadius={'50%'} - objectFit={'cover'} + objectFit={'contain'} alt="" w={w} h={w} diff --git a/client/src/components/Layout/index.tsx b/client/src/components/Layout/index.tsx index c6103cdb9..3f3c1e11d 100644 --- a/client/src/components/Layout/index.tsx +++ b/client/src/components/Layout/index.tsx @@ -86,7 +86,7 @@ const Layout = ({ children }: { children: JSX.Element }) => { {children} ) : ( - + {children} diff --git a/client/src/components/PageContainer/index.tsx b/client/src/components/PageContainer/index.tsx index 8959e0516..2dac29221 100644 --- a/client/src/components/PageContainer/index.tsx +++ b/client/src/components/PageContainer/index.tsx @@ -6,12 +6,11 @@ const PageContainer = ({ children, ...props }: BoxProps) => { return ( {children} diff --git a/client/src/pages/api/user/getBill.ts b/client/src/pages/api/user/getBill.ts index d870ddf45..fbdfed323 100644 --- a/client/src/pages/api/user/getBill.ts +++ b/client/src/pages/api/user/getBill.ts @@ -27,8 +27,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) const where = { userId, time: { - $gte: new Date(dateStart).setHours(0, 0, 0, 0), - $lte: new Date(dateEnd).setHours(23, 59, 59, 999) + $gte: dateStart, + $lte: dateEnd } }; diff --git a/client/src/pages/app/detail/components/API.tsx b/client/src/pages/app/detail/components/API.tsx index fba9c3c08..0bc0d161f 100644 --- a/client/src/pages/app/detail/components/API.tsx +++ b/client/src/pages/app/detail/components/API.tsx @@ -3,6 +3,7 @@ import { Box, Divider, Flex, useTheme, Button, Skeleton, useDisclosure } from '@ import { useCopyData } from '@/utils/tools'; import dynamic from 'next/dynamic'; import MyIcon from '@/components/Icon'; +import { useGlobalStore } from '@/store/global'; const APIKeyModal = dynamic(() => import('@/components/APIKeyModal'), { ssr: false @@ -19,13 +20,15 @@ const API = ({ appId }: { appId: string }) => { } = useDisclosure(); const [isLoaded, setIsLoaded] = useState(false); + const { isPc } = useGlobalStore(); + useEffect(() => { setBaseUrl(`${location.origin}/api/openapi`); }, []); return ( - + AppId: { {appId} - copyData(baseUrl, '已复制 API 地址')} - > - - API服务器 - - - {baseUrl} - - - - + {isPc && ( + <> + copyData(baseUrl, '已复制 API 地址')} + > + + API服务器 + + + {baseUrl} + + + + + )} + - +