pref(announcement): 修改mock数据为静态数据

master
钟良源 4 months ago
parent 3d2a44f9fe
commit 3509d2d1dd

@ -13,14 +13,34 @@ function Announcement() {
const fetchData = () => { const fetchData = () => {
setLoading(true); setLoading(true);
axios setData([
.get('/api/workplace/announcement') {
.then((res) => { type: 'activity',
setData(res as any); key: '1',
}) content: '组件库新增10+个组件'
.finally(() => { },
setLoading(false); {
}); type: 'info',
key: '2',
content: '定时任务执行成功1次失败0次。'
},
{
type: 'notice',
key: '3',
content: '当前产品试用期即将结束,如需续费请点击查看。'
},
{
type: 'notice',
key: '4',
content: '1 月新系统升级计划通知'
},
{
type: 'info',
key: '5',
content: '新增内容已经通过审核,详情请点击查看。'
}
]);
setLoading(false);
}; };
useEffect(() => { useEffect(() => {

Loading…
Cancel
Save