feat: 前后台静态资源路径冲突修复 + 用户管理功能

- 修改 admin/vite.config.js 添加 base: '/admin/' 解决静态资源路径问题
- 修复后台 index.html 资源引用从 /assets/ → /admin/assets/
- 更新优化器默认 API 地址为服务器地址
- 添加友链管理相关代码
- 修复多处分类管理页面
This commit is contained in:
bwstudio
2026-06-10 07:30:49 +08:00
parent aecf1f1f15
commit 595394fcb7
22 changed files with 740 additions and 100 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, String, Text, DateTime, ForeignKey
from sqlalchemy import Column, Integer, String, Text, DateTime, Float, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.sql import func
@@ -12,7 +12,12 @@ class Joke(Base):
id = Column(Integer, primary_key=True, autoincrement=True)
title = Column(String(200), nullable=False)
content = Column(Text, nullable=False)
# AI 润色后的内容
polished_content = Column(Text, nullable=True)
# AI 评分 (1-10)
ai_score = Column(Float, nullable=True)
# AI 质量等级: excellent/good/ordinary/poor
ai_level = Column(String(20), nullable=True)
type_ids = Column(Text, nullable=True)
crowd_ids = Column(Text, nullable=True)
type_id = Column(Integer, ForeignKey("joke_types.id"), nullable=True)
+2
View File
@@ -11,4 +11,6 @@ class Link(Base):
url = Column(String(500), nullable=False)
description = Column(String(200), nullable=True)
sort_order = Column(Integer, default=0)
status = Column(String(20), default="approved") # approved=已通过, pending=待审核
contact = Column(String(100), nullable=True) # 申请联系方式
created_at = Column(DateTime, default=func.now())