diff --git a/config/routes.ts b/config/routes.ts index 2bb206c..ed7e6fc 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -102,7 +102,7 @@ export default [ }, { path: '/', - redirect: './account/center', + redirect: '/account', }, /* { path: '/', diff --git a/src/pages/story/components/OperationModal.tsx b/src/pages/story/components/OperationModal.tsx index ca5c57a..709b675 100644 --- a/src/pages/story/components/OperationModal.tsx +++ b/src/pages/story/components/OperationModal.tsx @@ -1,5 +1,6 @@ import { ModalForm, + ProFormDatePicker, ProFormDateTimePicker, ProFormSelect, ProFormText, @@ -11,6 +12,7 @@ import ImgCrop from 'antd-img-crop'; import type { StoryType } from '../data.d'; import useStyles from '../style.style'; import { defaultIcons } from '@/commonConstant/commonConstant'; +import dayjs from 'dayjs'; type OperationModalProps = { done: boolean; @@ -78,7 +80,7 @@ const OperationModal: FC = (props) => { message.error('获取 Canvas 绘图上下文失败'); return; } - + }; img.onerror = () => { message.error('图像加载失败'); @@ -290,8 +292,8 @@ const OperationModal: FC = (props) => { )} {/* 其他表单项 */} - = (props) => { style: { width: '100%', }, + maxDate: dayjs().endOf('day'), }} placeholder="请选择" /> diff --git a/src/pages/story/style.style.ts b/src/pages/story/style.style.ts index 4031f77..e0a7c03 100644 --- a/src/pages/story/style.style.ts +++ b/src/pages/story/style.style.ts @@ -55,12 +55,23 @@ const useStyles = createStyles(({ token }) => { [`@media screen and (max-width: ${token.screenXS}px)`]: { marginLeft: '0', '& > div': { + display: 'block', + marginBottom: '8px', + marginLeft: '0', + }, + }, + [`@media screen and (max-width: ${token.screenSM}px)`]: { + '& > div': { + display: 'block', + marginBottom: '8px', marginLeft: '0', }, }, [`@media screen and (max-width: ${token.screenMD}px)`]: { '& > div': { display: 'block', + marginBottom: '8px', + marginLeft: '0', }, '& > div:last-child': { top: '0', @@ -70,6 +81,8 @@ const useStyles = createStyles(({ token }) => { [`@media screen and (max-width: ${token.screenLG}px) and (min-width: @screen-md)`]: { '& > div': { display: 'block', + marginBottom: '8px', + marginLeft: '0', }, '& > div:last-child': { top: '0', @@ -99,6 +112,12 @@ const useStyles = createStyles(({ token }) => { verticalAlign: 'middle', '> span': { lineHeight: '20px' }, '> p': { marginTop: '4px', marginBottom: '0', lineHeight: '22px' }, + [`@media screen and (max-width: ${token.screenXS}px)`]: { + display: 'block', + marginBottom: '8px', + marginLeft: '0', + width: '100%', + }, }, extraContentSearch: { width: '272px', diff --git a/src/pages/user/login/index.tsx b/src/pages/user/login/index.tsx index b3685c6..e2c4a6a 100644 --- a/src/pages/user/login/index.tsx +++ b/src/pages/user/login/index.tsx @@ -121,7 +121,7 @@ const Login: React.FC = () => { // await fetchUserInfo(); localStorage.setItem('timeline_user', JSON.stringify(response.data)) const urlParams = new URL(window.location.href).searchParams; - window.location.href = urlParams.get('redirect') || '/'; + window.location.href = urlParams.get('redirect')?.split('?redirect=')[1] || '/'; return; } console.log(response.message);