feat: 本次提交更新内容如下

好友选择样式完成
This commit is contained in:
笔记本里的永平
2025-07-09 15:38:44 +08:00
parent dfc1637d6a
commit 9d374d991f
8 changed files with 1331 additions and 479 deletions

View File

@@ -2,25 +2,12 @@ import React from 'react';
import { useLocation } from 'react-router-dom';
import BottomNav from './BottomNav';
// 需要底部导航的页面路径
const NO_BOTTOM_NAV_PATHS = [
'/login',
'/register',
'/forgot-password',
'/reset-password',
'/devices',
'/devices/',
'/wechat-accounts',
'/wechat-accounts/',
'/scenarios/new',
'/scenarios/',
'/plans/',
'/workspace/auto-group/',
'/workspace/moments-sync/',
'/workspace/traffic-distribution/',
'/workspace/auto-like',
'/404',
'/500'
// 配置需要底部导航的页面路径(白名单)
const BOTTOM_NAV_CONFIG = [
'/', // 首页
'/scenarios', // 场景获客
'/workspace', // 工作台
'/profile', // 我的
];
interface LayoutWrapperProps {
@@ -31,16 +18,20 @@ export default function LayoutWrapper({ children }: LayoutWrapperProps) {
const location = useLocation();
// 检查当前路径是否需要底部导航
const shouldShowBottomNav = !NO_BOTTOM_NAV_PATHS.some(path =>
location.pathname.startsWith(path)
);
const shouldShowBottomNav = BOTTOM_NAV_CONFIG.some(path => {
// 特殊处理首页路由 '/'
if (path === '/') {
return location.pathname === '/';
}
return location.pathname === path;
});
// 如果是登录页面,直接渲染内容(不显示底部导航)
if (location.pathname === '/login') {
return <>{children}</>;
}
// 其他页面显示底部导航
// 只有在配置列表中的页面显示底部导航
return (
<div className="flex flex-col h-screen">
<div className="flex-1 overflow-y-auto">