feat: 修改代码结构

This commit is contained in:
2025-08-14 22:34:44 -07:00
parent f9de5fcb4f
commit 77e246198f
4 changed files with 22 additions and 4 deletions
@@ -247,6 +247,7 @@ export default function Content() {
{announcementData?.map((item) => {
return (
<div
key={item.id}
className={`${item.pinned ? 'bg-[#B5C9E2]' : 'bg-white'} flex items-center rounded-[20px] px-4 py-2`}
>
<p
@@ -54,7 +54,7 @@ const OfferDialog = forwardRef<OfferDialogRef>((props, ref) => {
<Dialog open={open} onOpenChange={setOpen}>
<DialogContent
ref={dialogRef}
className='rounded-0 h-full gap-0 px-4 py-8 sm:max-h-[95%] sm:!rounded-[32px] sm:px-8 sm:py-12 md:max-w-full'
className='rounded-0 h-full gap-0 px-4 py-8 sm:max-h-[95%] sm:!rounded-[32px] sm:px-8 sm:py-12 md:max-w-[1280px]'
>
<DialogTitle className={'sr-only'}></DialogTitle>
<div className={'ml-6 sm:ml-0'}>
+12 -1
View File
@@ -7,7 +7,18 @@ import { getAuthorization, Logout } from './common';
async function handleError(response: any) {
const code = response.data?.code;
if ([40002, 40003, 40004, 40005].includes(code)) return Logout();
console.log(1111111, code);
if ([40002, 40003, 40004, 40005].includes(code)) {
if (isBrowser()) {
const t = await getTranslations('common');
const message =
t(`request.${code}`) !== `request.${code}`
? t(`request.${code}`)
: response.data?.msg || response.message;
toast.error(message);
}
return Logout();
}
if (response?.config?.skipErrorHandler) return;
if (!isBrowser()) return;