refactor(project): 全面清理项目代码并重命名项目
- 移除无用文件和空文件夹,清理 effects 和 scripts 目录 - 将项目从 ruixin-website-react 重命名为 novalon-website-react - 修复所有测试用例,确保 731 个测试全部通过 - 优化组件导入路径和测试 mock 设置 - 更新项目配置文件和依赖管理 关联任务:项目清理与重构
This commit is contained in:
@@ -262,31 +262,7 @@ describe('Animation Components', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('RippleButton', () => {
|
||||
it('should render children correctly', async () => {
|
||||
const { RippleButton } = await import('./animations');
|
||||
render(<RippleButton>Click Me</RippleButton>);
|
||||
expect(screen.getByText('Click Me')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should handle click events', async () => {
|
||||
const { RippleButton } = await import('./animations');
|
||||
const handleClick = jest.fn();
|
||||
render(<RippleButton onClick={handleClick}>Click Me</RippleButton>);
|
||||
|
||||
const button = screen.getByTestId('motion-button');
|
||||
fireEvent.click(button);
|
||||
|
||||
expect(handleClick).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should apply custom className', async () => {
|
||||
const { RippleButton } = await import('./animations');
|
||||
render(<RippleButton className="custom-button">Test</RippleButton>);
|
||||
const element = screen.getByTestId('motion-button');
|
||||
expect(element).toHaveClass('custom-button');
|
||||
});
|
||||
});
|
||||
|
||||
describe('InkCard', () => {
|
||||
it('should render children correctly', async () => {
|
||||
|
||||
@@ -238,63 +238,8 @@ export function StaggerItem({ children, className = '', ...props }: StaggerItemP
|
||||
);
|
||||
}
|
||||
|
||||
interface RippleButtonProps {
|
||||
children: ReactNode;
|
||||
onClick?: () => void;
|
||||
className?: string;
|
||||
rippleColor?: string;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
export function RippleButton({ children, onClick, className = '', rippleColor = 'rgba(196, 30, 58, 0.3)', href }: RippleButtonProps) {
|
||||
const [ripples, setRipples] = useState<Array<{ x: number; y: number; id: number }>>([]);
|
||||
|
||||
const handleClick = (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {
|
||||
const button = e.currentTarget;
|
||||
const rect = button.getBoundingClientRect();
|
||||
const x = e.clientX - rect.left;
|
||||
const y = e.clientY - rect.top;
|
||||
const id = Date.now();
|
||||
|
||||
setRipples((prev) => [...prev, { x, y, id }]);
|
||||
|
||||
setTimeout(() => {
|
||||
setRipples((prev) => prev.filter((r) => r.id !== id));
|
||||
}, 600);
|
||||
|
||||
onClick?.();
|
||||
};
|
||||
|
||||
const Component = href ? motion.a : motion.button;
|
||||
const linkProps = href ? { href } : {};
|
||||
|
||||
return (
|
||||
<Component
|
||||
onClick={handleClick}
|
||||
whileHover={{ scale: 1.02 }}
|
||||
whileTap={{ scale: 0.98 }}
|
||||
transition={{ type: 'spring', stiffness: 400, damping: 17 }}
|
||||
className={`relative overflow-hidden ${className}`}
|
||||
{...linkProps}
|
||||
>
|
||||
{children}
|
||||
{ripples.map((ripple) => (
|
||||
<motion.span
|
||||
key={ripple.id}
|
||||
initial={{ scale: 0, opacity: 1 }}
|
||||
animate={{ scale: 4, opacity: 0 }}
|
||||
transition={{ duration: 0.6, ease: 'easeOut' }}
|
||||
className="absolute w-4 h-4 rounded-full pointer-events-none"
|
||||
style={{
|
||||
left: ripple.x - 8,
|
||||
top: ripple.y - 8,
|
||||
backgroundColor: rippleColor,
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</Component>
|
||||
);
|
||||
}
|
||||
|
||||
interface InkCardProps {
|
||||
children: ReactNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ describe('Constants', () => {
|
||||
});
|
||||
|
||||
it('should have short name', () => {
|
||||
expect(COMPANY_INFO.shortName).toBe('睿新致远');
|
||||
expect(COMPANY_INFO.shortName).toBe('睿新致遠');
|
||||
});
|
||||
|
||||
it('should have slogan', () => {
|
||||
|
||||
@@ -173,4 +173,90 @@ export const PRODUCTS = [
|
||||
enterprise: '企业定制版',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'dss',
|
||||
title: '睿新供应链决策支持系统',
|
||||
description: '智能供应链管理平台,自动预测销量、优化库存、生成补货建议,帮助企业减少库存积压和缺货损失,让每一分钱都花在刀刃上。',
|
||||
image: '/images/products/dss.jpg',
|
||||
category: '数据产品',
|
||||
overview: '睿新供应链决策支持系统是一款专为快消品和零售企业打造的智能供应链管理平台。系统自动分析历史销售数据,准确预测未来销量,智能计算每个商品的最佳库存量,并在需要补货时主动提醒。企业无需配备专业数据分析团队,日常操作人员即可轻松上手,真正实现"让数据替人思考,让系统帮人决策"。',
|
||||
features: [
|
||||
'智能销量预测:自动分析历史销售趋势、季节规律和促销影响,告诉您下个月每个商品大概能卖多少',
|
||||
'库存健康诊断:自动识别哪些商品库存过多(积压资金)、哪些商品即将缺货(错失销售),一目了然',
|
||||
'精准补货建议:系统自动算好"什么时候补、补多少",按紧急程度排好优先级,确认即可执行',
|
||||
'原因追溯分析:预测不准时,系统会告诉您"为什么"——是促销拉高了销量,还是淡季导致下滑',
|
||||
'效果看板:实时展示库存周转率、缺货率、节省金额等关键指标,让管理效果看得见、算得清',
|
||||
'快速接入:只需导出现有Excel销售数据上传,3天内即可开始使用,无需更换现有系统',
|
||||
],
|
||||
benefits: [
|
||||
'库存成本平均降低10%以上,缺货率降低15%以上,直接转化为真金白银的利润',
|
||||
'无需专业数据团队,采购员、库管员等日常操作人员即可独立使用',
|
||||
'简单三步完成核心操作,系统全程引导,零基础也能快速上手',
|
||||
'投入产出清晰可算,仪表盘实时展示节省了多少钱、挽回了多少销售',
|
||||
],
|
||||
process: [
|
||||
'业务调研:了解您当前库存管理的痛点和期望达成的目标',
|
||||
'数据对接:协助您整理历史销售和库存数据,导入系统',
|
||||
'方案定制:根据您的业务特点,配置预测周期、库存策略和预警规则',
|
||||
'系统上线:开通账号,完成初始化配置,您的团队即可开始使用',
|
||||
'效果验证:用历史数据验证预测准确度,确保系统建议可靠',
|
||||
'持续优化:定期回顾使用效果,根据业务变化调整优化策略',
|
||||
],
|
||||
specs: [
|
||||
'支持云端在线使用,也支持部署在企业内部服务器',
|
||||
'兼容主流ERP系统(SAP、用友、金蝶)和仓库管理系统',
|
||||
'支持国产操作系统和数据库环境,满足信创要求',
|
||||
'数据加密传输和存储,符合国家数据安全法规要求',
|
||||
'支持手机端查看预警和审批补货,随时随地掌握库存动态',
|
||||
'提供专属客户成功经理,全程陪伴式服务',
|
||||
],
|
||||
pricing: {
|
||||
base: '标准版',
|
||||
standard: '专业版',
|
||||
enterprise: '企业定制版',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'oa',
|
||||
title: '睿新协同办公系统',
|
||||
description: '一站式企业协同办公平台,集成流程审批、公文管理、智能协作、知识中心等功能,助力企业实现办公数字化、协作高效化。',
|
||||
image: '/images/products/oa.jpg',
|
||||
category: '企业软件',
|
||||
overview: '睿新协同办公系统是一款综合型企业协同办公平台,融合传统办公自动化与现代协作理念。系统集成了流程审批、公文管理、即时通讯、知识管理、会议日程等核心模块,支持PC端与移动端全场景覆盖,帮助企业实现办公数字化、流程规范化、协作高效化。',
|
||||
features: [
|
||||
'流程审批:请假、报销、采购、合同等全流程电子化审批,支持自定义审批流程和条件分支',
|
||||
'公文管理:收文登记、发文审批、公文流转、归档管理,满足政务合规和档案管理要求',
|
||||
'智能协作:支持与钉钉、企业微信、飞书等主流平台深度整合,实现统一消息推送与协作',
|
||||
'知识中心:企业知识库、文档管理、知识检索、权限管控,沉淀组织智慧资产',
|
||||
'会议日程:会议室预约、会议通知、纪要管理、个人与团队日程同步',
|
||||
'移动办公:全功能移动端,支持APP、微信企业号、钉钉等多端接入,随时随地处理工作',
|
||||
],
|
||||
benefits: [
|
||||
'流程审批效率提升70%,告别纸质流转,降低管理成本',
|
||||
'知识资产沉淀共享,避免"人走知识丢",提升组织学习能力',
|
||||
'移动办公全覆盖,决策不等待,响应更及时',
|
||||
'一站式办公平台,减少系统切换成本,提升工作效率',
|
||||
],
|
||||
process: [
|
||||
'需求调研:了解企业组织架构、审批流程和办公协作需求',
|
||||
'环境评估:评估IT基础设施与安全合规要求',
|
||||
'方案设计:制定部署方案、流程配置与集成策略',
|
||||
'系统部署:私有化部署与组织架构初始化',
|
||||
'流程配置:配置审批流程、公文模板、权限体系',
|
||||
'培训交付:全员培训与系统正式上线',
|
||||
],
|
||||
specs: [
|
||||
'支持本地服务器、私有云、混合云部署',
|
||||
'支持多组织、多层级组织架构管理',
|
||||
'支持信创环境(国产操作系统/数据库/中间件)',
|
||||
'支持API接口集成,对接ERP/CRM等业务系统',
|
||||
'支持移动端APP、微信企业号、钉钉等多端接入',
|
||||
'支持数据加密、访问审计、安全水印等安全特性',
|
||||
],
|
||||
pricing: {
|
||||
base: '标准版',
|
||||
standard: '专业版',
|
||||
enterprise: '企业定制版',
|
||||
},
|
||||
},
|
||||
] as const;
|
||||
|
||||
Reference in New Issue
Block a user