feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面

This commit is contained in:
zhanjunhao
2026-11-04 19:59:06 +08:00
parent 472e534fe1
commit e6c41e7587
576 changed files with 18075 additions and 18912 deletions
+16 -12
View File
@@ -17,9 +17,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { Layout } from '@douyinfe/semi-ui';
import { Layout } from '@/components/ui';
import App from '../../App';
import { ToastContainer } from 'react-toastify';
import React, {
useContext,
useEffect,
@@ -58,6 +57,7 @@ const CustomerServiceFloat = lazy(() => import('../customer-service'));
// 跑马灯公告组件
import Marquee from './Marquee';
import { useMarquee } from '../../hooks/common/useMarquee';
const { Sider, Content, Header } = Layout;
@@ -78,7 +78,7 @@ const printConsoleWelcome = (status) => {
const PageLayout = () => {
const [userState, userDispatch] = useContext(UserContext);
const [statusState, statusDispatch] = useContext(StatusContext);
const [, statusDispatch] = useContext(StatusContext);
const isMobile = useIsMobile();
const [drawerOpen, setDrawerOpen] = useState(false);
const { i18n } = useTranslation();
@@ -127,19 +127,17 @@ const PageLayout = () => {
const disableOuterScroll =
isExperienceCenter || isUserCenter || isHomePage || isOrgPage;
// 需要显示可见滚动条的页面(覆盖 semi-layout 默认隐藏滚动条的行为)。
// 需要显示可见滚动条的页面(覆盖 ant-layout 默认隐藏滚动条的行为)。
// 认证页也纳入:内容确实超出视口时(小屏/长表单)用主题色滚动条明示,而不是隐形滚动导致卡片"莫名移动"。
const isKeyManagement = location.pathname === '/key-management';
const isKeyManagement = location.pathname === '/user-center/key-management';
const showVisibleScrollbar = isKeyManagement || isAuthPage;
// 跑马灯公告是否存在(用于动态计算头部总高度)。
// 认证页(登录/注册/企业登录/企业注册)不展示:用户尚未进入平台,公告是面向平台内用户的信息。
const hasMarquee =
!hideHeader &&
!isAuthPage &&
!!statusState?.status?.marquee_content?.trim();
const marqueeHeight = hasMarquee ? 40 : 0; // h-10 = 40px
const headerBarHeight = isMobile ? 56 : 64; // h-14(56px) on mobile, h-16(64px) on desktop
const { visible: marqueeVisible } = useMarquee();
const hasMarquee = !hideHeader && !isAuthPage && marqueeVisible;
const marqueeHeight = hasMarquee ? 35 : 0;
const headerBarHeight = isMobile ? 56 : 72;
const totalHeaderHeight = headerBarHeight + marqueeHeight;
// 滚动容器引用
@@ -344,6 +342,13 @@ const PageLayout = () => {
>
{!hideHeader && (
<Header
className={
isAuthPage
? ['/org/login', '/login'].includes(location.pathname)
? 'login-layout-header'
: 'auth-layout-header'
: undefined
}
style={{
padding: 0,
height: 'auto',
@@ -460,7 +465,6 @@ const PageLayout = () => {
</Content>
</Layout>
</Layout>
<ToastContainer />
<Suspense fallback={null}>
<CustomerServiceFloat />
</Suspense>