feat: 导航收藏网站 v1.0
- 左侧边栏分类导航 - 紫蓝渐变背景 - 精致卡片设计 - 网站增删改查、收藏功能 - 搜索过滤 - 后端: Flask + MySQL - 前端: React + Vite
This commit is contained in:
+3
-3
@@ -140,15 +140,15 @@ def get_websites():
|
||||
|
||||
# 转换日期时间并添加分类信息
|
||||
for site in websites:
|
||||
if site.get('created_at'):
|
||||
if site.get('created_at') and hasattr(site['created_at'], 'isoformat'):
|
||||
site['created_at'] = site['created_at'].isoformat()
|
||||
if site.get('updated_at'):
|
||||
if site.get('updated_at') and hasattr(site['updated_at'], 'isoformat'):
|
||||
site['updated_at'] = site['updated_at'].isoformat()
|
||||
|
||||
cat_id = site.get('category_id')
|
||||
if cat_id and cat_id in categories:
|
||||
cat = categories[cat_id]
|
||||
if cat.get('created_at'):
|
||||
if cat.get('created_at') and hasattr(cat['created_at'], 'isoformat'):
|
||||
cat['created_at'] = cat['created_at'].isoformat()
|
||||
site['category'] = cat
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user