Merge "修改前端推荐搜素样式,链接推荐搜索前后端"
diff --git a/API/API-TRM/WZY/xhs_front/README.md b/API/API-TRM/WZY/xhs_front/README.md
new file mode 100644
index 0000000..6f35930
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/README.md
@@ -0,0 +1,185 @@
+# 小红书内容创作平台
+
+这是一个基于 React + Vite 构建的小红书内容创作平台界面,完全复制了小红书官方创作服务平台的设计和功能。
+
+## 功能特性 ✨
+
+### 🎨 界面设计
+- **完全还原小红书官方设计**:精确复制了小红书创作服务平台的视觉风格
+- **响应式布局**:支持桌面端和移动端适配
+- **现代化UI**:使用 Lucide React 图标库,提供清晰美观的界面
+
+### 📤 上传功能
+- **双模式上传**:支持图片上传和视频上传两种模式
+- **拖拽上传**:支持文件拖拽到上传区域
+- **点击上传**:点击按钮选择文件上传
+- **文件验证**:
+  - 图片:支持 JPEG、JPG、PNG、WebP 格式,最大 32MB
+  - 视频:支持 MP4、MOV、AVI 格式,最大 2GB
+- **实时进度显示**:带有动画效果的上传进度条
+
+### 🖼️ 文件管理
+- **文件预览**:上传后实时显示文件缩略图
+- **文件信息**:显示文件名、大小等详细信息
+- **批量管理**:支持单个删除和批量清除
+- **文件计数**:实时显示已上传文件数量
+
+### 🎯 交互体验
+- **拖拽反馈**:拖拽时提供视觉反馈效果
+- **加载状态**:上传过程中的加载动画
+- **操作提示**:完成上传后的成功提示
+- **悬停效果**:按钮和文件项的悬停交互
+
+### 🗂️ 导航系统
+- **侧边栏导航**:完整的功能菜单
+- **可展开子菜单**:数据看板等功能的子选项
+- **活跃状态**:当前选中页面的高亮显示
+- **固定布局**:头部和侧边栏固定定位
+
+## 技术栈 🛠️
+
+- **前端框架**:React 19.1.0
+- **构建工具**:Vite 6.0.5
+- **图标库**:Lucide React 0.468.0
+- **样式**:纯 CSS(无预处理器)
+- **开发语言**:JavaScript + JSX
+
+## 安装运行 🚀
+
+1. **安装依赖**
+   ```bash
+   npm install
+   ```
+
+2. **启动开发服务器**
+   ```bash
+   npm run dev
+   ```
+
+3. **打开浏览器**
+   ```
+   http://localhost:5173
+   ```
+
+4. **构建生产版本**
+   ```bash
+   npm run build
+   ```
+
+## 项目结构 📁
+
+```
+发布页面/
+├── public/              # 静态资源
+│   └── vite.svg        # Vite 图标
+├── src/
+│   ├── App.jsx         # 主应用组件
+│   ├── App.css         # 主样式文件
+│   ├── index.css       # 全局样式
+│   └── main.jsx        # 应用入口
+├── index.html          # HTML 入口文件
+├── package.json        # 项目配置
+├── vite.config.js      # Vite 配置
+└── README.md          # 项目说明
+```
+
+## 核心功能实现 💡
+
+### 文件上传处理
+```javascript
+const handleFileUpload = () => {
+  const input = document.createElement('input')
+  input.type = 'file'
+  input.accept = activeTab === 'video' ? 'video/*' : 'image/*'
+  input.multiple = activeTab === 'image'
+  
+  input.onchange = (e) => {
+    const files = Array.from(e.target.files)
+    if (files.length > 0 && validateFiles(files)) {
+      simulateUpload(files)
+    }
+  }
+  
+  input.click()
+}
+```
+
+### 拖拽上传实现
+```javascript
+const handleDrop = (e) => {
+  e.preventDefault()
+  e.stopPropagation()
+  setIsDragOver(false)
+  
+  const files = Array.from(e.dataTransfer.files)
+  if (files.length > 0 && validateFiles(files)) {
+    simulateUpload(files)
+  }
+}
+```
+
+### 文件验证机制
+```javascript
+const validateFiles = (files) => {
+  const validImageTypes = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp']
+  const validVideoTypes = ['video/mp4', 'video/mov', 'video/avi']
+  
+  const validTypes = activeTab === 'video' ? validVideoTypes : validImageTypes
+  const maxSize = activeTab === 'video' ? 2 * 1024 * 1024 * 1024 : 32 * 1024 * 1024
+  
+  return files.every(file => 
+    validTypes.includes(file.type) && file.size <= maxSize
+  )
+}
+```
+
+## 样式特色 🎨
+
+### 响应式设计
+- 桌面端:固定侧边栏布局
+- 移动端:隐藏侧边栏,堆叠布局
+- 自适应文件网格:根据屏幕大小调整列数
+
+### 动画效果
+- 拖拽时的放大效果
+- 进度条的流光动画
+- 文件项的悬停过渡
+- 页面切换的淡入效果
+
+### 色彩方案
+- 主色调:#ff4757(小红书红)
+- 背景色:#f5f7fa(浅灰蓝)
+- 文字色:#333(深灰)
+- 边框色:#e8eaed(浅灰)
+
+## 待扩展功能 🔮
+
+- **后端集成**:连接真实的文件上传 API
+- **用户认证**:登录注册功能
+- **内容编辑**:笔记内容编辑器
+- **数据统计**:真实的数据看板功能
+- **社交功能**:评论、点赞等互动功能
+
+## 开发说明 📝
+
+这个项目完全基于前端实现,所有的上传功能都是模拟的。文件预览使用了 `URL.createObjectURL()` 来生成本地预览链接。在实际部署时,需要:
+
+1. 集成后端文件上传 API
+2. 实现用户认证系统
+3. 添加数据持久化
+4. 优化性能和安全性
+
+## 浏览器兼容性 🌐
+
+- Chrome 90+
+- Firefox 88+
+- Safari 14+
+- Edge 90+
+
+## 许可证 📄
+
+MIT License
+
+---
+
+**注意**:本项目仅用于学习和演示目的,请遵守相关法律法规和平台使用条款。
diff --git a/API/API-TRM/WZY/xhs_front/index.html b/API/API-TRM/WZY/xhs_front/index.html
new file mode 100644
index 0000000..b919940
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/index.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="zh-CN">
+  <head>
+    <meta charset="UTF-8" />
+    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>小红书创作服务平台</title>
+  </head>
+  <body>
+    <div id="root"></div>
+    <script type="module" src="/src/main.jsx"></script>
+  </body>
+</html>
diff --git a/API/API-TRM/WZY/xhs_front/package.json b/API/API-TRM/WZY/xhs_front/package.json
new file mode 100644
index 0000000..b1d8b25
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/package.json
@@ -0,0 +1,21 @@
+{
+  "name": "xiaohongshu-creator-platform",
+  "private": true,
+  "version": "0.0.0",
+  "type": "module",
+  "scripts": {
+    "dev": "vite",
+    "build": "vite build",
+    "preview": "vite preview"
+  },
+  "dependencies": {
+    "lucide-react": "^0.468.0",
+    "react": "^18.3.1",
+    "react-dom": "^18.3.1",
+    "react-router-dom": "^7.6.2"
+  },
+  "devDependencies": {
+    "@vitejs/plugin-react": "^4.3.4",
+    "vite": "^6.0.5"
+  }
+}
diff --git a/API/API-TRM/WZY/xhs_front/public/vite.svg b/API/API-TRM/WZY/xhs_front/public/vite.svg
new file mode 100644
index 0000000..ee9fada
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/public/vite.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
diff --git a/API/API-TRM/WZY/xhs_front/src/App.css b/API/API-TRM/WZY/xhs_front/src/App.css
new file mode 100644
index 0000000..8fdd8d7
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/App.css
@@ -0,0 +1,585 @@
+.app {
+  display: flex;
+  min-height: 100vh;
+  background-color: #f5f7fa;
+}
+
+/* Header */
+.header {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  height: 60px;
+  background: #fff;
+  border-bottom: 1px solid #e8eaed;
+  display: flex;
+  align-items: center;
+  padding: 0 20px;
+  z-index: 1000;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.header-left {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+}
+
+.logo {
+  background: #ff4757;
+  color: white;
+  padding: 6px 12px;
+  border-radius: 6px;
+  font-size: 14px;
+  font-weight: bold;
+}
+
+.header-title {
+  font-size: 18px;
+  font-weight: 500;
+  color: #333;
+}
+
+.header-right {
+  margin-left: auto;
+  display: flex;
+  align-items: center;
+  gap: 12px;
+}
+
+.user-info {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+  color: #666;
+  font-size: 14px;
+}
+
+/* Sidebar */
+.sidebar {
+  position: fixed;
+  left: 0;
+  top: 60px;
+  width: 200px;
+  height: calc(100vh - 60px);
+  background: #fff;
+  border-right: 1px solid #e8eaed;
+  overflow-y: auto;
+  z-index: 999;
+}
+
+.publish-btn {
+  margin: 16px;
+  background: #ff4757;
+  color: white;
+  padding: 10px 16px;
+  border-radius: 6px;
+  font-size: 14px;
+  font-weight: 500;
+  text-align: center;
+  transition: background 0.2s;
+}
+
+.publish-btn:hover {
+  background: #ff3742;
+}
+
+.nav-menu {
+  padding: 0;
+  list-style: none;
+}
+
+.nav-item {
+  border-bottom: 1px solid #f0f0f0;
+}
+
+.nav-link {
+  display: flex;
+  align-items: center;
+  padding: 12px 20px;
+  color: #333;
+  font-size: 14px;
+  transition: all 0.2s;
+  gap: 8px;
+}
+
+.nav-link:hover {
+  background: #f8f9fa;
+  color: #ff4757;
+}
+
+.nav-link.active {
+  background: linear-gradient(135deg, #ff4757, #ff6b7a);
+  color: white;
+  font-weight: 500;
+}
+
+.nav-link.active .lucide {
+  color: white;
+}
+
+.nav-submenu {
+  padding-left: 20px;
+  background: #fafafa;
+}
+
+.nav-submenu .nav-link {
+  padding: 8px 20px;
+  font-size: 13px;
+  color: #666;
+}
+
+.nav-submenu .nav-link:hover {
+  color: #ff4757;
+}
+
+/* Main Content */
+.main-content {
+  margin-left: 200px;
+  padding-top: 60px;
+  flex: 1;
+  min-height: 100vh;
+}
+
+.content-wrapper {
+  padding: 20px;
+  /* 原来是 max-width:1200px; */
+  max-width: none;      /* 或者直接注释掉这一行 */
+  width: auto;          /* 确保它能撑满父级 */
+  margin: 0;            /* 取消水平 auto 居中 */
+}
+
+/* Upload Area */
+.upload-tabs {
+  display: flex;
+  gap: 20px;
+  margin-bottom: 30px;
+  border-bottom: 1px solid #e8eaed;
+}
+
+.upload-tab {
+  padding: 12px 0;
+  font-size: 16px;
+  color: #666;
+  cursor: pointer;
+  border-bottom: 2px solid transparent;
+  transition: all 0.2s;
+}
+
+.upload-tab.active {
+  color: #ff4757;
+  border-bottom-color: #ff4757;
+  font-weight: 500;
+}
+
+.upload-area {
+  background: #fff;
+  border-radius: 8px;
+  padding: 80px 40px;
+  text-align: center;
+  border: 2px dashed #ddd;
+  margin-bottom: 40px;
+  transition: all 0.2s;
+  min-height: 300px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  position: relative;
+}
+
+.upload-area:hover {
+  border-color: #ff4757;
+  background: #fff8f8;
+}
+
+.upload-area.drag-over {
+  border-color: #ff4757;
+  background: #fff0f0;
+  transform: scale(1.02);
+}
+
+.upload-icon {
+  width: 100px;
+  height: 100px;
+  margin: 0 auto 30px;
+  background: #f8f9fa;
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 40px;
+  color: #ccc;
+  transition: all 0.3s ease;
+}
+
+.upload-area:hover .upload-icon {
+  background: #ff475710;
+  color: #ff4757;
+  transform: scale(1.1);
+}
+
+.upload-area.drag-over .upload-icon {
+  background: #ff475720;
+  color: #ff4757;
+  transform: scale(1.2);
+}
+
+.upload-title {
+  font-size: 20px;
+  color: #333;
+  margin-bottom: 12px;
+  font-weight: 500;
+}
+
+.upload-subtitle {
+  font-size: 14px;
+  color: #999;
+  margin-bottom: 30px;
+}
+
+.upload-btn {
+  background: #ff4757;
+  color: white;
+  padding: 14px 28px;
+  border-radius: 6px;
+  font-size: 16px;
+  font-weight: 500;
+  transition: background 0.2s;
+  min-width: 120px;
+}
+
+.upload-btn:hover:not(:disabled) {
+  background: #ff3742;
+}
+
+.upload-btn:disabled {
+  background: #ccc;
+  cursor: not-allowed;
+}
+
+.upload-btn.uploading {
+  background: #ff4757;
+  opacity: 0.8;
+}
+
+/* File Preview */
+.file-preview-area {
+  background: #fff;
+  border-radius: 8px;
+  padding: 20px;
+  margin-bottom: 40px;
+  border: 1px solid #e8eaed;
+}
+
+/* Preview Header */
+.preview-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 16px;
+}
+
+.preview-title {
+  font-size: 16px;
+  color: #333;
+  margin-bottom: 16px;
+  font-weight: 500;
+}
+
+.clear-files-btn {
+  background: #ff4757;
+  color: white;
+  padding: 6px 12px;
+  border-radius: 4px;
+  font-size: 12px;
+  transition: background 0.2s;
+}
+
+.clear-files-btn:hover {
+  background: #ff3742;
+}
+
+.file-grid {
+  display: grid;
+  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
+  gap: 16px;
+}
+
+.file-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 12px;
+  border: 1px solid #f0f0f0;
+  border-radius: 6px;
+  transition: all 0.2s ease;
+  position: relative;
+}
+
+.file-item:hover {
+  border-color: #ff4757;
+  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.1);
+}
+
+.file-item:hover .remove-file-btn {
+  opacity: 1;
+}
+
+.remove-file-btn {
+  position: absolute;
+  top: 4px;
+  right: 4px;
+  background: rgba(255, 71, 87, 0.8);
+  color: white;
+  border-radius: 50%;
+  width: 20px;
+  height: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 14px;
+  font-weight: bold;
+  opacity: 0;
+  transition: all 0.2s;
+}
+
+.file-thumbnail {
+  width: 80px;
+  height: 80px;
+  border-radius: 6px;
+  overflow: hidden;
+  margin-bottom: 8px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: #f8f9fa;
+}
+
+.file-thumbnail img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+.video-thumbnail {
+  color: #666;
+}
+
+.file-info {
+  text-align: center;
+  width: 100%;
+}
+
+.file-name {
+  font-size: 12px;
+  color: #333;
+  margin-bottom: 4px;
+  font-weight: 500;
+}
+
+.file-size {
+  font-size: 11px;
+  color: #999;
+}
+
+/* Upload Progress */
+.progress-container {
+  margin-top: 20px;
+  width: 100%;
+  max-width: 400px;
+}
+
+.progress-bar {
+  width: 100%;
+  height: 8px;
+  background-color: #f0f0f0;
+  border-radius: 4px;
+  overflow: hidden;
+  margin-bottom: 8px;
+}
+
+.progress-fill {
+  height: 100%;
+  background: linear-gradient(90deg, #ff4757, #ff6b7a);
+  border-radius: 4px;
+  transition: width 0.3s ease;
+  position: relative;
+}
+
+.progress-fill::after {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
+  animation: shimmer 1.5s infinite;
+}
+
+@keyframes shimmer {
+  0% { transform: translateX(-100%); }
+  100% { transform: translateX(100%); }
+}
+
+.progress-text {
+  text-align: center;
+  font-size: 12px;
+  color: #666;
+  font-weight: 500;
+}
+
+/* Upload Info */
+.upload-info {
+  display: flex;
+  gap: 60px;
+  justify-content: center;
+  margin-top: 40px;
+  padding: 20px;
+  opacity: 1;
+  transition: opacity 0.3s ease;
+}
+
+.upload-info.fade-in {
+  animation: fadeIn 0.3s ease-in-out;
+}
+
+@keyframes fadeIn {
+  from {
+    opacity: 0;
+    transform: translateY(10px);
+  }
+  to {
+    opacity: 1;
+    transform: translateY(0);
+  }
+}
+
+.info-item {
+  text-align: center;
+  flex: 1;
+  max-width: 300px;
+}
+
+.info-title {
+  font-size: 16px;
+  color: #333;
+  margin-bottom: 12px;
+  font-weight: 500;
+}
+
+.info-desc {
+  font-size: 13px;
+  color: #666;
+  line-height: 1.6;
+}
+
+/* Page Content Styles */
+.page-content {
+  padding: 40px;
+  background: white;
+  border-radius: 12px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+  margin: 20px 0;
+  min-height: 500px;
+}
+
+.page-header {
+  margin-bottom: 40px;
+  padding-bottom: 20px;
+  border-bottom: 1px solid #e8eaed;
+}
+
+.page-title {
+  font-size: 24px;
+  font-weight: 600;
+  color: #333;
+  margin: 0;
+}
+
+.page-body {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  min-height: 400px;
+}
+
+.placeholder-content {
+  text-align: center;
+  max-width: 400px;
+}
+
+.placeholder-icon {
+  color: #ff4757;
+  margin-bottom: 20px;
+  display: flex;
+  justify-content: center;
+}
+
+.placeholder-title {
+  font-size: 20px;
+  font-weight: 500;
+  color: #333;
+  margin: 0 0 15px 0;
+}
+
+.placeholder-desc {
+  font-size: 14px;
+  color: #666;
+  line-height: 1.6;
+  margin: 0;
+}
+
+/* Responsive */
+@media (max-width: 768px) {
+  .sidebar {
+    transform: translateX(-100%);
+    transition: transform 0.3s;
+  }
+  
+  .main-content {
+    margin-left: 0;
+  }
+  
+  .header-title {
+    display: none;
+  }
+  
+  .upload-area {
+    padding: 60px 20px;
+    margin: 0 10px 30px;
+  }
+  
+  .upload-info {
+    flex-direction: column;
+    gap: 30px;
+    padding: 10px;
+  }
+  
+  .content-wrapper {
+    padding: 15px;
+  }
+  
+  .upload-tabs {
+    gap: 15px;
+  }
+  
+  .page-content {
+    padding: 20px;
+    margin: 10px;
+  }
+  
+  .page-title {
+    font-size: 20px;
+  }
+  
+  .placeholder-title {
+    font-size: 18px;
+  }
+  
+  .placeholder-desc {
+    font-size: 13px;
+  }
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/App.jsx b/API/API-TRM/WZY/xhs_front/src/App.jsx
new file mode 100644
index 0000000..6af25df
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/App.jsx
@@ -0,0 +1,22 @@
+import React from 'react'
+import { BrowserRouter as Router } from 'react-router-dom'
+import Header from './components/Header'
+import Sidebar from './components/Sidebar'
+import AppRouter from './router'
+import './App.css'
+
+export default function App() {
+  return (
+    <Router>
+      <div className="app">
+        <Header />
+        <Sidebar />
+        <main className="main-content">
+          <div className="content-wrapper">
+            <AppRouter />
+          </div>
+        </main>
+      </div>
+    </Router>
+  )
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/api/posts.js b/API/API-TRM/WZY/xhs_front/src/api/posts.js
new file mode 100644
index 0000000..89fe7e5
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/api/posts.js
@@ -0,0 +1,129 @@
+// src/api/posts.js
+const BASE = 'http://127.0.0.1:5000/'  // 如果有代理可以留空,否则填完整域名,如 'http://localhost:3000'
+
+/**
+ * 获取所有已发布的帖子列表
+ * GET /posts
+ */
+export async function fetchPosts() {
+  const res = await fetch(`${BASE}/posts`)
+  if (!res.ok) throw new Error(`fetchPosts: ${res.status}`)
+  return res.json()  // 返回 [ { id, title, heat, created_at }, … ]
+}
+
+/**
+ * 查看单个帖子详情
+ * GET /posts/{postId}
+ */
+export async function fetchPost(postId) {
+  const res = await fetch(`${BASE}/posts/${postId}`)
+  if (!res.ok) throw new Error(`fetchPost(${postId}): ${res.status}`)
+  return res.json()  // 返回完整的帖子对象
+}
+
+/**
+ * 发布新帖
+ * POST /posts
+ */
+export async function createPost(payload) {
+  const res = await fetch(`${BASE}/posts`, {
+    method: 'POST',
+    headers: { 'Content-Type': 'application/json' },
+    body: JSON.stringify(payload)
+  })
+  if (!res.ok) {
+    const err = await res.json().catch(() => null)
+    throw new Error(err?.error || `createPost: ${res.status}`)
+  }
+  return res.json()  // { id }
+}
+
+/**
+ * 修改帖子
+ * PUT /posts/{postId}
+ */
+export async function updatePost(postId, payload) {
+  const res = await fetch(`${BASE}/posts/${postId}`, {
+    method: 'PUT',
+    headers: { 'Content-Type': 'application/json' },
+    body: JSON.stringify(payload)
+  })
+  if (!res.ok) throw new Error(`updatePost(${postId}): ${res.status}`)
+  // 204 No Content
+}
+
+/**
+ * 删除帖子
+ * DELETE /posts/{postId}
+ */
+export async function deletePost(postId) {
+  const res = await fetch(`${BASE}/posts/${postId}`, {
+    method: 'DELETE'
+  })
+  if (!res.ok) throw new Error(`deletePost(${postId}): ${res.status}`)
+}
+
+/**
+ * 点赞
+ * POST /posts/{postId}/like
+ */
+export async function likePost(postId, userId) {
+  const res = await fetch(`${BASE}/posts/${postId}/like`, {
+    method: 'POST',
+    headers: { 'Content-Type': 'application/json' },
+    body: JSON.stringify({ user_id: userId })
+  })
+  if (!res.ok) {
+    const err = await res.json().catch(() => null)
+    throw new Error(err?.error || `likePost: ${res.status}`)
+  }
+}
+
+/**
+ * 取消点赞
+ * DELETE /posts/{postId}/like
+ */
+export async function unlikePost(postId, userId) {
+  const res = await fetch(`${BASE}/posts/${postId}/like`, {
+    method: 'DELETE',
+    headers: { 'Content-Type': 'application/json' },
+    body: JSON.stringify({ user_id: userId })
+  })
+  if (!res.ok) {
+    const err = await res.json().catch(() => null)
+    throw new Error(err?.error || `unlikePost: ${res.status}`)
+  }
+}
+
+/**
+ * 收藏、取消收藏、浏览、分享 等接口:
+ * POST   /posts/{postId}/favorite
+ * DELETE /posts/{postId}/favorite
+ * POST   /posts/{postId}/view
+ * POST   /posts/{postId}/share
+ * 用法同上,替换路径即可
+ */
+
+/**
+ * 添加评论
+ * POST /posts/{postId}/comments
+ */
+export async function addComment(postId, payload) {
+  const res = await fetch(`${BASE}/posts/${postId}/comments`, {
+    method: 'POST',
+    headers: { 'Content-Type': 'application/json' },
+    body: JSON.stringify(payload)
+  })
+  if (!res.ok) throw new Error(`addComment: ${res.status}`)
+  return res.json()  // { id }
+}
+
+/**
+ * 获取评论列表
+ * GET /posts/{postId}/comments
+ */
+export async function fetchComments(postId) {
+  const res = await fetch(`${BASE}/posts/${postId}/comments`)
+  if (!res.ok) throw new Error(`fetchComments: ${res.status}`)
+  return res.json()
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/components/CreatePost.jsx b/API/API-TRM/WZY/xhs_front/src/components/CreatePost.jsx
new file mode 100644
index 0000000..51635c2
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/components/CreatePost.jsx
@@ -0,0 +1,168 @@
+// src/components/CreatePost.jsx
+
+import React, { useState } from 'react'
+import { useNavigate } from 'react-router-dom'
+import UploadPage from './UploadPage'
+import { createPost } from '../api/posts'
+import '../style/CreatePost.css'
+
+export default function CreatePost() {
+  const navigate = useNavigate()
+
+  const [step, setStep] = useState('upload')     // 'upload' | 'detail'
+  const [files, setFiles] = useState([])         // 本地 File 对象列表
+  const [mediaUrls, setMediaUrls] = useState([]) // 上传后得到的 URL 列表
+
+  // 详情表单字段
+  const [title, setTitle]     = useState('')
+  const [content, setContent] = useState('')
+  const [topicId, setTopicId] = useState('')
+  const [status, setStatus]   = useState('published')
+
+  const [error, setError]     = useState(null)
+
+  // 静态话题数据
+  const TOPICS = [
+    { id: 1, name: '世俱杯环球评大会' },
+    { id: 2, name: '我的REDmentor' },
+    { id: 3, name: '我染上了拼豆' },
+    // …更多静态话题…
+  ]
+
+  // 上传页面回调 —— 上传完成后切换到“填写详情”步骤
+  const handleUploadComplete = async uploadedFiles => {
+    setFiles(uploadedFiles)
+
+    // TODO: 改成真实上传逻辑,拿到真正的 media_urls
+    const urls = await Promise.all(
+      uploadedFiles.map(f => URL.createObjectURL(f))
+    )
+    setMediaUrls(urls)
+
+    setStep('detail')
+  }
+
+  // 发布按钮
+  const handleSubmit = async () => {
+    if (!title.trim() || !content.trim()) {
+      setError('标题和正文必填')
+      return
+    }
+    setError(null)
+    try {
+      await createPost({
+        user_id: 1,
+        topic_id: topicId || undefined,
+        title: title.trim(),
+        content: content.trim(),
+        media_urls: mediaUrls,
+        status
+      })
+      // 发布成功后跳转回首页
+      navigate('/home', { replace: true })
+    } catch (e) {
+      setError(e.message)
+    }
+  }
+
+  // 渲染上传页
+  if (step === 'upload') {
+    return <UploadPage onComplete={handleUploadComplete} />
+  }
+
+  // 渲染详情页
+  return (
+    <div className="create-post">
+      <h2>填写帖子内容</h2>
+      {error && <div className="error">{error}</div>}
+
+      {/* 已上传媒体预览 */}
+      <div className="preview-media">
+        {mediaUrls.map((url, i) => (
+          <div key={i} className="preview-item">
+            {files[i].type.startsWith('image/') ? (
+              <img src={url} alt={`预览 ${i}`} />
+            ) : (
+              <video src={url} controls />
+            )}
+          </div>
+        ))}
+      </div>
+
+      {/* 标题 */}
+      <label className="form-label">
+        标题(最多20字)
+        <input
+          type="text"
+          maxLength={20}
+          value={title}
+          onChange={e => setTitle(e.target.value)}
+          placeholder="填写标题会有更多赞哦~"
+        />
+        <span className="char-count">{title.length}/20</span>
+      </label>
+
+      {/* 正文 */}
+      <label className="form-label">
+        正文(最多1000字)
+        <textarea
+          maxLength={1000}
+          value={content}
+          onChange={e => setContent(e.target.value)}
+          placeholder="输入正文描述,真诚有价值的分享予人温暖"
+        />
+        <span className="char-count">{content.length}/1000</span>
+      </label>
+
+      {/* 话题选择 */}
+      <label className="form-label">
+        选择话题(可选)
+        <select
+          value={topicId}
+          onChange={e => setTopicId(e.target.value)}
+        >
+          <option value="">不添加话题</option>
+          {TOPICS.map(t => (
+            <option key={t.id} value={t.id}>
+              #{t.name}
+            </option>
+          ))}
+        </select>
+      </label>
+
+      {/* 发布状态 */}
+      <div className="status-group">
+        <label>
+          <input
+            type="radio"
+            name="status"
+            value="published"
+            checked={status === 'published'}
+            onChange={() => setStatus('published')}
+          />
+          立即发布
+        </label>
+        <label>
+          <input
+            type="radio"
+            name="status"
+            value="draft"
+            checked={status === 'draft'}
+            onChange={() => setStatus('draft')}
+          />
+          存为草稿
+        </label>
+      </div>
+
+      {/* 操作按钮 */}
+      <div className="btn-group">
+        <button className="btn btn-primary" onClick={handleSubmit}>
+          发布
+        </button>
+        <button className="btn btn-secondary" onClick={() => setStep('upload')}>
+          上一步
+        </button>
+      </div>
+    </div>
+  )
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/components/Header.jsx b/API/API-TRM/WZY/xhs_front/src/components/Header.jsx
new file mode 100644
index 0000000..60a50b7
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/components/Header.jsx
@@ -0,0 +1,20 @@
+import React from 'react'
+import { User } from 'lucide-react'
+import '../App.css' // 或者单独的 Header.css
+
+export default function Header() {
+  return (
+    <header className="header">
+      <div className="header-left">
+        <div className="logo">小红书</div>
+        <h1 className="header-title">创作服务平台</h1>
+      </div>
+      <div className="header-right">
+        <div className="user-info">
+          <User size={16} />
+          <span>小红薯63081EA1</span>
+        </div>
+      </div>
+    </header>
+  )
+}
\ No newline at end of file
diff --git a/API/API-TRM/WZY/xhs_front/src/components/HomeFeed.jsx b/API/API-TRM/WZY/xhs_front/src/components/HomeFeed.jsx
new file mode 100644
index 0000000..d906e33
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/components/HomeFeed.jsx
@@ -0,0 +1,90 @@
+// src/components/HomeFeed.jsx
+
+import React, { useState, useEffect } from 'react'
+import { ThumbsUp } from 'lucide-react'
+import { fetchPosts, fetchPost } from '../api/posts'
+import '../style/HomeFeed.css'
+
+const categories = [
+  '推荐','穿搭','美食','彩妆','影视',
+  '职场','情感','家居','游戏','旅行','健身'
+]
+
+export default function HomeFeed() {
+  const [activeCat, setActiveCat] = useState('推荐')
+  const [items, setItems]         = useState([])
+  const [loading, setLoading]     = useState(true)
+  const [error, setError]         = useState(null)
+
+  useEffect(() => {
+    async function loadPosts() {
+      try {
+        const list = await fetchPosts()  // [{id, title, heat, created_at}, …]
+        // 为了拿到 media_urls 和 user_id,这里再拉详情
+        const detailed = await Promise.all(
+          list.map(async p => {
+            const d = await fetchPost(p.id)
+            return {
+              id:     d.id,
+              title:  d.title,
+              author: `作者 ${d.user_id}`,
+              avatar: `https://i.pravatar.cc/40?img=${d.user_id}`,
+              img:    d.media_urls?.[0] || '', // 用第一张媒体作为封面
+              likes:  d.heat
+            }
+          })
+        )
+        setItems(detailed)
+      } catch (e) {
+        setError(e.message)
+      } finally {
+        setLoading(false)
+      }
+    }
+    loadPosts()
+  }, [])
+
+  return (
+    <div className="home-feed">
+      {/* 顶部分类 */}
+      <nav className="feed-tabs">
+        {categories.map(cat => (
+          <button
+            key={cat}
+            className={cat === activeCat ? 'tab active' : 'tab'}
+            onClick={() => setActiveCat(cat)}
+          >
+            {cat}
+          </button>
+        ))}
+      </nav>
+
+      {/* 状态提示 */}
+      {loading ? (
+        <div className="loading">加载中…</div>
+      ) : error ? (
+        <div className="error">加载失败:{error}</div>
+      ) : (
+        /* 瀑布流卡片区 */
+        <div className="feed-grid">
+          {items.map(item => (
+            <div key={item.id} className="feed-card">
+              <img className="card-img" src={item.img} alt={item.title} />
+              <h3 className="card-title">{item.title}</h3>
+              <div className="card-footer">
+                <div className="card-author">
+                  <img className="avatar" src={item.avatar} alt={item.author} />
+                  <span className="username">{item.author}</span>
+                </div>
+                <div className="card-likes">
+                  <ThumbsUp size={16} />
+                  <span className="likes-count">{item.likes}</span>
+                </div>
+              </div>
+            </div>
+          ))}
+        </div>
+      )}
+    </div>
+  )
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/components/PlaceholderPage.jsx b/API/API-TRM/WZY/xhs_front/src/components/PlaceholderPage.jsx
new file mode 100644
index 0000000..b290eb4
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/components/PlaceholderPage.jsx
@@ -0,0 +1,55 @@
+import React from 'react'
+import {
+  Home,
+  BookOpen,
+  Activity,
+  Users
+} from 'lucide-react'
+import '../App.css' // 或 PlaceholderPage.css
+
+const icons = {
+  home: Home,
+  notebooks: BookOpen,
+  activity: Activity,
+  notes: BookOpen,
+  creator: Users,
+  journal: BookOpen,
+}
+
+const titles = {
+  home:      '欢迎来到小红书创作平台',
+  notebooks: '笔记管理功能开发中',
+  activity:  '活动中心功能开发中',
+  notes:     '笔记灵感功能开发中',
+  creator:   '创作学院功能开发中',
+  journal:   '创作日刊功能开发中',
+}
+
+const descs = {
+  home:      '在这里您可以管理您的创作内容,查看数据分析,获取创作灵感。',
+  notebooks: '这里将显示您的所有笔记,支持编辑、删除、分类等操作。',
+  activity:  '这里将展示最新的平台活动,让您参与更多有趣的创作活动。',
+  notes:     '这里将为您提供创作灵感和写作建议,帮助您创作更好的内容。',
+  creator:   '这里将提供创作技巧教学和平台规则说明,助您成为优秀创作者。',
+  journal:   '这里将展示创作相关的最新资讯和平台动态。',
+}
+
+export default function PlaceholderPage({ pageId }) {
+  const Icon = icons[pageId] || Home
+  return (
+    <div className="page-content">
+      <div className="page-header">
+        <h1 className="page-title">{titles[pageId]}</h1>
+      </div>
+      <div className="page-body">
+        <div className="placeholder-content">
+          <div className="placeholder-icon">
+            <Icon size={48} />
+          </div>
+          <h3 className="placeholder-title">{titles[pageId]}</h3>
+          <p className="placeholder-desc">{descs[pageId]}</p>
+        </div>
+      </div>
+    </div>
+  )
+}
\ No newline at end of file
diff --git a/API/API-TRM/WZY/xhs_front/src/components/Sidebar.jsx b/API/API-TRM/WZY/xhs_front/src/components/Sidebar.jsx
new file mode 100644
index 0000000..26118b2
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/components/Sidebar.jsx
@@ -0,0 +1,103 @@
+import React, { useState, useEffect } from 'react'
+import { NavLink, useLocation, useNavigate } from 'react-router-dom'
+import {
+  Home,
+  BookOpen,
+  BarChart3,
+  Activity,
+  Users,
+  ChevronDown,
+} from 'lucide-react'
+import '../App.css'
+
+const menuItems = [
+  { id: 'home',      label: '首页',       icon: Home,      path: '/home' },
+  { id: 'notebooks', label: '笔记管理',   icon: BookOpen,  path: '/notebooks' },
+  {
+    id: 'dashboard',
+    label: '数据看板',
+    icon: BarChart3,
+    path: '/dashboard',
+    submenu: [
+      { id: 'overview', label: '账号概况', path: '/dashboard/overview' },
+      { id: 'content',  label: '内容分析', path: '/dashboard/content'  },
+      { id: 'fans',     label: '粉丝数据', path: '/dashboard/fans'     },
+    ]
+  },
+  { id: 'activity', label: '活动中心', icon: Activity, path: '/activity' },
+  { id: 'notes',    label: '笔记灵感', icon: BookOpen, path: '/notes'    },
+  { id: 'creator',  label: '创作学院', icon: Users,    path: '/creator'  },
+  { id: 'journal',  label: '创作日刊', icon: BookOpen, path: '/journal'  },
+]
+
+export default function Sidebar() {
+  const [expandedMenu, setExpandedMenu] = useState(null)
+  const location = useLocation()
+  const navigate = useNavigate()
+
+  // 打开 dashboard 下拉时保持展开
+  useEffect(() => {
+    if (location.pathname.startsWith('/dashboard')) {
+      setExpandedMenu('dashboard')
+    }
+  }, [location.pathname])
+
+  const toggleMenu = item => {
+    if (item.submenu) {
+      setExpandedMenu(expandedMenu === item.id ? null : item.id)
+    } else {
+      navigate(item.path)
+      setExpandedMenu(null)
+    }
+  }
+
+  return (
+    <aside className="sidebar">
+      {/* 发布笔记 按钮 */}
+      <button
+        className="publish-btn"
+        onClick={() => navigate('/posts/new')}
+      >
+        发布笔记
+      </button>
+
+      <nav className="nav-menu">
+        {menuItems.map(item => (
+          <div key={item.id} className="nav-item">
+            <a
+              href="#"
+              className={`nav-link${location.pathname === item.path ? ' active' : ''}`}
+              onClick={e => { e.preventDefault(); toggleMenu(item) }}
+            >
+              <item.icon size={16} />
+              <span>{item.label}</span>
+              {item.submenu && (
+                <ChevronDown
+                  size={16}
+                  style={{
+                    marginLeft: 'auto',
+                    transform: expandedMenu === item.id ? 'rotate(180deg)' : 'rotate(0deg)',
+                    transition: 'transform 0.3s ease'
+                  }}
+                />
+              )}
+            </a>
+            {item.submenu && expandedMenu === item.id && (
+              <div className="nav-submenu">
+                {item.submenu.map(sub => (
+                  <NavLink
+                    key={sub.id}
+                    to={sub.path}
+                    className={({ isActive }) => `nav-link${isActive ? ' active' : ''}`}
+                  >
+                    {sub.label}
+                  </NavLink>
+                ))}
+              </div>
+            )}
+          </div>
+        ))}
+      </nav>
+    </aside>
+  )
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/components/UploadPage.jsx b/API/API-TRM/WZY/xhs_front/src/components/UploadPage.jsx
new file mode 100644
index 0000000..dbbd7fe
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/components/UploadPage.jsx
@@ -0,0 +1,229 @@
+// src/components/UploadPage.jsx
+
+import React, { useState } from 'react'
+import { Image, Video } from 'lucide-react'
+
+
+/**
+ * @param {Object} props
+ * @param {(files: File[]) => void} [props.onComplete]  上传完成后回调,接收 File 数组
+ */
+export default function UploadPage({ onComplete }) {
+  const [activeTab, setActiveTab]         = useState('image')
+  const [isDragOver, setIsDragOver]       = useState(false)
+  const [isUploading, setIsUploading]     = useState(false)
+  const [uploadedFiles, setUploadedFiles] = useState([])
+  const [uploadProgress, setUploadProgress] = useState(0)
+
+  const validateFiles = files => {
+    const imgTypes = ['image/jpeg','image/jpg','image/png','image/webp']
+    const vidTypes = ['video/mp4','video/mov','video/avi']
+    const types = activeTab === 'video' ? vidTypes : imgTypes
+    const max   = activeTab === 'video'
+      ? 2 * 1024 * 1024 * 1024
+      : 32 * 1024 * 1024
+
+    const invalid = files.filter(f => !types.includes(f.type) || f.size > max)
+    if (invalid.length) {
+      alert(`发现 ${invalid.length} 个无效文件,请检查文件格式和大小`)
+      return false
+    }
+    return true
+  }
+
+  const simulateUpload = files => {
+    setIsUploading(true)
+    setUploadProgress(0)
+    setUploadedFiles(files)
+
+    const iv = setInterval(() => {
+      setUploadProgress(p => {
+        if (p >= 100) {
+          clearInterval(iv)
+          setIsUploading(false)
+          alert(`成功上传了 ${files.length} 个文件`)
+          // 上传完成后回调
+          if (typeof onComplete === 'function') {
+            onComplete(files)
+          }
+          return 100
+        }
+        return p + 10
+      })
+    }, 200)
+  }
+
+  const handleFileUpload = () => {
+    if (isUploading) return
+    const input = document.createElement('input')
+    input.type     = 'file'
+    input.accept   = activeTab === 'video' ? 'video/*' : 'image/*'
+    input.multiple = activeTab === 'image'
+    input.onchange = e => {
+      const files = Array.from(e.target.files)
+      if (files.length > 0 && validateFiles(files)) {
+        simulateUpload(files)
+      }
+    }
+    input.click()
+  }
+
+  const handleDragOver  = e => { e.preventDefault(); e.stopPropagation(); setIsDragOver(true) }
+  const handleDragLeave = e => { e.preventDefault(); e.stopPropagation(); setIsDragOver(false) }
+  const handleDrop      = e => {
+    e.preventDefault(); e.stopPropagation(); setIsDragOver(false)
+    if (isUploading) return
+    const files = Array.from(e.dataTransfer.files)
+    if (files.length > 0 && validateFiles(files)) {
+      simulateUpload(files)
+    }
+  }
+
+  const clearFiles = () => setUploadedFiles([])
+  const removeFile = idx => setUploadedFiles(prev => prev.filter((_, i) => i !== idx))
+
+  return (
+    <div className="upload-page">
+      {/* 上传类型切换 */}
+      <div className="upload-tabs">
+        <button
+          className={`upload-tab${activeTab === 'video' ? ' active' : ''}`}
+          onClick={() => setActiveTab('video')}
+        >
+          上传视频
+        </button>
+        <button
+          className={`upload-tab${activeTab === 'image' ? ' active' : ''}`}
+          onClick={() => setActiveTab('image')}
+        >
+          上传图文
+        </button>
+      </div>
+
+      {/* 拖拽/点击上传区域 */}
+      <div
+        className={`upload-area${isDragOver ? ' drag-over' : ''}`}
+        onDragOver={handleDragOver}
+        onDragLeave={handleDragLeave}
+        onDrop={handleDrop}
+      >
+        <div className="upload-icon">
+          {activeTab === 'video' ? <Video size={48} /> : <Image size={48} />}
+        </div>
+        <h2 className="upload-title">
+          {activeTab === 'video'
+            ? '拖拽视频到此处或点击上传'
+            : '拖拽图片到此处或点击上传'}
+        </h2>
+        <p className="upload-subtitle">(需支持上传格式)</p>
+        <button
+          className={`upload-btn${isUploading ? ' uploading' : ''}`}
+          onClick={handleFileUpload}
+          disabled={isUploading}
+        >
+          {isUploading
+            ? `上传中... ${uploadProgress}%`
+            : activeTab === 'video'
+              ? '上传视频'
+              : '上传图片'}
+        </button>
+
+        {isUploading && (
+          <div className="progress-container">
+            <div className="progress-bar">
+              <div
+                className="progress-fill"
+                style={{ width: `${uploadProgress}%` }}
+              />
+            </div>
+            <div className="progress-text">{uploadProgress}%</div>
+          </div>
+        )}
+      </div>
+
+      {/* 已上传文件预览 */}
+      {uploadedFiles.length > 0 && (
+        <div className="file-preview-area">
+          <div className="preview-header">
+            <h3 className="preview-title">
+              已上传文件 ({uploadedFiles.length})
+            </h3>
+            <button
+              className="clear-files-btn"
+              onClick={clearFiles}
+            >
+              清除所有
+            </button>
+          </div>
+          <div className="file-grid">
+            {uploadedFiles.map((file, i) => (
+              <div key={i} className="file-item">
+                <button
+                  className="remove-file-btn"
+                  onClick={() => removeFile(i)}
+                  title="删除文件"
+                >
+                  ×
+                </button>
+                {file.type.startsWith('image/') ? (
+                  <div className="file-thumbnail">
+                    <img src={URL.createObjectURL(file)} alt={file.name} />
+                  </div>
+                ) : (
+                  <div className="file-thumbnail video-thumbnail">
+                    <Video size={24} />
+                  </div>
+                )}
+                <div className="file-info">
+                  <div className="file-name" title={file.name}>
+                    {file.name.length > 20
+                      ? file.name.slice(0, 17) + '...'
+                      : file.name}
+                  </div>
+                  <div className="file-size">
+                    {(file.size / 1024 / 1024).toFixed(2)} MB
+                  </div>
+                </div>
+              </div>
+            ))}
+          </div>
+        </div>
+      )}
+
+      {/* 上传说明信息 */}
+      <div className="upload-info fade-in">
+        {activeTab === 'image' ? (
+          <>
+            <div className="info-item">
+              <h3 className="info-title">图片大小</h3>
+              <p className="info-desc">最大32MB</p>
+            </div>
+            <div className="info-item">
+              <h3 className="info-title">图片格式</h3>
+              <p className="info-desc">png/jpg/jpeg/webp</p>
+            </div>
+            <div className="info-item">
+              <h3 className="info-title">分辨率</h3>
+              <p className="info-desc">建议720×960及以上</p>
+            </div>
+          </>
+        ) : (
+          <>
+            <div className="info-item">
+              <h3 className="info-title">视频大小</h3>
+              <p className="info-desc">最大2GB,时长≤5分钟</p>
+            </div>
+            <div className="info-item">
+              <h3 className="info-title">视频格式</h3>
+              <p className="info-desc">mp4/mov</p>
+            </div>
+            <div className="info-item">
+              <h3 className="info-title">分辨率</h3>
+              <p className="info-desc">建议720P及以上</p>
+            </div>
+          </>
+        )}
+      </div>
+    </div>
+  )
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/index.css b/API/API-TRM/WZY/xhs_front/src/index.css
new file mode 100644
index 0000000..72c144a
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/index.css
@@ -0,0 +1,29 @@
+* {
+  margin: 0;
+  padding: 0;
+  box-sizing: border-box;
+}
+
+body {
+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  background-color: #f5f7fa;
+}
+
+button {
+  border: none;
+  background: none;
+  cursor: pointer;
+  font-family: inherit;
+}
+
+a {
+  text-decoration: none;
+  color: inherit;
+}
+
+#root {
+  width: 100%;
+  min-height: 100vh;
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/main.jsx b/API/API-TRM/WZY/xhs_front/src/main.jsx
new file mode 100644
index 0000000..b9a1a6d
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/main.jsx
@@ -0,0 +1,10 @@
+import { StrictMode } from 'react'
+import { createRoot } from 'react-dom/client'
+import './index.css'
+import App from './App.jsx'
+
+createRoot(document.getElementById('root')).render(
+  <StrictMode>
+    <App />
+  </StrictMode>,
+)
diff --git a/API/API-TRM/WZY/xhs_front/src/router/index.jsx b/API/API-TRM/WZY/xhs_front/src/router/index.jsx
new file mode 100644
index 0000000..077f8ed
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/router/index.jsx
@@ -0,0 +1,34 @@
+// src/router/index.jsx
+import React from 'react'
+import { Routes, Route, Navigate } from 'react-router-dom'
+
+// 确认这些路径和文件名与你项目里是一一对应的
+import CreatePost     from '../components/CreatePost'      // src/components/CreatePost.jsx
+import HomeFeed       from '../components/HomeFeed'        // src/components/HomeFeed.jsx
+import PlaceholderPage from '../components/PlaceholderPage'// src/components/PlaceholderPage.jsx
+import UploadPage     from '../components/UploadPage'      // src/components/UploadPage.jsx
+
+export default function AppRouter() {
+  return (
+    <Routes>
+      {/* 一定要放在最前面,防止被 /* 等 catch-all 覆盖 */}
+      <Route path="/posts/new" element={<CreatePost />} />
+
+      <Route path="/home"      element={<HomeFeed />} />
+
+      <Route path="/notebooks" element={<PlaceholderPage pageId="notebooks" />} />
+      <Route path="/activity"  element={<PlaceholderPage pageId="activity"  />} />
+      <Route path="/notes"     element={<PlaceholderPage pageId="notes"     />} />
+      <Route path="/creator"   element={<PlaceholderPage pageId="creator"   />} />
+      <Route path="/journal"   element={<PlaceholderPage pageId="journal"   />} />
+
+      <Route path="/dashboard/*" element={<UploadPage />} />
+
+      {/* 根路径重定向到 dashboard */}
+      <Route path="/" element={<Navigate to="/dashboard/overview" replace />} />
+
+      {/* 最后一个兜底 */}
+      <Route path="*" element={<PlaceholderPage pageId="home" />} />
+    </Routes>
+  )
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/style/CreatePost.css b/API/API-TRM/WZY/xhs_front/src/style/CreatePost.css
new file mode 100644
index 0000000..4868132
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/style/CreatePost.css
@@ -0,0 +1,98 @@
+/* src/style/CreatePost.css */
+.create-post {
+  max-width: 600px;
+  margin: 0 auto;
+  padding: 20px;
+  background: #fff;
+  border-radius: 8px;
+}
+
+/* 预览区 */
+.preview-media {
+  display: flex;
+  gap: 12px;
+  flex-wrap: wrap;
+  margin-bottom: 20px;
+}
+.preview-item {
+  width: 100px;
+  height: 100px;
+  overflow: hidden;
+  border: 1px solid #eee;
+  border-radius: 4px;
+}
+.preview-item img,
+.preview-item video {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+/* 表单项 */
+label {
+  display: block;
+  margin-bottom: 16px;
+  font-size: 14px;
+  color: #333;
+}
+label input[type="text"],
+label textarea,
+label select {
+  width: 100%;
+  padding: 8px;
+  margin-top: 6px;
+  border: 1px solid #ddd;
+  border-radius: 4px;
+  font-size: 14px;
+  box-sizing: border-box;
+}
+label textarea {
+  min-height: 120px;
+  resize: vertical;
+}
+.char-count {
+  float: right;
+  font-size: 12px;
+  color: #999;
+}
+
+/* 发布状态 */
+.status-group {
+  display: flex;
+  gap: 20px;
+  margin-bottom: 20px;
+}
+.status-group label {
+  display: flex;
+  align-items: center;
+  gap: 6px;
+  font-size: 14px;
+}
+
+/* 按钮组 */
+.btn-group {
+  display: flex;
+  gap: 12px;
+  justify-content: flex-end;
+}
+.btn {
+  padding: 8px 16px;
+  border-radius: 4px;
+  border: none;
+  cursor: pointer;
+  font-size: 14px;
+}
+.btn-primary {
+  background: #ff4757;
+  color: #fff;
+}
+.btn-secondary {
+  background: #f0f0f0;
+  color: #333;
+}
+
+/* 错误信息 */
+.error {
+  color: #d9534f;
+  margin-bottom: 12px;
+}
diff --git a/API/API-TRM/WZY/xhs_front/src/style/HomeFeed.css b/API/API-TRM/WZY/xhs_front/src/style/HomeFeed.css
new file mode 100644
index 0000000..f1bf75d
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/src/style/HomeFeed.css
@@ -0,0 +1,116 @@
+/* --------- 容器 & Tabs --------- */
+.home-feed {
+  padding: 20px;
+}
+
+.feed-tabs {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 12px;
+  margin-bottom: 20px;
+}
+
+.feed-tabs .tab {
+  padding: 6px 12px;
+  border: none;
+  background: #f0f0f0;
+  border-radius: 16px;
+  cursor: pointer;
+  transition: background 0.2s;
+}
+
+.feed-tabs .tab.active {
+  background: #ff4757;
+  color: #fff;
+}
+
+/* --------- 瀑布流布局 --------- */
+.feed-grid {
+  display: grid;
+  grid-gap: 16px;
+  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
+}
+
+/* --------- 卡片样式及最大高度限制 --------- */
+.feed-card {
+  display: flex;
+  flex-direction: column;
+  max-height: 360px;      /* 卡片最大高度 */
+  overflow: hidden;       /* 超出部分隐藏 */
+  background: #fff;
+  border-radius: 8px;
+  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
+  transition: transform 0.2s;
+}
+
+.feed-card:hover {
+  transform: translateY(-4px);
+}
+
+/* 封面图固定高度 */
+.card-img {
+  width: 100%;
+  height: 180px;         /* 固定图片区域高度 */
+  object-fit: cover;
+  flex-shrink: 0;        /* 不随容器收缩 */
+}
+
+/* 标题填充剩余空间 */
+.card-title {
+  font-size: 14px;
+  color: #333;
+  margin: 12px;
+  line-height: 1.4;
+  flex: 1;               /* 占满中间区域 */
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2; /* 最多两行 */
+  -webkit-box-orient: vertical;
+}
+
+/* --------- 底部:作者 + 点赞 --------- */
+.card-footer {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 8px 12px;
+  border-top: 1px solid #f0f0f0;
+  background: #fff;
+  flex-shrink: 0;        /* 保持在底部 */
+}
+
+/* 作者区域 */
+.card-author {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+}
+
+.card-author .avatar {
+  width: 24px;
+  height: 24px;
+  border-radius: 50%;
+  object-fit: cover;
+}
+
+.card-author .username {
+  font-size: 13px;
+  color: #333;
+}
+
+/* 点赞区域 */
+.card-likes {
+  display: flex;
+  align-items: center;
+  gap: 4px;
+}
+
+.card-likes svg {
+  color: #ff4757;
+}
+
+.card-likes .likes-count {
+  font-size: 13px;
+  color: #666;
+}
\ No newline at end of file
diff --git a/API/API-TRM/WZY/xhs_front/vite.config.js b/API/API-TRM/WZY/xhs_front/vite.config.js
new file mode 100644
index 0000000..8b0f57b
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_front/vite.config.js
@@ -0,0 +1,7 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+
+// https://vite.dev/config/
+export default defineConfig({
+  plugins: [react()],
+})
diff --git a/API/API-TRM/WZY/xhs_server/__pycache__/app.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/__pycache__/app.cpython-312.pyc
new file mode 100644
index 0000000..215bc7f
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/__pycache__/app.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/__pycache__/config.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/__pycache__/config.cpython-312.pyc
new file mode 100644
index 0000000..4e1a3be
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/__pycache__/config.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/__pycache__/extensions.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/__pycache__/extensions.cpython-312.pyc
new file mode 100644
index 0000000..27ba8c2
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/__pycache__/extensions.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/all_tables.sql b/API/API-TRM/WZY/xhs_server/all_tables.sql
new file mode 100644
index 0000000..fd5d1e5
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/all_tables.sql
@@ -0,0 +1,182 @@
+/*
+数据库设计说明:
+1.	核心表结构:
+	users:存储用户信息,包含角色管理和账号状态
+	posts:核心内容表,支持多模态内容(图文/视频/文档)
+	behaviors:记录用户互动行为(点赞/收藏/浏览等)
+	comments:评论系统,支持多级回复
+	follows:用户社交关系
+2.	推荐系统支持:
+	posts.heat 字段存储动态计算的热度值
+	behaviors 表记录用户行为用于协同过滤
+	user_tags 表构建用户兴趣画像
+	通过 post_tags 实现内容标签分类
+3.	多模态内容处理:
+	posts.media_urls 使用 JSON 类型存储多个资源 URL
+	posts.type 区分不同类型的内容(图文/视频/文档)
+4.	审核与安全:
+	audits 表记录内容审核历史
+	posts.status 管理内容生命周期状态
+	logs 表记录系统操作和访问日志
+5.	性能优化:
+	为查询频繁字段添加索引(热度/行为类型/时间)
+	使用 JSON 类型存储灵活数据(通知内容/媒体资源)
+	通过 heat 字段预计算支持热门排序
+6.	扩展性设计:
+	用户画像系统通过 user_tags 表实现
+	通知系统支持多种互动类型
+	行为表设计支持未来扩展新行为类型
+*/
+
+DROP DATABASE IF EXISTS redbook;
+
+-- 创建数据库
+CREATE DATABASE IF NOT EXISTS redbook DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_general_ci;
+USE redbook;
+
+-- 用户表
+CREATE TABLE users (
+    id INT AUTO_INCREMENT PRIMARY KEY COMMENT '用户ID',
+    username VARCHAR(50) NOT NULL UNIQUE COMMENT '用户名',
+    password VARCHAR(255) NOT NULL COMMENT '加密密码',
+    email VARCHAR(100) NOT NULL UNIQUE COMMENT '邮箱',
+    avatar VARCHAR(255) COMMENT '头像URL',
+    role ENUM('user', 'admin') DEFAULT 'user' COMMENT '角色',
+    bio VARCHAR(255) COMMENT '个人简介',
+    status ENUM('active', 'banned', 'muted') DEFAULT 'active' COMMENT '账号状态',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
+) ENGINE=InnoDB COMMENT='用户表';
+
+-- 标签表
+CREATE TABLE tags (
+    id INT AUTO_INCREMENT PRIMARY KEY COMMENT '标签ID',
+    name VARCHAR(50) NOT NULL UNIQUE COMMENT '标签名称',
+    description VARCHAR(255) COMMENT '标签描述',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
+) ENGINE=InnoDB COMMENT='内容标签表';
+
+-- 话题/超话表
+CREATE TABLE topics (
+    id INT AUTO_INCREMENT PRIMARY KEY COMMENT '话题ID',
+    name VARCHAR(100) NOT NULL UNIQUE COMMENT '话题名称',
+    description TEXT COMMENT '话题描述',
+    status ENUM('active', 'archived') DEFAULT 'active' COMMENT '状态',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
+) ENGINE=InnoDB COMMENT='话题/超话表';
+
+-- 内容帖子表
+CREATE TABLE posts (
+    id INT AUTO_INCREMENT PRIMARY KEY COMMENT '帖子ID',
+    user_id INT NOT NULL COMMENT '作者ID',
+    topic_id INT COMMENT '所属话题ID',
+    type ENUM('text', 'image', 'video', 'document') DEFAULT 'text' COMMENT '内容类型',
+    title VARCHAR(255) NOT NULL COMMENT '标题',
+    content TEXT NOT NULL COMMENT '正文内容',
+    media_urls JSON COMMENT '媒体资源URL数组',
+    status ENUM('draft', 'pending', 'published', 'deleted', 'rejected') DEFAULT 'draft' COMMENT '状态',
+    heat INT DEFAULT 0 COMMENT '热度值',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
+    FOREIGN KEY (topic_id) REFERENCES topics(id) ON DELETE SET NULL
+) ENGINE=InnoDB COMMENT='内容帖子表';
+
+-- 帖子标签关联表
+CREATE TABLE post_tags (
+    post_id INT NOT NULL COMMENT '帖子ID',
+    tag_id INT NOT NULL COMMENT '标签ID',
+    PRIMARY KEY (post_id, tag_id),
+    FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE,
+    FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
+) ENGINE=InnoDB COMMENT='帖子标签关联表';
+
+-- 用户行为表
+CREATE TABLE behaviors (
+    id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '行为ID',
+    user_id INT NOT NULL COMMENT '用户ID',
+    post_id INT NOT NULL COMMENT '帖子ID',
+    type ENUM('like', 'comment', 'favorite', 'view', 'share') NOT NULL COMMENT '行为类型',
+    value INT DEFAULT 1 COMMENT '行为值',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '行为时间',
+    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
+    FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE
+) ENGINE=InnoDB COMMENT='用户行为记录表';
+
+-- 评论表
+CREATE TABLE comments (
+    id INT AUTO_INCREMENT PRIMARY KEY COMMENT '评论ID',
+    post_id INT NOT NULL COMMENT '帖子ID',
+    user_id INT NOT NULL COMMENT '用户ID',
+    parent_id INT DEFAULT NULL COMMENT '父评论ID',
+    content TEXT NOT NULL COMMENT '评论内容',
+    status ENUM('active', 'deleted') DEFAULT 'active' COMMENT '状态',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+    FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE,
+    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
+    FOREIGN KEY (parent_id) REFERENCES comments(id) ON DELETE CASCADE
+) ENGINE=InnoDB COMMENT='评论表';
+
+-- 用户关注关系表
+CREATE TABLE follows (
+    follower_id INT NOT NULL COMMENT '关注者ID',
+    followee_id INT NOT NULL COMMENT '被关注者ID',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '关注时间',
+    PRIMARY KEY (follower_id, followee_id),
+    FOREIGN KEY (follower_id) REFERENCES users(id) ON DELETE CASCADE,
+    FOREIGN KEY (followee_id) REFERENCES users(id) ON DELETE CASCADE
+) ENGINE=InnoDB COMMENT='用户关注关系表';
+
+-- 通知表
+CREATE TABLE notifications (
+    id INT AUTO_INCREMENT PRIMARY KEY COMMENT '通知ID',
+    user_id INT NOT NULL COMMENT '接收用户ID',
+    type ENUM('like', 'comment', 'follow', 'system', 'audit') NOT NULL COMMENT '通知类型',
+    content JSON NOT NULL COMMENT '通知内容',
+    is_read BOOLEAN DEFAULT FALSE COMMENT '是否已读',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
+) ENGINE=InnoDB COMMENT='用户通知表';
+
+-- 审核记录表
+CREATE TABLE audits (
+    id INT AUTO_INCREMENT PRIMARY KEY COMMENT '审核ID',
+    post_id INT NOT NULL COMMENT '帖子ID',
+    admin_id INT NOT NULL COMMENT '管理员ID',
+    result ENUM('approved', 'rejected') NOT NULL COMMENT '审核结果',
+    reason VARCHAR(255) COMMENT '审核原因',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '审核时间',
+    FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE,
+    FOREIGN KEY (admin_id) REFERENCES users(id) ON DELETE CASCADE
+) ENGINE=InnoDB COMMENT='内容审核记录表';
+
+-- 日志表
+CREATE TABLE logs (
+    id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '日志ID',
+    user_id INT DEFAULT NULL COMMENT '用户ID',
+    type ENUM('access', 'error', 'behavior', 'system') NOT NULL COMMENT '日志类型',
+    content TEXT NOT NULL COMMENT '日志内容',
+    ip VARCHAR(45) COMMENT 'IP地址',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '记录时间',
+    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL
+) ENGINE=InnoDB COMMENT='系统日志表';
+
+-- 用户兴趣标签表(用户画像)
+CREATE TABLE user_tags (
+    user_id INT NOT NULL COMMENT '用户ID',
+    tag_id INT NOT NULL COMMENT '标签ID',
+    weight FLOAT DEFAULT 1.0 COMMENT '兴趣权重',
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
+    PRIMARY KEY (user_id, tag_id),
+    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
+    FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
+) ENGINE=InnoDB COMMENT='用户兴趣标签表';
+
+-- 索引优化
+CREATE INDEX idx_posts_heat ON posts(heat);
+CREATE INDEX idx_behaviors_type ON behaviors(type);
+CREATE INDEX idx_notifications_read ON notifications(is_read);
+CREATE INDEX idx_logs_created ON logs(created_at);
+CREATE INDEX idx_comments_post ON comments(post_id);
\ No newline at end of file
diff --git a/API/API-TRM/WZY/xhs_server/app.py b/API/API-TRM/WZY/xhs_server/app.py
new file mode 100644
index 0000000..649a7a5
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/app.py
@@ -0,0 +1,34 @@
+# app.py
+
+from flask import Flask
+from flask_cors import CORS
+from config import Config
+from extensions import db, migrate
+
+def create_app():
+    app = Flask(__name__)
+    app.config.from_object(Config)
+
+    # 启用 CORS:允许前端 http://localhost:5173 发起跨域请求
+    # 生产环境请根据实际域名调整 origins
+    CORS(app, resources={
+        r"/posts/*": {"origins": "http://localhost:5173"},
+        r"/posts":   {"origins": "http://localhost:5173"}
+    }, supports_credentials=True)
+
+    db.init_app(app)
+    migrate.init_app(app, db)
+
+    # 在工厂函数里再导入并注册蓝图
+    from routes.posts    import posts_bp
+    from routes.comments import comments_bp
+
+    app.register_blueprint(posts_bp,    url_prefix='/posts')
+    app.register_blueprint(comments_bp, url_prefix='/posts/<int:post_id>/comments')
+
+    return app
+
+# 只有直接用 python app.py 时,这段才会执行
+if __name__ == '__main__':
+    app = create_app()
+    app.run(host='0.0.0.0', port=5000, debug=True)
diff --git a/API/API-TRM/WZY/xhs_server/config.py b/API/API-TRM/WZY/xhs_server/config.py
new file mode 100644
index 0000000..b83aead
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/config.py
@@ -0,0 +1,12 @@
+# config.py
+import os
+
+basedir = os.path.abspath(os.path.dirname(__file__))
+
+class Config:
+    SECRET_KEY = os.environ.get('SECRET_KEY', 'you-will-never-guess')
+    SQLALCHEMY_DATABASE_URI = os.environ.get(
+        'DATABASE_URL',
+        'mysql+pymysql://root:password@localhost/redbook?charset=utf8mb4'
+    )
+    SQLALCHEMY_TRACK_MODIFICATIONS = False
diff --git a/API/API-TRM/WZY/xhs_server/extensions.py b/API/API-TRM/WZY/xhs_server/extensions.py
new file mode 100644
index 0000000..3563787
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/extensions.py
@@ -0,0 +1,6 @@
+# extensions.py(根目录,同级于 app.py)
+from flask_sqlalchemy import SQLAlchemy
+from flask_migrate    import Migrate
+
+db      = SQLAlchemy()
+migrate = Migrate()
diff --git a/API/API-TRM/WZY/xhs_server/manage.py b/API/API-TRM/WZY/xhs_server/manage.py
new file mode 100644
index 0000000..15ab995
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/manage.py
@@ -0,0 +1,12 @@
+# manage.py
+from flask_script import Manager
+from flask_migrate import MigrateCommand
+
+from app import app, db
+
+manager = Manager(app)
+# 添加 db 子命令: migrate, upgrade, downgrade 等
+manager.add_command('db', MigrateCommand)
+
+if __name__ == '__main__':
+    manager.run()
diff --git a/API/API-TRM/WZY/xhs_server/models/__init__.py b/API/API-TRM/WZY/xhs_server/models/__init__.py
new file mode 100644
index 0000000..f7cef7b
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__init__.py
@@ -0,0 +1,12 @@
+# models/__init__.py
+# --------------------------------------------------
+# 绝**对**不要**从** app.py 导入 db!
+# 改成:
+from extensions import db
+
+from .user     import User
+from .topic    import Topic
+from .tag      import Tag
+from .post     import Post, post_tags
+from .behavior import Behavior
+from .comment  import Comment
diff --git a/API/API-TRM/WZY/xhs_server/models/__pycache__/__init__.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/models/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..fe53b2a
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__pycache__/__init__.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/models/__pycache__/behavior.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/models/__pycache__/behavior.cpython-312.pyc
new file mode 100644
index 0000000..71f3757
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__pycache__/behavior.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/models/__pycache__/comment.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/models/__pycache__/comment.cpython-312.pyc
new file mode 100644
index 0000000..393c6d3
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__pycache__/comment.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/models/__pycache__/post.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/models/__pycache__/post.cpython-312.pyc
new file mode 100644
index 0000000..1d64737
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__pycache__/post.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/models/__pycache__/tag.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/models/__pycache__/tag.cpython-312.pyc
new file mode 100644
index 0000000..d76c0e0
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__pycache__/tag.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/models/__pycache__/topic.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/models/__pycache__/topic.cpython-312.pyc
new file mode 100644
index 0000000..a779595
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__pycache__/topic.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/models/__pycache__/user.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/models/__pycache__/user.cpython-312.pyc
new file mode 100644
index 0000000..e3841c7
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/__pycache__/user.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/models/behavior.py b/API/API-TRM/WZY/xhs_server/models/behavior.py
new file mode 100644
index 0000000..aed413f
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/behavior.py
@@ -0,0 +1,13 @@
+# models/behavior.py
+from extensions import db
+from datetime import datetime
+
+class Behavior(db.Model):
+    __tablename__ = 'behaviors'
+
+    id = db.Column(db.BigInteger, primary_key=True)
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False)
+    post_id = db.Column(db.Integer, db.ForeignKey('posts.id', ondelete='CASCADE'), nullable=False)
+    type = db.Column(db.Enum('like', 'comment', 'favorite', 'view', 'share'), nullable=False)
+    value = db.Column(db.Integer, default=1, nullable=False)
+    created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
diff --git a/API/API-TRM/WZY/xhs_server/models/comment.py b/API/API-TRM/WZY/xhs_server/models/comment.py
new file mode 100644
index 0000000..ce25287
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/comment.py
@@ -0,0 +1,24 @@
+# models/comment.py
+from extensions import db
+from datetime import datetime
+
+class Comment(db.Model):
+    __tablename__ = 'comments'
+
+    id = db.Column(db.Integer, primary_key=True)
+    post_id = db.Column(db.Integer, db.ForeignKey('posts.id', ondelete='CASCADE'), nullable=False)
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False)
+    parent_id = db.Column(db.Integer, db.ForeignKey('comments.id', ondelete='CASCADE'))
+    content = db.Column(db.Text, nullable=False)
+    status = db.Column(db.Enum('active', 'deleted'), default='active', nullable=False)
+    created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
+    updated_at = db.Column(db.DateTime, default=datetime.utcnow,
+                           onupdate=datetime.utcnow, nullable=False)
+
+    # self-referential replies
+    replies = db.relationship(
+        'Comment',
+        backref=db.backref('parent', remote_side=[id]),
+        lazy='dynamic',
+        cascade='all, delete-orphan'
+    )
diff --git a/API/API-TRM/WZY/xhs_server/models/post.py b/API/API-TRM/WZY/xhs_server/models/post.py
new file mode 100644
index 0000000..ab99191
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/post.py
@@ -0,0 +1,32 @@
+# models/post.py
+from extensions import db
+from datetime import datetime
+
+# association table for Post <-> Tag
+post_tags = db.Table(
+    'post_tags',
+    db.Column('post_id', db.Integer, db.ForeignKey('posts.id', ondelete='CASCADE'), primary_key=True),
+    db.Column('tag_id', db.Integer, db.ForeignKey('tags.id', ondelete='CASCADE'), primary_key=True)
+)
+
+class Post(db.Model):
+    __tablename__ = 'posts'
+
+    id = db.Column(db.Integer, primary_key=True)
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False)
+    topic_id = db.Column(db.Integer, db.ForeignKey('topics.id', ondelete='SET NULL'))
+    type = db.Column(db.Enum('text', 'image', 'video', 'document'), default='text', nullable=False)
+    title = db.Column(db.String(255), nullable=False)
+    content = db.Column(db.Text, nullable=False)
+    media_urls = db.Column(db.JSON)
+    status = db.Column(db.Enum('draft', 'pending', 'published', 'deleted', 'rejected'),
+                       default='draft', nullable=False)
+    heat = db.Column(db.Integer, default=0, nullable=False)
+    created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
+    updated_at = db.Column(db.DateTime, default=datetime.utcnow,
+                           onupdate=datetime.utcnow, nullable=False)
+
+    # relationships
+    tags = db.relationship('Tag', secondary=post_tags, backref=db.backref('posts', lazy='dynamic'))
+    behaviors = db.relationship('Behavior', backref='post', lazy='dynamic', cascade='all, delete')
+    comments = db.relationship('Comment', backref='post', lazy='dynamic', cascade='all, delete')
diff --git a/API/API-TRM/WZY/xhs_server/models/tag.py b/API/API-TRM/WZY/xhs_server/models/tag.py
new file mode 100644
index 0000000..7753a38
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/tag.py
@@ -0,0 +1,13 @@
+# models/tag.py
+from extensions import db
+from datetime import datetime
+
+class Tag(db.Model):
+    __tablename__ = 'tags'
+
+    id = db.Column(db.Integer, primary_key=True)
+    name = db.Column(db.String(50), unique=True, nullable=False)
+    description = db.Column(db.String(255))
+    created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
+
+    # posts relationship via association table defined in post.py
diff --git a/API/API-TRM/WZY/xhs_server/models/topic.py b/API/API-TRM/WZY/xhs_server/models/topic.py
new file mode 100644
index 0000000..d0e5a2e
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/topic.py
@@ -0,0 +1,14 @@
+# models/topic.py
+from extensions import db
+from datetime import datetime
+
+class Topic(db.Model):
+    __tablename__ = 'topics'
+
+    id = db.Column(db.Integer, primary_key=True)
+    name = db.Column(db.String(100), unique=True, nullable=False)
+    description = db.Column(db.Text)
+    status = db.Column(db.Enum('active', 'archived'), default='active', nullable=False)
+    created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
+
+    posts = db.relationship('Post', backref='topic', lazy='dynamic', cascade='all, delete')
diff --git a/API/API-TRM/WZY/xhs_server/models/user.py b/API/API-TRM/WZY/xhs_server/models/user.py
new file mode 100644
index 0000000..f27e7d3
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/models/user.py
@@ -0,0 +1,68 @@
+# models/user.py
+
+from datetime import datetime
+from extensions import db
+
+# 关联表:用户关注关系
+follows = db.Table(
+    'follows',
+    db.Column('follower_id', db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), primary_key=True),
+    db.Column('followee_id', db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), primary_key=True),
+    db.Column('created_at', db.DateTime, default=datetime.utcnow, nullable=False)
+)
+
+class User(db.Model):
+    __tablename__ = 'users'
+
+    id = db.Column(db.Integer, primary_key=True)
+    username = db.Column(db.String(50), unique=True, nullable=False)
+    password = db.Column(db.String(255), nullable=False)
+    email = db.Column(db.String(100), unique=True, nullable=False)
+    avatar = db.Column(db.String(255))
+    role = db.Column(db.Enum('user', 'admin'), default='user', nullable=False)
+    bio = db.Column(db.String(255))
+    status = db.Column(db.Enum('active', 'banned', 'muted'), default='active', nullable=False)
+    created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
+    updated_at = db.Column(
+        db.DateTime,
+        default=datetime.utcnow,
+        onupdate=datetime.utcnow,
+        nullable=False
+    )
+
+    # 用户发布的帖子
+    posts = db.relationship(
+        'Post',
+        backref='author',
+        lazy='dynamic',
+        cascade='all, delete-orphan'
+    )
+
+    # 用户的互动行为
+    behaviors = db.relationship(
+        'Behavior',
+        backref='user',
+        lazy='dynamic',
+        cascade='all, delete-orphan'
+    )
+
+    # 用户发表的评论
+    comments = db.relationship(
+        'Comment',
+        backref='user',
+        lazy='dynamic',
+        cascade='all, delete-orphan'
+    )
+
+    # 用户关注的对象列表
+    following = db.relationship(
+        'User',
+        secondary=follows,
+        primaryjoin=(id == follows.c.follower_id),
+        secondaryjoin=(id == follows.c.followee_id),
+        backref=db.backref('followers', lazy='dynamic'),
+        lazy='dynamic'
+    )
+
+    def __repr__(self):
+        return f"<User {self.username!r} id={self.id}>"
diff --git a/API/API-TRM/WZY/xhs_server/readme.md b/API/API-TRM/WZY/xhs_server/readme.md
new file mode 100644
index 0000000..9fab23e
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/readme.md
@@ -0,0 +1,400 @@
+## 2. 帖子(Post)
+
+### 2.1 发布新帖
+
+```
+POST /posts
+```
+
+- **描述**:创建一条帖子
+
+- **请求头**
+
+  ```
+  Content-Type: application/json
+  ```
+
+- **请求体**
+
+  ```json
+  {
+    "user_id": 1,
+    "topic_id": 1,                    // 可选,必须是已存在 topic 的 ID
+    "title": "帖子标题",
+    "content": "正文内容",
+    "media_urls": [                   // 可选,字符串数组
+      "https://example.com/img1.jpg",
+      "https://example.com/vid1.mp4"
+    ],
+    "status": "published"             // draft|pending|published|deleted|rejected
+  }
+  ```
+
+- **成功响应**
+
+  - **状态**:201 Created
+
+  - **Body**
+
+    ```json
+    { "id": 42 }
+    ```
+
+- **错误**
+
+  - 400 Bad Request: 缺少 user_id、title 或 content
+  - 400 Bad Request: topic_id 不存在
+  - 400 Bad Request: JSON 解析错误
+  - 422 Unprocessable Entity: media_urls 格式错误
+  - 500 Internal Server Error: 外键约束或其他数据库错误
+
+------
+
+### 2.2 获取帖子列表
+
+```
+GET /posts
+```
+
+- **描述**:拉取所有 `status=published` 的帖子
+
+- **响应**
+
+  - **状态**:200 OK
+
+  - **Body**
+
+    ```json
+    [
+      {
+        "id": 42,
+        "title": "帖子标题",
+        "heat": 5,
+        "created_at": "2025-06-12T16:00:00"
+      },
+      ...
+    ]
+    ```
+
+------
+
+### 2.3 查看帖子详情
+
+```
+GET /posts/{post_id}
+```
+
+- **描述**:查看单条帖子完整信息
+
+- **路径参数**
+
+  | 参数    | 描述    |
+  | ------- | ------- |
+  | post_id | 帖子 ID |
+
+- **响应**
+
+  - **状态**:200 OK
+
+  - **Body**
+
+    ```json
+    {
+      "id": 42,
+      "user_id": 1,
+      "topic_id": 1,
+      "title": "帖子标题",
+      "content": "正文内容",
+      "media_urls": ["…"],
+      "status": "published",
+      "heat": 5,
+      "created_at": "2025-06-12T16:00:00",
+      "updated_at": "2025-06-12T16:05:00"
+    }
+    ```
+
+- **错误**
+
+  - 404 Not Found: 帖子不存在
+
+------
+
+### 2.4 修改帖子
+
+```
+PUT /posts/{post_id}
+```
+
+- **描述**:更新帖子字段
+
+- **路径参数**
+
+  | 参数    | 描述    |
+  | ------- | ------- |
+  | post_id | 帖子 ID |
+
+- **请求头**
+
+  ```
+  Content-Type: application/json
+  ```
+
+- **请求体**(所有字段可选,依需更新)
+
+  ```json
+  {
+    "title": "新标题",
+    "content": "新内容",
+    "topic_id": 2,
+    "media_urls": ["…"],
+    "status": "draft"
+  }
+  ```
+
+- **响应**
+
+  - **状态**:204 No Content
+
+- **错误**
+
+  - 400 Bad Request: JSON 格式或字段值不合法
+  - 404 Not Found: 帖子不存在
+
+------
+
+### 2.5 删除帖子
+
+```
+DELETE /posts/{post_id}
+```
+
+- **描述**:删除帖子及其关联行为、评论
+
+- **路径参数**
+
+  | 参数    | 描述    |
+  | ------- | ------- |
+  | post_id | 帖子 ID |
+
+- **响应**
+
+  - **状态**:204 No Content
+
+- **错误**
+
+  - 404 Not Found: 帖子不存在
+
+------
+
+## 3. 互动行为(Behavior)
+
+> 支持四种操作:`like`、`favorite`、`view`、`share`。其中 `like` 和 `favorite` 限制每人每帖最多一次,可撤销;`view`/`share` 不限次数,不提供撤销。
+
+### 3.1 点赞
+
+```
+POST /posts/{post_id}/like
+```
+
+- **描述**:用户点赞,热度 +1
+
+- **请求头**
+
+  ```
+  Content-Type: application/json
+  ```
+
+- **请求体**
+
+  ```json
+  { "user_id": 1 }
+  ```
+
+- **响应**
+
+  - **状态**:201 Created
+
+- **错误**
+
+  - 400 Bad Request: 已点赞过 → `{"error":"already liked"}`
+  - 400 Bad Request: 缺少 user_id
+  - 404 Not Found: 帖子或用户不存在
+
+### 3.2 取消点赞
+
+```
+DELETE /posts/{post_id}/like
+```
+
+- **描述**:撤销点赞,热度 -1(底线 0)
+
+- **请求头**
+
+  ```
+  Content-Type: application/json
+  ```
+
+- **请求体**
+
+  ```json
+  { "user_id": 1 }
+  ```
+
+- **响应**
+
+  - **状态**:204 No Content
+
+- **错误**
+
+  - 400 Bad Request: 未点赞过 → `{"error":"not liked yet"}`
+  - 404 Not Found: 帖子或用户不存在
+
+------
+
+### 3.3 收藏
+
+```
+POST /posts/{post_id}/favorite
+```
+
+- **描述**:用户收藏,热度 +1
+- **请求头/体/响应/错误**
+   与点赞接口完全一致,只把 `like` 换成 `favorite`,错误信息为 `already favorited` / `not favorited yet`。
+
+### 3.4 取消收藏
+
+```
+DELETE /posts/{post_id}/favorite
+```
+
+- **描述**:撤销收藏,热度 -1
+- **请求头/体/响应/错误**
+   同上。
+
+------
+
+### 3.5 浏览
+
+```
+POST /posts/{post_id}/view
+```
+
+- **描述**:记录一次浏览,热度 +1
+
+- **请求体**
+
+  ```json
+  { "user_id": 1 }
+  ```
+
+- **响应**
+
+  - 201 Created
+
+不支持撤销;不做去重检查。
+
+------
+
+### 3.6 分享
+
+```
+POST /posts/{post_id}/share
+```
+
+- **描述**:记录一次分享,热度 +1
+- **请求体/响应**
+   同浏览。
+
+------
+
+## 4. 评论(Comment)
+
+### 4.1 添加评论
+
+```
+POST /posts/{post_id}/comments
+```
+
+- **描述**:为帖子添加评论或回复
+
+- **请求头**
+
+  ```
+  Content-Type: application/json
+  ```
+
+- **请求体**
+
+  ```json
+  {
+    "user_id": 2,
+    "content": "这是评论内容",
+    "parent_id": 1    // 可选:回复某条评论时填,一级评论则省略
+  }
+  ```
+
+- **响应**
+
+  - **状态**:201 Created
+
+  - **Body**
+
+    ```json
+    { "id": 7 }
+    ```
+
+- **错误**
+
+  - 400 Bad Request: 缺少 user_id 或 content
+  - 404 Not Found: 帖子或 parent_id 不存在
+
+------
+
+### 4.2 获取评论列表
+
+```
+GET /posts/{post_id}/comments
+```
+
+- **描述**:拉取该帖所有一级评论及其完整回复树
+
+- **响应**
+
+  - **状态**:200 OK
+
+  - **Body**
+
+    ```json
+    [
+      {
+        "id": 1,
+        "user_id": 1,
+        "content": "一级评论",
+        "created_at": "…",
+        "replies": [
+          {
+            "id": 2,
+            "user_id": 2,
+            "content": "回复评论",
+            "created_at": "…",
+            "replies": [ … ]
+          }
+        ]
+      },
+      …
+    ]
+    ```
+
+- **错误**
+
+  - 404 Not Found: 帖子不存在
+
+------
+
+> **通用错误响应格式**
+>
+> ```json
+> {
+>   "error": "描述信息"
+> }
+> ```
\ No newline at end of file
diff --git a/API/API-TRM/WZY/xhs_server/requirements.txt b/API/API-TRM/WZY/xhs_server/requirements.txt
new file mode 100644
index 0000000..4db9d23
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/requirements.txt
@@ -0,0 +1,6 @@
+# requirements.txt
+Flask>=2.0
+Flask-SQLAlchemy>=2.5
+Flask-Migrate>=3.1
+Flask-Script>=2.0
+PyMySQL>=1.0
diff --git a/API/API-TRM/WZY/xhs_server/routes/__init__.py b/API/API-TRM/WZY/xhs_server/routes/__init__.py
new file mode 100644
index 0000000..5410dd3
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/routes/__init__.py
@@ -0,0 +1,4 @@
+# routes/__init__.py
+from flask import Blueprint
+
+# 可以在这里统一注册蓝图,也可以直接在 app.py 中 import
diff --git a/API/API-TRM/WZY/xhs_server/routes/__pycache__/__init__.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/routes/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..acde7ed
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/routes/__pycache__/__init__.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/routes/__pycache__/comments.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/routes/__pycache__/comments.cpython-312.pyc
new file mode 100644
index 0000000..4bd83ee
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/routes/__pycache__/comments.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/routes/__pycache__/posts.cpython-312.pyc b/API/API-TRM/WZY/xhs_server/routes/__pycache__/posts.cpython-312.pyc
new file mode 100644
index 0000000..a957747
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/routes/__pycache__/posts.cpython-312.pyc
Binary files differ
diff --git a/API/API-TRM/WZY/xhs_server/routes/comments.py b/API/API-TRM/WZY/xhs_server/routes/comments.py
new file mode 100644
index 0000000..2d5b654
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/routes/comments.py
@@ -0,0 +1,46 @@
+# routes/comments.py
+from flask import Blueprint, request, jsonify, abort
+from extensions      import db
+from models.comment  import Comment
+from models.behavior import Behavior
+
+comments_bp = Blueprint('comments', __name__)
+
+@comments_bp.route('', methods=['POST'])
+def add_comment(post_id):
+    data = request.get_json() or {}
+    user_id = data.get('user_id')
+    content = data.get('content')
+    if not user_id or not content:
+        return jsonify({'error': 'user_id and content required'}), 400
+
+    comment = Comment(
+        post_id=post_id,
+        user_id=user_id,
+        content=content,
+        parent_id=data.get('parent_id')
+    )
+    db.session.add(comment)
+    # 记录行为
+    beh = Behavior(user_id=user_id, post_id=post_id, type='comment')
+    db.session.add(beh)
+    db.session.commit()
+    return jsonify({'id': comment.id}), 201
+
+@comments_bp.route('', methods=['GET'])
+def list_comments(post_id):
+    def serialize(c):
+        return {
+            'id': c.id,
+            'user_id': c.user_id,
+            'content': c.content,
+            'created_at': c.created_at.isoformat(),
+            'replies': [serialize(r) for r in c.replies]
+        }
+
+    comments = Comment.query.filter_by(
+        post_id=post_id,
+        status='active',
+        parent_id=None
+    ).order_by(Comment.created_at.asc()).all()
+    return jsonify([serialize(c) for c in comments])
diff --git a/API/API-TRM/WZY/xhs_server/routes/posts.py b/API/API-TRM/WZY/xhs_server/routes/posts.py
new file mode 100644
index 0000000..e01bdd8
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/routes/posts.py
@@ -0,0 +1,150 @@
+# routes/posts.py
+from flask import Blueprint, request, jsonify, abort
+from extensions    import db
+from models.post   import Post
+from models.behavior import Behavior
+
+posts_bp = Blueprint('posts', __name__)
+
+@posts_bp.route('', methods=['POST'])
+def create_post():
+    data = request.get_json() or {}
+    post = Post(**data)
+    db.session.add(post)
+    db.session.commit()
+    return jsonify({'id': post.id}), 201
+
+@posts_bp.route('', methods=['GET'])
+def list_posts():
+    posts = Post.query.filter_by(status='published').all()
+    return jsonify([{
+        'id': p.id,
+        'title': p.title,
+        'heat': p.heat,
+        'created_at': p.created_at.isoformat()
+    } for p in posts])
+
+@posts_bp.route('/<int:post_id>', methods=['GET'])
+def get_post(post_id):
+    post = Post.query.get_or_404(post_id)
+    return jsonify({
+        'id': post.id,
+        'user_id': post.user_id,
+        'title': post.title,
+        'content': post.content,
+        'media_urls': post.media_urls,
+        'status': post.status,
+        'heat': post.heat,
+        'created_at': post.created_at.isoformat(),
+        'updated_at': post.updated_at.isoformat()
+    })
+
+@posts_bp.route('/<int:post_id>', methods=['PUT'])
+def update_post(post_id):
+    """
+    修改帖子
+    URL 参数:
+      post_id - 要修改的帖子 ID
+    JSON Body 可选字段:
+      title       (string)
+      content     (string)
+      topic_id    (int)     — 必须是 topics 表中已有的 ID
+      media_urls  (list)    — 字符串数组
+      status      (string)  — 'draft','pending','published','deleted','rejected'
+    """
+    post = Post.query.get_or_404(post_id)
+    data = request.get_json() or {}
+    # 只更新客户端传来的字段
+    for key in ('title','content','topic_id','media_urls','status'):
+        if key in data:
+            setattr(post, key, data[key])
+    db.session.commit()
+    return '', 204
+
+@posts_bp.route('/<int:post_id>', methods=['DELETE'])
+def delete_post(post_id):
+    post = Post.query.get_or_404(post_id)
+    db.session.delete(post)
+    db.session.commit()
+    return '', 204
+
+
+@posts_bp.route('/<int:post_id>/<action>', methods=['POST'])
+def post_action(post_id, action):
+    """
+    支持的 action: like, favorite, view, share
+    对于 like 和 favorite,保证每个用户每帖只做一次。
+    """
+    if action not in ('like', 'favorite', 'view', 'share'):
+        abort(400, 'Invalid action')
+
+    data = request.get_json() or {}
+    user_id = data.get('user_id')
+    if not user_id:
+        abort(400, 'user_id required')
+
+    # 对 like/favorite 做去重检查
+    if action in ('like', 'favorite'):
+        exists = Behavior.query.filter_by(
+            user_id=user_id,
+            post_id=post_id,
+            type=action
+        ).first()
+        if exists:
+            return jsonify({'error': f'already {action}d'}), 400
+
+    # 创建行为记录
+    beh = Behavior(user_id=user_id, post_id=post_id, type=action)
+    db.session.add(beh)
+
+    # 更新热度
+    post = Post.query.get_or_404(post_id)
+    post.heat += 1
+
+    db.session.commit()
+    return '', 201
+
+
+# 取消点赞
+@posts_bp.route('/<int:post_id>/like', methods=['DELETE'])
+def unlike(post_id):
+    user_id = request.get_json(silent=True) and request.get_json().get('user_id')
+    if not user_id:
+        abort(400, 'user_id required')
+    # 查找已有的 like 行为
+    beh = Behavior.query.filter_by(
+        user_id=user_id,
+        post_id=post_id,
+        type='like'
+    ).first()
+    if not beh:
+        return jsonify({'error': 'not liked yet'}), 400
+
+    db.session.delete(beh)
+    # 更新热度,确保不降到负数
+    post = Post.query.get_or_404(post_id)
+    post.heat = max(post.heat - 1, 0)
+    db.session.commit()
+    return '', 204
+
+# 取消收藏
+@posts_bp.route('/<int:post_id>/favorite', methods=['DELETE'])
+def unfavorite(post_id):
+    user_id = request.get_json(silent=True) and request.get_json().get('user_id')
+    if not user_id:
+        abort(400, 'user_id required')
+    # 查找已有的 favorite 行为
+    beh = Behavior.query.filter_by(
+        user_id=user_id,
+        post_id=post_id,
+        type='favorite'
+    ).first()
+    if not beh:
+        return jsonify({'error': 'not favorited yet'}), 400
+
+    db.session.delete(beh)
+    # 更新热度
+    post = Post.query.get_or_404(post_id)
+    post.heat = max(post.heat - 1, 0)
+    db.session.commit()
+    return '', 204
\ No newline at end of file
diff --git a/API/API-TRM/WZY/xhs_server/utils/auth.py b/API/API-TRM/WZY/xhs_server/utils/auth.py
new file mode 100644
index 0000000..24704d1
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/utils/auth.py
@@ -0,0 +1,38 @@
+# utils/auth.py
+import os
+import jwt
+from functools import wraps
+from flask import request, jsonify, current_app
+from models.user import User
+from app import db
+
+def generate_token(user_id):
+    payload = {
+        'user_id': user_id,
+        # you can add exp, iat here
+    }
+    token = jwt.encode(payload, current_app.config['SECRET_KEY'], algorithm='HS256')
+    return token
+
+def verify_token(token):
+    try:
+        payload = jwt.decode(token, current_app.config['SECRET_KEY'], algorithms=['HS256'])
+        user = User.query.get(payload['user_id'])
+        return user
+    except Exception:
+        return None
+
+def login_required(f):
+    @wraps(f)
+    def decorated(*args, **kwargs):
+        auth_header = request.headers.get('Authorization', None)
+        if not auth_header or not auth_header.startswith('Bearer '):
+            return jsonify({'error': 'Authorization header missing or invalid'}), 401
+        token = auth_header.split()[1]
+        user = verify_token(token)
+        if not user or user.status != 'active':
+            return jsonify({'error': 'Invalid or expired token'}), 401
+        # attach user to request context if needed
+        request.current_user = user
+        return f(*args, **kwargs)
+    return decorated
diff --git a/API/API-TRM/WZY/xhs_server/utils/serializers.py b/API/API-TRM/WZY/xhs_server/utils/serializers.py
new file mode 100644
index 0000000..1ed5445
--- /dev/null
+++ b/API/API-TRM/WZY/xhs_server/utils/serializers.py
@@ -0,0 +1,16 @@
+# utils/serializers.py
+from marshmallow import Schema, fields, validate, ValidationError
+
+class PostSchema(Schema):
+    user_id = fields.Int(required=True)
+    topic_id = fields.Int(required=False, allow_none=True)
+    type = fields.Str(validate=validate.OneOf(['text','image','video','document']), missing='text')
+    title = fields.Str(required=True, validate=validate.Length(min=1, max=255))
+    content = fields.Str(required=True)
+    media_urls = fields.List(fields.Url(), required=False)
+    status = fields.Str(validate=validate.OneOf(['draft','pending','published','deleted','rejected']), missing='draft')
+
+class CommentSchema(Schema):
+    user_id = fields.Int(required=True)
+    content = fields.Str(required=True, validate=validate.Length(min=1))
+    parent_id = fields.Int(required=False, allow_none=True)
diff --git a/all_tables.sql b/all_tables.sql
index f1e8547..0510e25 100644
--- a/all_tables.sql
+++ b/all_tables.sql
@@ -40,7 +40,7 @@
     password VARCHAR(255) NOT NULL COMMENT '加密密码',
     email VARCHAR(100) NOT NULL UNIQUE COMMENT '邮箱',
     avatar VARCHAR(255) COMMENT '头像URL',
-    role ENUM('user', 'admin') DEFAULT 'user' COMMENT '角色',
+    role ENUM('superadmin', 'user', 'admin') DEFAULT 'user' COMMENT '角色',
     bio VARCHAR(255) COMMENT '个人简介',
     status ENUM('active', 'banned', 'muted') DEFAULT 'active' COMMENT '账号状态',
     created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
diff --git a/git b/git
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/git
diff --git a/xiaohongshu-upload-platform/src/ljc/back_end/app.py b/xiaohongshu-upload-platform/src/ljc/back_end/app.py
new file mode 100644
index 0000000..cb62a4d
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/back_end/app.py
@@ -0,0 +1,460 @@
+from flask import Flask, jsonify, request, session
+from flask_sqlalchemy import SQLAlchemy
+from flask_cors import CORS
+
+app = Flask(__name__)
+app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:123456@10.126.59.25/redbook'
+app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
+app.secret_key = 'your_secret_key'
+CORS(app, supports_credentials=True)
+
+db = SQLAlchemy(app)
+
+# 模型定义
+# 用户表
+class User(db.Model):
+    __tablename__ = 'users'
+    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='用户ID')
+    username = db.Column(db.String(50), unique=True, nullable=False, comment='用户名')
+    password = db.Column(db.String(255), nullable=False, comment='加密密码')
+    email = db.Column(db.String(100), unique=True, nullable=False, comment='邮箱')
+    avatar = db.Column(db.String(255), comment='头像URL')
+    role = db.Column(db.Enum('superadmin', 'user', 'admin'), default='user', comment='角色')
+    bio = db.Column(db.String(255), comment='个人简介')
+    status = db.Column(db.Enum('active', 'banned', 'muted'), default='active', comment='账号状态')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='创建时间')
+    updated_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), 
+                          onupdate=db.func.current_timestamp(), comment='更新时间')
+    
+    # 关系定义
+    posts = db.relationship('Post', backref='author', lazy=True)
+    behaviors = db.relationship('Behavior', backref='user', lazy=True)
+    comments = db.relationship('Comment', backref='commenter', lazy=True)
+    notifications = db.relationship('Notification', backref='recipient', lazy=True)
+    audits = db.relationship('Audit', backref='admin', lazy=True)
+    logs = db.relationship('Log', backref='logger', lazy=True)
+    user_tags = db.relationship('UserTag', backref='user', lazy=True)
+
+# 标签表
+class Tag(db.Model):
+    __tablename__ = 'tags'
+    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='标签ID')
+    name = db.Column(db.String(50), unique=True, nullable=False, comment='标签名称')
+    description = db.Column(db.String(255), comment='标签描述')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='创建时间')
+    
+    # 关系定义
+    post_tags = db.relationship('PostTag', backref='tag', lazy=True)
+    user_tags = db.relationship('UserTag', backref='tag', lazy=True)
+
+# 话题/超话表
+class Topic(db.Model):
+    __tablename__ = 'topics'
+    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='话题ID')
+    name = db.Column(db.String(100), unique=True, nullable=False, comment='话题名称')
+    description = db.Column(db.Text, comment='话题描述')
+    status = db.Column(db.Enum('active', 'archived'), default='active', comment='状态')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='创建时间')
+    
+    # 关系定义
+    posts = db.relationship('Post', backref='topic', lazy=True)
+
+# 内容帖子表
+class Post(db.Model):
+    __tablename__ = 'posts'
+    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='帖子ID')
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False, comment='作者ID')
+    topic_id = db.Column(db.Integer, db.ForeignKey('topics.id', ondelete='SET NULL'), comment='所属话题ID')
+    type = db.Column(db.Enum('text', 'image', 'video', 'document'), default='text', comment='内容类型')
+    title = db.Column(db.String(255), nullable=False, comment='标题')
+    content = db.Column(db.Text, nullable=False, comment='正文内容')
+    media_urls = db.Column(db.JSON, comment='媒体资源URL数组')
+    status = db.Column(db.Enum('draft', 'pending', 'published', 'deleted', 'rejected'), default='draft', comment='状态')
+    heat = db.Column(db.Integer, default=0, comment='热度值')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='创建时间')
+    updated_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), 
+                          onupdate=db.func.current_timestamp(), comment='更新时间')
+    
+    # 关系定义
+    behaviors = db.relationship('Behavior', backref='post', lazy=True)
+    comments = db.relationship('Comment', backref='post', lazy=True)
+    post_tags = db.relationship('PostTag', backref='post', lazy=True)
+    audits = db.relationship('Audit', backref='post', lazy=True)
+
+# 帖子标签关联表
+class PostTag(db.Model):
+    __tablename__ = 'post_tags'
+    post_id = db.Column(db.Integer, db.ForeignKey('posts.id', ondelete='CASCADE'), primary_key=True, comment='帖子ID')
+    tag_id = db.Column(db.Integer, db.ForeignKey('tags.id', ondelete='CASCADE'), primary_key=True, comment='标签ID')
+
+# 用户行为表
+class Behavior(db.Model):
+    __tablename__ = 'behaviors'
+    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True, comment='行为ID')
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False, comment='用户ID')
+    post_id = db.Column(db.Integer, db.ForeignKey('posts.id', ondelete='CASCADE'), nullable=False, comment='帖子ID')
+    type = db.Column(db.Enum('like', 'comment', 'favorite', 'view', 'share'), nullable=False, comment='行为类型')
+    value = db.Column(db.Integer, default=1, comment='行为值')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='行为时间')
+
+# 评论表
+class Comment(db.Model):
+    __tablename__ = 'comments'
+    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='评论ID')
+    post_id = db.Column(db.Integer, db.ForeignKey('posts.id', ondelete='CASCADE'), nullable=False, comment='帖子ID')
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False, comment='用户ID')
+    parent_id = db.Column(db.Integer, db.ForeignKey('comments.id', ondelete='CASCADE'), comment='父评论ID')
+    content = db.Column(db.Text, nullable=False, comment='评论内容')
+    status = db.Column(db.Enum('active', 'deleted'), default='active', comment='状态')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='创建时间')
+    updated_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), 
+                          onupdate=db.func.current_timestamp(), comment='更新时间')
+    
+    # 关系定义
+    replies = db.relationship('Comment', backref=db.backref('parent', remote_side=[id]), lazy=True)
+
+# 用户关注关系表
+class Follow(db.Model):
+    __tablename__ = 'follows'
+    follower_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), primary_key=True, comment='关注者ID')
+    followee_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), primary_key=True, comment='被关注者ID')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='关注时间')
+    
+    # 关系定义
+    follower = db.relationship('User', foreign_keys=[follower_id], backref='following')
+    followee = db.relationship('User', foreign_keys=[followee_id], backref='followers')
+
+# 通知表
+class Notification(db.Model):
+    __tablename__ = 'notifications'
+    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='通知ID')
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False, comment='接收用户ID')
+    type = db.Column(db.Enum('like', 'comment', 'follow', 'system', 'audit'), nullable=False, comment='通知类型')
+    content = db.Column(db.JSON, nullable=False, comment='通知内容')
+    is_read = db.Column(db.Boolean, default=False, comment='是否已读')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='创建时间')
+
+# 审核记录表
+class Audit(db.Model):
+    __tablename__ = 'audits'
+    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='审核ID')
+    post_id = db.Column(db.Integer, db.ForeignKey('posts.id', ondelete='CASCADE'), nullable=False, comment='帖子ID')
+    admin_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False, comment='管理员ID')
+    result = db.Column(db.Enum('approved', 'rejected'), nullable=False, comment='审核结果')
+    reason = db.Column(db.String(255), comment='审核原因')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='审核时间')
+
+# 日志表
+class Log(db.Model):
+    __tablename__ = 'logs'
+    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True, comment='日志ID')
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='SET NULL'), comment='用户ID')
+    type = db.Column(db.Enum('access', 'error', 'behavior', 'system'), nullable=False, comment='日志类型')
+    content = db.Column(db.Text, nullable=False, comment='日志内容')
+    ip = db.Column(db.String(45), comment='IP地址')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='记录时间')
+
+# 用户兴趣标签表
+class UserTag(db.Model):
+    __tablename__ = 'user_tags'
+    user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'), primary_key=True, comment='用户ID')
+    tag_id = db.Column(db.Integer, db.ForeignKey('tags.id', ondelete='CASCADE'), primary_key=True, comment='标签ID')
+    weight = db.Column(db.Float, default=1.0, comment='兴趣权重')
+    created_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), comment='创建时间')
+    updated_at = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp(), 
+                          onupdate=db.func.current_timestamp(), comment='更新时间')
+    
+
+# 自动登录用户11
+@app.before_request
+def auto_login():
+    # 如果用户未登录,自动设置为用户11
+    if 'user_id' not in session:
+        session['user_id'] = 11
+
+# 获取当前用户信息
+@app.route('/api/current-user')
+def current_user():
+    user_id = session.get('user_id', 1)
+    user = User.query.get(user_id)
+    if not user:
+        return jsonify({'error': 'User not found'}), 404
+    
+    following_count = Follow.query.filter_by(follower_id=user_id).count()
+    followers_count = Follow.query.filter_by(followee_id=user_id).count()
+    
+    return jsonify({
+        'id': user.id,
+        'username': user.username,
+        'email': user.email,
+        'avatar': user.avatar,
+        'bio': user.bio,
+        'following_count': following_count,
+        'followers_count': followers_count
+    })
+
+# 获取指定用户信息
+@app.route('/api/user/<int:user_id>')
+def get_user(user_id):
+    current_user_id = session.get('user_id', 1)
+    user = User.query.get(user_id)
+    if not user:
+        return jsonify({'error': 'User not found'}), 404
+    
+    following_count = Follow.query.filter_by(follower_id=user_id).count()
+    followers_count = Follow.query.filter_by(followee_id=user_id).count()
+    
+    is_following = False
+    if current_user_id:
+        is_following = Follow.query.filter_by(
+            follower_id=current_user_id,
+            followee_id=user_id
+        ).first() is not None
+    
+    return jsonify({
+        'id': user.id,
+        'username': user.username,
+        'avatar': user.avatar,
+        'bio': user.bio,
+        'following_count': following_count,
+        'followers_count': followers_count,
+        'is_following': is_following
+    })
+
+# 更新用户信息
+@app.route('/api/user/<int:user_id>', methods=['PUT'])
+def update_user(user_id):
+    current_user_id = session.get('user_id', 1)
+    if current_user_id != user_id:
+        return jsonify({'error': 'Unauthorized'}), 403
+    
+    user = User.query.get(user_id)
+    if not user:
+        return jsonify({'error': 'User not found'}), 404
+    
+    data = request.json
+    if 'avatar' in data:
+        user.avatar = data['avatar']
+    if 'bio' in data:
+        user.bio = data['bio']
+    
+    db.session.commit()
+    return jsonify({
+        'id': user.id,
+        'avatar': user.avatar,
+        'bio': user.bio
+    })
+
+# 获取用户收藏
+@app.route('/api/user/<int:user_id>/favorites', methods=['GET'])
+def get_user_favorites(user_id):
+    # 检查用户是否登录
+    if 'user_id' not in session:
+        return jsonify({'error': '未登录'}), 401
+    
+    # 验证请求的用户ID与登录用户ID是否一致
+    if session['user_id'] != user_id:
+        return jsonify({'error': '无权访问其他用户的收藏'}), 403
+    
+    try:
+        # 获取收藏行为及其关联的帖子
+        favorites = db.session.query(Behavior, Post).join(
+            Post, Behavior.post_id == Post.id
+        ).filter(
+            Behavior.user_id == user_id,
+            Behavior.type == 'favorite'
+        ).all()
+        
+        # 构建响应数据
+        result = []
+        for behavior, post in favorites:
+            # 获取帖子作者信息
+            author = User.query.get(post.user_id)
+            
+            # 构建响应对象
+            result.append({
+                'behavior_id': behavior.id,
+                'post': {
+                    'id': post.id,
+                    'title': post.title,
+                    'type': post.type,
+                    'content_preview': post.content[:100] + '...' if len(post.content) > 100 else post.content,
+                    'media_urls': post.media_urls,
+                    'created_at': post.created_at.strftime('%Y-%m-%d %H:%M:%S'),
+                    'author': {
+                        'id': author.id,
+                        'username': author.username,
+                        'avatar': author.avatar
+                    }
+                },
+                'favorited_at': behavior.created_at.strftime('%Y-%m-%d %H:%M:%S')
+            })
+        
+        return jsonify(result)
+    
+    except Exception as e:
+        app.logger.error(f"获取收藏时出错: {str(e)}")
+        return jsonify({'error': '获取收藏失败'}), 500
+    
+
+# 获取用户发布的帖子
+@app.route('/api/user/<int:user_id>/posts')
+def get_user_posts(user_id):
+    # 允许任何人查看用户发布的帖子
+    posts = Post.query.filter_by(
+        user_id=user_id,
+        status='published'
+    ).all()
+    
+    return jsonify([{
+        'id': post.id,
+        'title': post.title,
+        'content': post.content[:100] + '...' if len(post.content) > 100 else post.content,
+        'type': post.type,
+        'heat': post.heat,
+        'created_at': post.created_at.strftime('%Y-%m-%d %H:%M')
+    } for post in posts])
+
+# 获取用户关注列表
+@app.route('/api/user/<int:user_id>/following')
+def get_user_following(user_id):
+    # 允许任何人查看用户的关注列表
+    following = Follow.query.filter_by(follower_id=user_id).all()
+    
+    # 获取被关注用户的详细信息
+    following_list = []
+    for follow in following:
+        user = User.query.get(follow.followee_id)
+        if user:
+            followers_count = Follow.query.filter_by(followee_id=user.id).count()
+            
+            following_list.append({
+                'id': user.id,
+                'username': user.username,
+                'avatar': user.avatar,
+                'followers_count': followers_count
+            })
+    
+    return jsonify(following_list)
+
+# 关注/取消关注用户
+@app.route('/api/follow/<int:followee_id>', methods=['POST', 'DELETE'])
+def follow_user(followee_id):
+    follower_id = session.get('user_id', 1)
+    if follower_id == followee_id:
+        return jsonify({'error': 'Cannot follow yourself'}), 400
+    
+    if request.method == 'POST':
+        existing = Follow.query.filter_by(
+            follower_id=follower_id,
+            followee_id=followee_id
+        ).first()
+        
+        if not existing:
+            follow = Follow(
+                follower_id=follower_id,
+                followee_id=followee_id
+            )
+            db.session.add(follow)
+            db.session.commit()
+        return jsonify({'message': 'Followed successfully'})
+    
+    elif request.method == 'DELETE':
+        follow = Follow.query.filter_by(
+            follower_id=follower_id,
+            followee_id=followee_id
+        ).first()
+        
+        if follow:
+            db.session.delete(follow)
+            db.session.commit()
+        return jsonify({'message': 'Unfollowed successfully'})
+    
+
+# 新增获取粉丝列表的API
+@app.route('/api/user/<int:user_id>/followers')
+def get_user_followers(user_id):
+    try:
+        # 查询关注该用户的用户列表
+        followers = db.session.query(User).join(
+            Follow, Follow.follower_id == User.id
+        ).filter(
+            Follow.followee_id == user_id
+        ).all()
+        
+        # 获取当前登录用户ID(如果有)
+        current_user_id = session.get('user_id') if 'user_id' in session else None
+        
+        # 构建响应数据
+        result = []
+        for user in followers:
+            # 检查当前用户是否关注了这个粉丝
+            is_following = False
+            if current_user_id:
+                follow_relation = Follow.query.filter_by(
+                    follower_id=current_user_id,
+                    followee_id=user.id
+                ).first()
+                is_following = follow_relation is not None
+            
+            # 计算该粉丝的粉丝数
+            followers_count = Follow.query.filter_by(followee_id=user.id).count()
+            
+            result.append({
+                'id': user.id,
+                'username': user.username,
+                'avatar': user.avatar,
+                'bio': user.bio,
+                'followers_count': followers_count,
+                'is_following': is_following
+            })
+
+        
+        return jsonify({
+            'success': True,
+            'data': result
+        })
+    
+    except Exception as e:
+        app.logger.error(f"获取粉丝列表失败: {str(e)}")
+        return jsonify({
+            'success': False,
+            'error': '获取粉丝列表失败'
+        }), 500
+
+# 辅助函数:检查当前用户是否关注了目标用户
+def check_following_status(follower_id, followee_id):
+    return Follow.query.filter_by(
+        follower_id=follower_id,
+        followee_id=followee_id
+    ).first() is not None
+
+
+# 记录用户点赞收藏总数
+@app.route('/api/user/<int:user_id>/interactions', methods=['GET'])
+def get_user_interactions(user_id):
+    try:
+        # 计算用户的获赞总数(所有帖子的点赞数)
+        like_count = db.session.query(db.func.sum(Behavior.value)).filter(
+            Behavior.post.has(user_id=user_id),
+            Behavior.type == 'like'
+        ).scalar() or 0
+        
+        # 计算用户的收藏总数(所有帖子的收藏数)
+        favorite_count = db.session.query(db.func.sum(Behavior.value)).filter(
+            Behavior.post.has(user_id=user_id),
+            Behavior.type == 'favorite'
+        ).scalar() or 0
+        
+        return jsonify({
+            'likes_count': like_count,
+            'favorites_count': favorite_count
+        })
+    
+    except Exception as e:
+        app.logger.error(f"获取用户互动数据失败: {str(e)}")
+        return jsonify({'error': '获取互动数据失败'}), 500
+
+
+if __name__ == '__main__':
+    app.run(debug=True)
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/.gitignore b/xiaohongshu-upload-platform/src/ljc/personalpage/.gitignore
new file mode 100644
index 0000000..4d29575
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/.gitignore
@@ -0,0 +1,23 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/README.md b/xiaohongshu-upload-platform/src/ljc/personalpage/README.md
new file mode 100644
index 0000000..58beeac
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/README.md
@@ -0,0 +1,70 @@
+# Getting Started with Create React App
+
+This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### `npm start`
+
+Runs the app in the development mode.\
+Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
+
+The page will reload when you make changes.\
+You may also see any lint errors in the console.
+
+### `npm test`
+
+Launches the test runner in the interactive watch mode.\
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
+
+### `npm run build`
+
+Builds the app for production to the `build` folder.\
+It correctly bundles React in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.\
+Your app is ready to be deployed!
+
+See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
+
+### `npm run eject`
+
+**Note: this is a one-way operation. Once you `eject`, you can't go back!**
+
+If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
+
+Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
+
+You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
+
+## Learn More
+
+You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
+
+To learn React, check out the [React documentation](https://reactjs.org/).
+
+### Code Splitting
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
+
+### Analyzing the Bundle Size
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
+
+### Making a Progressive Web App
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
+
+### Advanced Configuration
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
+
+### Deployment
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
+
+### `npm run build` fails to minify
+
+This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/package.json b/xiaohongshu-upload-platform/src/ljc/personalpage/package.json
new file mode 100644
index 0000000..9cd7e67
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/package.json
@@ -0,0 +1,49 @@
+{
+  "name": "personalpage",
+  "version": "0.1.0",
+  "private": true,
+  "dependencies": {
+    "@emotion/react": "^11.14.0",
+    "@emotion/styled": "^11.14.0",
+    "@mui/icons-material": "^7.1.1",
+    "@mui/material": "^7.1.1",
+    "@testing-library/dom": "^10.4.0",
+    "@testing-library/jest-dom": "^6.6.3",
+    "@testing-library/react": "^16.3.0",
+    "@testing-library/user-event": "^13.5.0",
+    "ajv": "^8.0.0",
+    "ajv-keywords": "^5.0.0",
+    "axios": "^1.9.0",
+    "mui": "^0.0.1",
+    "react": "^19.1.0",
+    "react-dom": "^19.1.0",
+    "react-icons": "^5.5.0",
+    "react-router-dom": "^6.30.1",
+    "react-scripts": "5.0.1",
+    "web-vitals": "^2.1.4"
+  },
+  "scripts": {
+    "start": "react-scripts start",
+    "build": "react-scripts build",
+    "test": "react-scripts test",
+    "eject": "react-scripts eject"
+  },
+  "eslintConfig": {
+    "extends": [
+      "react-app",
+      "react-app/jest"
+    ]
+  },
+  "browserslist": {
+    "production": [
+      ">0.2%",
+      "not dead",
+      "not op_mini all"
+    ],
+    "development": [
+      "last 1 chrome version",
+      "last 1 firefox version",
+      "last 1 safari version"
+    ]
+  }
+}
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/public/favicon.ico b/xiaohongshu-upload-platform/src/ljc/personalpage/public/favicon.ico
new file mode 100644
index 0000000..a11777c
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/public/favicon.ico
Binary files differ
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/public/index.html b/xiaohongshu-upload-platform/src/ljc/personalpage/public/index.html
new file mode 100644
index 0000000..aa069f2
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/public/index.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="theme-color" content="#000000" />
+    <meta
+      name="description"
+      content="Web site created using create-react-app"
+    />
+    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
+    <!--
+      manifest.json provides metadata used when your web app is installed on a
+      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
+    -->
+    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
+    <!--
+      Notice the use of %PUBLIC_URL% in the tags above.
+      It will be replaced with the URL of the `public` folder during the build.
+      Only files inside the `public` folder can be referenced from the HTML.
+
+      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
+      work correctly both with client-side routing and a non-root public URL.
+      Learn how to configure a non-root public URL by running `npm run build`.
+    -->
+    <title>React App</title>
+  </head>
+  <body>
+    <noscript>You need to enable JavaScript to run this app.</noscript>
+    <div id="root"></div>
+    <!--
+      This HTML file is a template.
+      If you open it directly in the browser, you will see an empty page.
+
+      You can add webfonts, meta tags, or analytics to this file.
+      The build step will place the bundled scripts into the <body> tag.
+
+      To begin the development, run `npm start` or `yarn start`.
+      To create a production bundle, use `npm run build` or `yarn build`.
+    -->
+  </body>
+</html>
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/public/logo192.png b/xiaohongshu-upload-platform/src/ljc/personalpage/public/logo192.png
new file mode 100644
index 0000000..fc44b0a
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/public/logo192.png
Binary files differ
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/public/logo512.png b/xiaohongshu-upload-platform/src/ljc/personalpage/public/logo512.png
new file mode 100644
index 0000000..a4e47a6
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/public/logo512.png
Binary files differ
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/public/manifest.json b/xiaohongshu-upload-platform/src/ljc/personalpage/public/manifest.json
new file mode 100644
index 0000000..080d6c7
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/public/manifest.json
@@ -0,0 +1,25 @@
+{
+  "short_name": "React App",
+  "name": "Create React App Sample",
+  "icons": [
+    {
+      "src": "favicon.ico",
+      "sizes": "64x64 32x32 24x24 16x16",
+      "type": "image/x-icon"
+    },
+    {
+      "src": "logo192.png",
+      "type": "image/png",
+      "sizes": "192x192"
+    },
+    {
+      "src": "logo512.png",
+      "type": "image/png",
+      "sizes": "512x512"
+    }
+  ],
+  "start_url": ".",
+  "display": "standalone",
+  "theme_color": "#000000",
+  "background_color": "#ffffff"
+}
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/public/robots.txt b/xiaohongshu-upload-platform/src/ljc/personalpage/public/robots.txt
new file mode 100644
index 0000000..e9e57dc
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/public/robots.txt
@@ -0,0 +1,3 @@
+# https://www.robotstxt.org/robotstxt.html
+User-agent: *
+Disallow:
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.css b/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.css
new file mode 100644
index 0000000..74b5e05
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.css
@@ -0,0 +1,38 @@
+.App {
+  text-align: center;
+}
+
+.App-logo {
+  height: 40vmin;
+  pointer-events: none;
+}
+
+@media (prefers-reduced-motion: no-preference) {
+  .App-logo {
+    animation: App-logo-spin infinite 20s linear;
+  }
+}
+
+.App-header {
+  background-color: #282c34;
+  min-height: 100vh;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  font-size: calc(10px + 2vmin);
+  color: white;
+}
+
+.App-link {
+  color: #61dafb;
+}
+
+@keyframes App-logo-spin {
+  from {
+    transform: rotate(0deg);
+  }
+  to {
+    transform: rotate(360deg);
+  }
+}
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.js b/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.js
new file mode 100644
index 0000000..ed241f4
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.js
@@ -0,0 +1,77 @@
+import React from 'react';
+import { BrowserRouter, Routes, Route, Navigate, useParams } from 'react-router-dom';
+import UserProfile from './components/UserProfile';
+import { FaHome, FaSearch, FaPlus, FaHeart, FaUser } from 'react-icons/fa';
+
+function App() {
+  return (
+    <BrowserRouter>
+      <div className="min-h-screen bg-gray-50">
+        {/* 顶部导航栏 */}
+        <header className="bg-white shadow-sm sticky top-0 z-10">
+          <div className="max-w-6xl mx-auto px-4 py-3 flex justify-between items-center">
+            <div className="flex items-center">
+              <div className="text-2xl font-bold text-red-500 mr-2">小红书</div>
+              <div className="hidden md:block text-sm text-gray-500">发现美好生活</div>
+            </div>
+            <div className="flex space-x-4">
+              <a href="/user/11" className="text-gray-600 hover:text-red-500">
+                用户11
+              </a>
+              <a href="/user/2" className="text-gray-600 hover:text-red-500">
+                用户2
+              </a>
+              <a href="/user/3" className="text-gray-600 hover:text-red-500">
+                用户3
+              </a>
+            </div>
+          </div>
+        </header>
+
+        <main className="py-5">
+          <div className="max-w-6xl mx-auto">
+            <Routes>
+              <Route path="/" element={<Navigate to="/user/11" replace />} />
+              <Route path="/user/:userId" element={<UserProfileRoute />} />
+            </Routes>
+          </div>
+        </main>
+
+        {/* 小红书风格底部导航栏 */}
+        <div className="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 py-2 z-10">
+          <div className="max-w-md mx-auto grid grid-cols-5">
+            <button className="flex flex-col items-center text-red-500">
+              <FaHome className="text-xl" />
+              <span className="text-xs mt-1">首页</span>
+            </button>
+            <button className="flex flex-col items-center text-gray-500">
+              <FaSearch className="text-xl" />
+              <span className="text-xs mt-1">发现</span>
+            </button>
+            <button className="flex flex-col items-center text-gray-500">
+              <div className="bg-red-500 rounded-full p-2 -mt-3">
+                <FaPlus className="text-white text-lg" />
+              </div>
+              <span className="text-xs mt-2">发布</span>
+            </button>
+            <button className="flex flex-col items-center text-gray-500">
+              <FaHeart className="text-xl" />
+              <span className="text-xs mt-1">消息</span>
+            </button>
+            <button className="flex flex-col items-center text-gray-500">
+              <FaUser className="text-xl" />
+              <span className="text-xs mt-1">我</span>
+            </button>
+          </div>
+        </div>
+      </div>
+    </BrowserRouter>
+  );
+}
+
+function UserProfileRoute() {
+  const { userId } = useParams();
+  return <UserProfile userId={parseInt(userId)} />;
+}
+
+export default App;
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.test.js b/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.test.js
new file mode 100644
index 0000000..1f03afe
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/App.test.js
@@ -0,0 +1,8 @@
+import { render, screen } from '@testing-library/react';
+import App from './App';
+
+test('renders learn react link', () => {
+  render(<App />);
+  const linkElement = screen.getByText(/learn react/i);
+  expect(linkElement).toBeInTheDocument();
+});
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/EditProfileForm.jsx b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/EditProfileForm.jsx
new file mode 100644
index 0000000..d33cbcb
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/EditProfileForm.jsx
@@ -0,0 +1,116 @@
+import React, { useState } from 'react';
+import { FaCamera, FaTimes } from 'react-icons/fa';
+
+const EditProfileForm = ({ user, onSave, onCancel }) => {
+  const [avatar, setAvatar] = useState(user.avatar || '');
+  const [bio, setBio] = useState(user.bio || '');
+  const [gender, setGender] = useState('secret');
+  const [birthday, setBirthday] = useState('');
+  const [location, setLocation] = useState('');
+
+  const handleSubmit = (e) => {
+    e.preventDefault();
+    onSave({ avatar, bio });
+  };
+
+  return (
+    <form onSubmit={handleSubmit}>
+      <div className="mb-6">
+        <label className="block text-sm font-medium text-gray-700 mb-2">头像</label>
+        <div className="flex items-center">
+          <div className="relative">
+            <div className="w-20 h-20 rounded-full bg-gradient-to-r from-pink-300 to-orange-300 flex items-center justify-center">
+              {avatar ? (
+                <img src={avatar} alt="Avatar" className="w-full h-full rounded-full" />
+              ) : (
+                <div className="text-white text-2xl">{user.username.charAt(0)}</div>
+              )}
+            </div>
+            <button 
+              type="button"
+              className="absolute bottom-0 right-0 bg-white rounded-full p-1 shadow-md"
+            >
+              <FaCamera className="text-gray-700 text-sm" />
+            </button>
+          </div>
+          <div className="ml-4">
+            <input
+              type="text"
+              value={avatar}
+              onChange={(e) => setAvatar(e.target.value)}
+              placeholder="输入头像URL"
+              className="w-full rounded-md border-gray-300 shadow-sm text-sm"
+            />
+          </div>
+        </div>
+      </div>
+      
+      <div className="mb-4">
+        <label className="block text-sm font-medium text-gray-700 mb-2">个人简介</label>
+        <textarea
+          value={bio}
+          onChange={(e) => setBio(e.target.value)}
+          rows="3"
+          maxLength="100"
+          className="mt-1 block w-full rounded-md border-gray-300 shadow-sm text-sm"
+          placeholder="介绍一下自己吧~"
+        />
+        <div className="text-right text-xs text-gray-500 mt-1">{bio.length}/100</div>
+      </div>
+      
+      <div className="grid grid-cols-2 gap-4 mb-4">
+        <div>
+          <label className="block text-sm font-medium text-gray-700 mb-2">性别</label>
+          <select
+            value={gender}
+            onChange={(e) => setGender(e.target.value)}
+            className="mt-1 block w-full rounded-md border-gray-300 shadow-sm text-sm"
+          >
+            <option value="secret">保密</option>
+            <option value="male">男</option>
+            <option value="female">女</option>
+          </select>
+        </div>
+        
+        <div>
+          <label className="block text-sm font-medium text-gray-700 mb-2">生日</label>
+          <input
+            type="date"
+            value={birthday}
+            onChange={(e) => setBirthday(e.target.value)}
+            className="mt-1 block w-full rounded-md border-gray-300 shadow-sm text-sm"
+          />
+        </div>
+      </div>
+      
+      <div className="mb-6">
+        <label className="block text-sm font-medium text-gray-700 mb-2">地区</label>
+        <input
+          type="text"
+          value={location}
+          onChange={(e) => setLocation(e.target.value)}
+          placeholder="填写你所在的城市"
+          className="mt-1 block w-full rounded-md border-gray-300 shadow-sm text-sm"
+        />
+      </div>
+      
+      <div className="flex justify-end space-x-3">
+        <button 
+          type="button"
+          onClick={onCancel}
+          className="px-5 py-2 bg-gray-100 text-gray-700 rounded-full text-sm hover:bg-gray-200"
+        >
+          取消
+        </button>
+        <button 
+          type="submit"
+          className="px-5 py-2 bg-red-500 text-white rounded-full text-sm hover:bg-red-600"
+        >
+          保存
+        </button>
+      </div>
+    </form>
+  );
+};
+
+export default EditProfileForm;
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/FavoritePosts.jsx b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/FavoritePosts.jsx
new file mode 100644
index 0000000..4033d7b
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/FavoritePosts.jsx
@@ -0,0 +1,95 @@
+import React, { useState, useEffect } from 'react';
+import { getFavorites } from '../services/api';
+import { FaHeart } from 'react-icons/fa';
+
+const FavoritePosts = ({ userId }) => {
+  const [favorites, setFavorites] = useState([]);
+  const [loading, setLoading] = useState(true);
+
+  useEffect(() => {
+    const fetchFavorites = async () => {
+      try {
+        setLoading(true);
+        const response = await getFavorites(userId);
+        setFavorites(response.data);
+      } catch (error) {
+        console.error('Failed to fetch favorites:', error);
+      } finally {
+        setLoading(false);
+      }
+    };
+    
+    if (userId) {
+      fetchFavorites();
+    }
+  }, [userId]);
+
+  if (loading) {
+    return (
+      <div className="grid grid-cols-2 md:grid-cols-3 gap-4">
+        {[1, 2, 3, 4, 5, 6].map(item => (
+          <div key={item} className="bg-gray-100 rounded-xl aspect-square animate-pulse"></div>
+        ))}
+      </div>
+    );
+  }
+
+  if (favorites.length === 0) {
+    return (
+      <div className="text-center py-16">
+        <div className="inline-flex items-center justify-center w-16 h-16 rounded-full bg-red-100 text-red-500 mb-4">
+          <FaHeart className="text-2xl" />
+        </div>
+        <h3 className="text-lg font-medium text-gray-900">暂无收藏内容</h3>
+        <p className="mt-1 text-gray-500">你还没有收藏任何笔记</p>
+      </div>
+    );
+  }
+
+  // 模拟瀑布流布局数据
+  const waterfallData = favorites.map(post => ({
+    ...post,
+    height: Math.floor(Math.random() * 100) + 200 // 随机高度
+  }));
+
+  return (
+    <div className="grid grid-cols-2 md:grid-cols-3 gap-4">
+      {waterfallData.map(post => (
+        <div 
+          key={post.id} 
+          className="bg-white rounded-xl overflow-hidden shadow-sm hover:shadow-md transition-shadow"
+        >
+          <div 
+            className="relative bg-gray-200" 
+            style={{ height: `${post.height}px` }}
+          >
+            {/* 占位图片 */}
+            <div className="absolute inset-0 bg-gradient-to-br from-pink-100 to-orange-100"></div>
+            
+            {/* 类型标签 */}
+            <div className="absolute top-2 right-2 bg-black bg-opacity-50 text-white text-xs px-2 py-1 rounded-full">
+              {post.type === 'image' ? '图文' : 
+               post.type === 'video' ? '视频' : '文档'}
+            </div>
+            
+            {/* 收藏标记 */}
+            <div className="absolute bottom-2 right-2 bg-red-500 rounded-full p-1">
+              <FaHeart className="text-white text-xs" />
+            </div>
+          </div>
+          
+          <div className="p-3">
+            <h3 className="font-medium line-clamp-2">{post.title}</h3>
+            <div className="flex items-center mt-2 text-xs text-gray-500">
+              <span>❤️ 2.5k</span>
+              <span className="mx-2">•</span>
+              <span>⭐ 156</span>
+            </div>
+          </div>
+        </div>
+      ))}
+    </div>
+  );
+};
+
+export default FavoritePosts;
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/FollowButton.jsx b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/FollowButton.jsx
new file mode 100644
index 0000000..9e738d4
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/FollowButton.jsx
@@ -0,0 +1,33 @@
+import React from 'react';
+import { followUser, unfollowUser } from '../services/api';
+
+const FollowButton = ({ userId, isFollowing, onFollowChange }) => {
+  const handleFollow = async () => {
+    try {
+      if (isFollowing) {
+        await unfollowUser(userId);
+        onFollowChange(false);
+      } else {
+        await followUser(userId);
+        onFollowChange(true);
+      }
+    } catch (error) {
+      console.error('关注操作失败:', error);
+    }
+  };
+
+  return (
+    <button 
+      onClick={handleFollow}
+      className={`px-6 py-2 rounded-full text-sm font-medium transition-all ${
+        isFollowing 
+          ? 'bg-gray-100 text-gray-800 hover:bg-gray-200' 
+          : 'bg-red-500 text-white hover:bg-red-600'
+      }`}
+    >
+      {isFollowing ? '已关注' : '关注'}
+    </button>
+  );
+};
+
+export default FollowButton;
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/UserProfile.jsx b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/UserProfile.jsx
new file mode 100644
index 0000000..ee361de
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/components/UserProfile.jsx
@@ -0,0 +1,1144 @@
+import React, { useState, useEffect } from 'react';
+import { 
+  Box, 
+  Grid, 
+  Typography, 
+  Avatar, 
+  Button, 
+  Tabs, 
+  Tab, 
+  Card, 
+  CardMedia, 
+  CardContent, 
+  CardActions, 
+  IconButton, 
+  Divider,
+  List,
+  ListItem,
+  ListItemAvatar,
+  ListItemText,
+  TextField,
+  InputAdornment,
+  Chip,
+  Badge,
+  Fab,
+  Paper,
+  MenuItem,
+  Container,
+  useMediaQuery,
+  useTheme,
+  CircularProgress,
+  Snackbar,
+  Alert
+} from '@mui/material';
+import { 
+  CameraAlt, 
+  Edit, 
+  Favorite, 
+  Bookmark, 
+  Share, 
+  MoreVert, 
+  LocationOn, 
+  Cake, 
+  Female, 
+  Male, 
+  Public, 
+  Add,
+  Search,
+  Notifications,
+  Person,
+  Collections,
+  Group,
+  ChevronLeft,
+  ChevronRight,
+  Close,
+  People
+} from '@mui/icons-material';
+import { createTheme, ThemeProvider } from '@mui/material/styles';
+import { Link, useNavigate } from 'react-router-dom';
+
+// 导入API服务
+import { 
+  getCurrentUser, 
+  getUser, 
+  updateUser as updateUserApi,
+  getFavorites,
+  followUser as followUserApi,
+  unfollowUser as unfollowUserApi,
+  getUserPosts,
+  getUserFollowing,
+  getUserInteractions,
+  getUserFollowers
+} from '../services/api';
+
+// 创建小红书主题
+const theme = createTheme({
+  palette: {
+    primary: {
+      main: '#ff4081',
+    },
+    secondary: {
+      main: '#f50057',
+    },
+    background: {
+      default: '#f5f5f5',
+    },
+  },
+  typography: {
+    fontFamily: '"PingFang SC", "Helvetica Neue", Arial, sans-serif',
+    h5: {
+      fontWeight: 600,
+    },
+    subtitle1: {
+      color: 'rgba(0, 0, 0, 0.6)',
+    },
+  },
+  components: {
+    MuiButton: {
+      styleOverrides: {
+        root: {
+          borderRadius: 20,
+          textTransform: 'none',
+          fontWeight: 500,
+        },
+      },
+    },
+    MuiCard: {
+      styleOverrides: {
+        root: {
+          borderRadius: 16,
+        },
+      },
+    },
+  },
+});
+
+const UserProfile = ({ userId }) => {
+  const theme = useTheme();
+  const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
+  const navigate = useNavigate();
+  const [activeTab, setActiveTab] = useState(0);
+  const [isEditing, setIsEditing] = useState(false);
+  const [followers, setFollowers] = useState([]);
+  const [snackbar, setSnackbar] = useState({ open: false, message: '', severity: 'success' });
+  
+  // 用户数据状态
+  const [currentUser, setCurrentUser] = useState(null);
+  const [profileUser, setProfileUser] = useState(null);
+  const [favorites, setFavorites] = useState([]);
+  const [following, setFollowing] = useState([]);
+  const [posts, setPosts] = useState([]);
+  const [interactions, setInteractions] = useState({ 
+    likes_count: 0, 
+    favorites_count: 0 
+  });
+  
+  // 加载状态
+  const [loading, setLoading] = useState(true);
+  const [updating, setUpdating] = useState(false);
+  const [tabLoading, setTabLoading] = useState(false);
+  
+  // 表单状态
+  const [formData, setFormData] = useState({
+    avatar: '',
+    bio: '',
+    gender: 'female',
+    birthday: '1995-05-20',
+    location: '上海'
+  });
+
+  // 显示提示信息
+  const showSnackbar = (message, severity = 'success') => {
+    setSnackbar({ open: true, message, severity });
+  };
+
+  // 加载用户数据
+  useEffect(() => {
+    const fetchInteractions = async () => {
+    try {
+      const response = await getUserInteractions(userId);
+      if (response.data.success) {
+        setInteractions(response.data.data);
+      } else {
+        console.error(response.data.error);
+      }
+    } catch (error) {
+      console.error('获取互动数据失败:', error);
+    }
+  };
+  
+  fetchInteractions();
+
+    const handleFollowUser = async (followeeId) => {
+    try {
+      await followUserApi(followeeId);
+      showSnackbar('关注成功');
+      
+      // 更新粉丝列表状态(将刚关注的用户标记为已关注)
+      setFollowers(prev => prev.map(user => 
+        user.id === followeeId ? { ...user, is_following: true } : user
+      ));
+      
+      // 更新当前用户关注数
+      if (currentUser) {
+        setCurrentUser(prev => ({
+          ...prev,
+          following_count: prev.following_count + 1
+        }));
+      }
+      
+    } catch (error) {
+      console.error('关注操作失败:', error);
+      showSnackbar('关注失败,请重试', 'error');
+    }
+  };
+    const fetchData = async () => {
+      try {
+        setLoading(true);
+        
+        // 获取当前登录用户
+        const currentUserRes = await getCurrentUser();
+        setCurrentUser(currentUserRes.data);
+        
+        // 获取目标用户信息
+        const profileUserRes = await getUser(userId);
+        setProfileUser(profileUserRes.data);
+        setFormData({
+          avatar: profileUserRes.data.avatar || '',
+          bio: profileUserRes.data.bio || '',
+          gender: 'female',
+          birthday: '1995-05-20',
+          location: '上海'
+        });
+        
+        // 获取用户帖子
+        const postsRes = await getUserPosts(userId);
+        setPosts(postsRes.data);
+        
+        // 获取用户互动数据(获赞和收藏数量)
+        const interactionsRes = await getUserInteractions(userId);
+        setInteractions(interactionsRes.data);
+        
+      } catch (error) {
+        console.error('获取用户数据失败:', error);
+        showSnackbar('获取用户数据失败,请重试', 'error');
+      } finally {
+        setLoading(false);
+      }
+    };
+    
+    fetchData();
+  }, [userId]);
+
+  // 根据标签页加载数据
+  useEffect(() => {
+    const fetchTabData = async () => {
+      if (!profileUser) return;
+      
+      try {
+        setTabLoading(true);
+        
+        if (activeTab === 1) {
+          // 加载收藏数据
+          const favoritesRes = await getFavorites(userId);
+          setFavorites(favoritesRes.data);
+        } else if (activeTab === 2) {
+          // 加载关注列表
+          const followingRes = await getUserFollowing(userId);
+          setFollowing(followingRes.data);
+        }  else if (activeTab === 3) {
+          // 加载粉丝列表
+          const followersRes = await getUserFollowers(userId);
+          // 
+          setFollowers(followersRes.data);
+          console.log(followersRes.data)
+        }
+        
+      } catch (error) {
+        console.error('加载数据失败:', error);
+        showSnackbar('加载数据失败,请重试', 'error');
+      } finally {
+        setTabLoading(false);
+      }
+    };
+    
+    fetchTabData();
+  }, [activeTab, userId, profileUser]);
+
+  const handleTabChange = (event, newValue) => {
+    setActiveTab(newValue);
+  };
+
+  const handleFollowToggle = async () => {
+    if (!currentUser || !profileUser) return;
+    
+    try {
+      if (profileUser.is_following) {
+        await unfollowUserApi(profileUser.id);
+        showSnackbar('已取消关注');
+      } else {
+        await followUserApi(profileUser.id);
+        showSnackbar('关注成功');
+      }
+      
+      // 更新用户信息
+      const updatedUser = await getUser(userId);
+      setProfileUser(updatedUser.data);
+      
+    } catch (error) {
+      console.error('关注操作失败:', error);
+      showSnackbar('操作失败,请重试', 'error');
+    }
+  };
+
+  const handleFollowUser = async (followeeId) => {
+    try {
+      await followUserApi(followeeId);
+      showSnackbar('关注成功');
+      
+      // 更新粉丝列表状态
+      setFollowers(prev => prev.map(user => 
+        user.id === followeeId ? {...user, is_following: true} : user
+      ));
+      
+      // 更新当前用户关注数
+      if (currentUser) {
+        setCurrentUser(prev => ({
+          ...prev,
+          following_count: prev.following_count + 1
+        }));
+      }
+      
+    } catch (error) {
+      console.error('关注操作失败:', error);
+      showSnackbar('关注失败,请重试', 'error');
+    }
+  };
+
+  const handleUnfollow = async (followeeId, e) => {
+    e.stopPropagation(); // 阻止事件冒泡
+    
+    try {
+      await unfollowUserApi(followeeId);
+      showSnackbar('已取消关注');
+      
+      // 更新关注列表
+      setFollowing(prev => prev.filter(user => user.id !== followeeId));
+      
+      // 更新当前用户关注数
+      if (currentUser) {
+        setCurrentUser(prev => ({
+          ...prev,
+          following_count: prev.following_count - 1
+        }));
+      }
+      
+      // 更新目标用户粉丝数
+      setProfileUser(prev => ({
+        ...prev,
+        followers_count: prev.followers_count - 1
+      }));
+      
+    } catch (error) {
+      console.error('取消关注失败:', error);
+      showSnackbar('操作失败,请重试', 'error');
+    }
+  };
+
+  const handleFormChange = (e) => {
+    const { name, value } = e.target;
+    setFormData({ ...formData, [name]: value });
+  };
+
+  const handleUpdateProfile = async () => {
+    if (!profileUser) return;
+    
+    try {
+      setUpdating(true);
+      const data = { 
+        avatar: formData.avatar,
+        bio: formData.bio
+      };
+      
+      // 调用更新API
+      const updatedUser = await updateUserApi(profileUser.id, data);
+      
+      // 更新本地状态
+      setProfileUser({ ...profileUser, ...updatedUser.data });
+      setFormData({ ...formData, ...data });
+      
+      showSnackbar('个人资料更新成功');
+      setIsEditing(false);
+      
+    } catch (error) {
+      console.error('更新个人资料失败:', error);
+      showSnackbar('更新失败,请重试', 'error');
+    } finally {
+      setUpdating(false);
+    }
+  };
+
+  const navigateToUserProfile = (userId) => {
+    navigate(`/user/${userId}`);
+  };
+
+  if (loading) {
+    return (
+      <Box sx={{ 
+        display: 'flex', 
+        justifyContent: 'center', 
+        alignItems: 'center', 
+        height: '100vh' 
+      }}>
+        <CircularProgress size={60} />
+      </Box>
+    );
+  }
+
+  if (!profileUser) {
+    return (
+      <Box sx={{ 
+        display: 'flex', 
+        justifyContent: 'center', 
+        alignItems: 'center', 
+        height: '100vh',
+        flexDirection: 'column'
+      }}>
+        <Typography variant="h6" sx={{ mb: 2 }}>用户不存在</Typography>
+        <Button variant="outlined" onClick={() => window.location.reload()}>
+          重新加载
+        </Button>
+      </Box>
+    );
+  }
+
+  const isOwnProfile = currentUser && currentUser.id === parseInt(userId);
+
+  return (
+    <ThemeProvider theme={theme}>
+      <Box sx={{ 
+        bgcolor: 'background.default', 
+        minHeight: '100vh', 
+        pb: isMobile ? 8 : 4 
+      }}>
+        {/* 顶部横幅 */}
+        <Box sx={{
+          height: isMobile ? 200 : 250,
+          background: 'linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%)',
+          position: 'relative',
+          borderBottomLeftRadius: 24,
+          borderBottomRightRadius: 24,
+          boxShadow: 1
+        }}>
+          <Fab 
+            color="primary" 
+            size="small" 
+            sx={{ 
+              position: 'absolute', 
+              bottom: -20, 
+              right: 16 
+            }}
+          >
+            <CameraAlt />
+          </Fab>
+        </Box>
+
+        <Container maxWidth="lg">
+          {/* 用户信息区域 */}
+          <Box sx={{ px: isMobile ? 3 : 0, mt: -8, position: 'relative' }}>
+            <Grid container spacing={3}>
+              <Grid item xs={12} sm="auto">
+                <Badge
+                  overlap="circular"
+                  anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
+                  badgeContent={
+                    <IconButton 
+                      size="small" 
+                      sx={{ 
+                        bgcolor: 'grey.200', 
+                        '&:hover': { bgcolor: 'grey.300' } 
+                      }}
+                      onClick={() => setIsEditing(true)}
+                      disabled={!isOwnProfile}
+                    >
+                      <Edit fontSize="small" />
+                    </IconButton>
+                  }
+                >
+                  <Avatar
+                    sx={{ 
+                      width: 120, 
+                      height: 120, 
+                      border: '4px solid white',
+                      boxShadow: 3
+                    }}
+                    src={profileUser.avatar || 'https://randomuser.me/api/portraits/women/12.jpg'}
+                  />
+                </Badge>
+              </Grid>
+              
+              <Grid item xs={12} sm>
+                <Box sx={{ display: 'flex', justifyContent: 'space-between', flexDirection: isMobile ? 'column' : 'row' }}>
+                  <Box>
+                    <Typography variant="h5" fontWeight="bold">
+                      {profileUser.username}
+                    </Typography>
+                    <Typography variant="subtitle1" sx={{ mt: 0.5, maxWidth: 600 }}>
+                      {profileUser.bio || '这个人很懒,还没有写简介~'}
+                    </Typography>
+                    <Box sx={{ display: 'flex', mt: 1, gap: 1, flexWrap: 'wrap' }}>
+                      <Chip 
+                        icon={<LocationOn fontSize="small" />} 
+                        label="上海" 
+                        size="small" 
+                        variant="outlined" 
+                      />
+                      <Chip 
+                        icon={<Cake fontSize="small" />} 
+                        label="1995-05-20" 
+                        size="small" 
+                        variant="outlined" 
+                      />
+                      <Chip 
+                        icon={<Female fontSize="small" />} 
+                        label="女" 
+                        size="small" 
+                        variant="outlined" 
+                      />
+                    </Box>
+                  </Box>
+                  
+                  <Box sx={{ mt: isMobile ? 2 : 0, alignSelf: 'flex-start' }}>
+                    {!isOwnProfile && currentUser && (
+                      <>
+                        <Button
+                          variant={profileUser.is_following ? "outlined" : "contained"}
+                          color="primary"
+                          onClick={handleFollowToggle}
+                          sx={{ 
+                            borderRadius: 20, 
+                            px: 3, 
+                            fontWeight: 'bold' 
+                          }}
+                        >
+                          {profileUser.is_following ? '已关注' : '关注'}
+                        </Button>
+                        <IconButton sx={{ ml: 1 }}>
+                          <MoreVert />
+                        </IconButton>
+                      </>
+                    )}
+                  </Box>
+                </Box>
+                
+                <Grid container spacing={2} sx={{ mt: 2 }}>
+                  <Grid item>
+                    <Box textAlign="center">
+                      <Typography variant="h6">{posts.length}</Typography>
+                      <Typography variant="body2" color="textSecondary">笔记</Typography>
+                    </Box>
+                  </Grid>
+                  <Grid item>
+                    <Box textAlign="center">
+                      <Typography variant="h6">{profileUser.followers_count || 0}</Typography>
+                      <Typography variant="body2" color="textSecondary">粉丝</Typography>
+                    </Box>
+                  </Grid>
+                  <Grid item>
+                    <Box textAlign="center">
+                      <Typography variant="h6">{profileUser.following_count || 0}</Typography>
+                      <Typography variant="body2" color="textSecondary">关注</Typography>
+                    </Box>
+                  </Grid>
+                  <Grid item>
+                    <Box textAlign="center">
+                      {/* 使用真实数据:获赞与收藏总数 */}
+                      <Typography variant="h6">
+                        {(interactions.likes_count + interactions.favorites_count).toLocaleString()}
+                      </Typography>
+                      <Typography variant="body2" color="textSecondary">获赞与收藏</Typography>
+                    </Box>
+                  </Grid>
+                </Grid>
+              </Grid>
+            </Grid>
+          </Box>
+
+          {/* 标签栏 */}
+          <Box sx={{ mt: 4 }}>
+            <Tabs 
+              value={activeTab} 
+              onChange={handleTabChange}
+              variant={isMobile ? "fullWidth" : "standard"}
+              indicatorColor="primary"
+              textColor="primary"
+              sx={{
+                borderBottom: 1,
+                borderColor: 'divider'
+              }}
+            >
+              <Tab icon={isMobile ? <Collections /> : null} label="笔记" />
+              <Tab icon={isMobile ? <Bookmark /> : null} label="收藏" />
+              <Tab icon={isMobile ? <Group /> : null} label="关注" />
+              <Tab icon={isMobile ? <People /> : null} label="粉丝" />
+            </Tabs>
+          </Box>
+
+          {/* 内容区域 */}
+          <Box sx={{ mt: 3 }}>
+            {activeTab === 0 && (
+              <Grid container spacing={3}>
+                {tabLoading ? (
+                  <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
+                    <CircularProgress />
+                  </Grid>
+                ) : posts.length > 0 ? (
+                  posts.map((post, index) => (
+                    <Grid item xs={12} sm={6} lg={3} key={post.id}>
+                      <Card elevation={0} sx={{ 
+                        bgcolor: 'white', 
+                        borderRadius: 3,
+                        height: '100%',
+                        display: 'flex',
+                        flexDirection: 'column'
+                      }}>
+                        <CardMedia
+                          component="img"
+                          height="180"
+                          image={`https://source.unsplash.com/random/400x300?${index + 1}`}
+                          alt={post.title}
+                        />
+                        <CardContent sx={{ flexGrow: 1 }}>
+                          <Typography gutterBottom variant="h6" component="div">
+                            {post.title}
+                          </Typography>
+                          <Typography variant="body2" color="text.secondary">
+                            {post.content.substring(0, 60)}...
+                          </Typography>
+                        </CardContent>
+                        <CardActions sx={{ justifyContent: 'space-between', px: 2, pb: 2 }}>
+                          <Box>
+                            <IconButton aria-label="add to favorites">
+                              <Favorite />
+                              <Typography variant="body2" sx={{ ml: 1 }}>
+                                {post.heat || Math.floor(Math.random() * 1000) + 1000}
+                              </Typography>
+                            </IconButton>
+                            <IconButton aria-label="share">
+                              <Share />
+                            </IconButton>
+                          </Box>
+                          <Chip 
+                            label={post.type === 'image' ? '图文' : post.type === 'video' ? '视频' : '文档'} 
+                            size="small" 
+                            color="primary" 
+                            variant="outlined" 
+                          />
+                        </CardActions>
+                      </Card>
+                    </Grid>
+                  ))
+                ) : (
+                  <Grid item xs={12}>
+                    <Box sx={{ 
+                      display: 'flex', 
+                      flexDirection: 'column', 
+                      alignItems: 'center', 
+                      py: 8,
+                      textAlign: 'center'
+                    }}>
+                      <Collections sx={{ fontSize: 60, color: 'grey.300', mb: 2 }} />
+                      <Typography variant="h6" sx={{ mb: 1 }}>
+                        还没有发布笔记
+                      </Typography>
+                      <Typography variant="body1" color="textSecondary" sx={{ mb: 3 }}>
+                        {isOwnProfile ? '分享你的生活点滴吧~' : '该用户还没有发布任何笔记'}
+                      </Typography>
+                      {isOwnProfile && (
+                        <Button variant="contained" color="primary">
+                          发布第一篇笔记
+                        </Button>
+                      )}
+                    </Box>
+                  </Grid>
+                )}
+                
+                {posts.length > 0 && (
+                  <Grid item xs={12}>
+                    <Box sx={{ display: 'flex', justifyContent: 'center', mt: 3 }}>
+                      <Button 
+                        variant="outlined" 
+                        sx={{ 
+                          borderRadius: 20, 
+                          px: 4,
+                          display: 'flex',
+                          alignItems: 'center'
+                        }}
+                      >
+                        <ChevronLeft sx={{ mr: 1 }} />
+                        上一页
+                        <ChevronRight sx={{ ml: 2 }} />
+                      </Button>
+                    </Box>
+                  </Grid>
+                )}
+              </Grid>
+            )}
+            
+            {activeTab === 1 && (
+              <Grid container spacing={3}>
+                {tabLoading ? (
+                  <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
+                    <CircularProgress />
+                  </Grid>
+                ) : favorites.length > 0 ? (
+                  favorites.map((favorite) => (
+                    <Grid item xs={12} sm={6} md={4} lg={3} key={favorite.id}>
+                      <Card elevation={0} sx={{ 
+                        bgcolor: 'white', 
+                        borderRadius: 3,
+                        transition: 'transform 0.3s, box-shadow 0.3s',
+                        '&:hover': {
+                          transform: 'translateY(-5px)',
+                          boxShadow: 3
+                        }
+                      }}>
+                        <Box sx={{ 
+                          height: 160, 
+                          position: 'relative',
+                          borderTopLeftRadius: 16,
+                          borderTopRightRadius: 16,
+                          overflow: 'hidden'
+                        }}>
+                          <CardMedia
+                            component="img"
+                            height="160"
+                            image={`https://source.unsplash.com/random/400x300?${favorite.id}`}
+                            alt={favorite.title}
+                          />
+                          <Box sx={{
+                            position: 'absolute',
+                            top: 8,
+                            right: 8,
+                            bgcolor: 'rgba(0,0,0,0.6)',
+                            color: 'white',
+                            px: 1,
+                            py: 0.5,
+                            borderRadius: 4,
+                            fontSize: 12
+                          }}>
+                            {favorite.type === 'image' ? '图文' : favorite.type === 'video' ? '视频' : '文档'}
+                          </Box>
+                        </Box>
+                        <CardContent>
+                          <Typography gutterBottom variant="subtitle1" fontWeight="medium">
+                            {favorite.title}
+                          </Typography>
+                          <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
+                            <Box sx={{ display: 'flex', alignItems: 'center' }}>
+                              <Favorite fontSize="small" color="error" />
+                              <Typography variant="body2" sx={{ ml: 0.5 }}>
+                                {favorite.heat || Math.floor(Math.random() * 1000) + 1000}
+                              </Typography>
+                            </Box>
+                            <Box sx={{ display: 'flex', alignItems: 'center' }}>
+                              <Bookmark fontSize="small" color="primary" />
+                              <Typography variant="body2" sx={{ ml: 0.5 }}>
+                                {Math.floor(Math.random() * 500) + 100}
+                              </Typography>
+                            </Box>
+                          </Box>
+                        </CardContent>
+                      </Card>
+                    </Grid>
+                  ))
+                ) : (
+                  <Grid item xs={12}>
+                    <Box sx={{ 
+                      display: 'flex', 
+                      flexDirection: 'column', 
+                      alignItems: 'center', 
+                      py: 8,
+                      textAlign: 'center'
+                    }}>
+                      <Bookmark sx={{ fontSize: 60, color: 'grey.300', mb: 2 }} />
+                      <Typography variant="h6" sx={{ mb: 1 }}>
+                        {isOwnProfile ? '你还没有收藏内容' : '该用户没有收藏内容'}
+                      </Typography>
+                      <Typography variant="body1" color="textSecondary">
+                        {isOwnProfile ? '看到喜欢的笔记可以收藏起来哦~' : ''}
+                      </Typography>
+                    </Box>
+                  </Grid>
+                )}
+              </Grid>
+            )}
+            
+            {activeTab === 2 && (
+              <Grid container spacing={3}>
+                {tabLoading ? (
+                  <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
+                    <CircularProgress />
+                  </Grid>
+                ) : following.length > 0 ? (
+                  following.map((follow) => (
+                    <Grid item xs={12} sm={6} md={4} key={follow.id}>
+                      <Paper 
+                        elevation={0} 
+                        sx={{ 
+                          bgcolor: 'white', 
+                          borderRadius: 3,
+                          p: 2,
+                          display: 'flex',
+                          alignItems: 'center',
+                          cursor: 'pointer',
+                          '&:hover': {
+                            boxShadow: 1
+                          }
+                        }}
+                        onClick={() => navigateToUserProfile(follow.id)}
+                      >
+                        <Avatar 
+                          src={follow.avatar || 'https://randomuser.me/api/portraits/men/22.jpg'} 
+                          sx={{ width: 60, height: 60 }} 
+                        />
+                        <Box sx={{ ml: 2, flexGrow: 1 }}>
+                          <Typography fontWeight="medium">{follow.username}</Typography>
+                          <Typography variant="body2" color="textSecondary">
+                            {follow.followers_count || Math.floor(Math.random() * 100) + 10} 粉丝
+                          </Typography>
+                        </Box>
+                        {isOwnProfile && (
+                          <Button 
+                            variant="outlined" 
+                            size="small"
+                            sx={{ borderRadius: 20 }}
+                            onClick={(e) => handleUnfollow(follow.id, e)}
+                          >
+                            已关注
+                          </Button>
+                        )}
+                      </Paper>
+                    </Grid>
+                  ))
+                ) : (
+                  <Grid item xs={12}>
+                    <Box sx={{ 
+                      display: 'flex', 
+                      flexDirection: 'column', 
+                      alignItems: 'center', 
+                      py: 8,
+                      textAlign: 'center'
+                    }}>
+                      <Group sx={{ fontSize: 60, color: 'grey.300', mb: 2 }} />
+                      <Typography variant="h6" sx={{ mb: 1 }}>
+                        {isOwnProfile ? '你还没有关注任何人' : '该用户还没有关注任何人'}
+                      </Typography>
+                      <Typography variant="body1" color="textSecondary">
+                        {isOwnProfile ? '发现有趣的人并关注他们吧~' : ''}
+                      </Typography>
+                    </Box>
+                  </Grid>
+                )}
+              </Grid>
+            )}
+            {activeTab === 3 && (
+              <Grid container spacing={3}>
+                {tabLoading ? (
+                  <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
+                    <CircularProgress />
+                  </Grid>
+                ) : followers.length > 0 ? (
+                  followers.map((follower) => (
+                    <Grid item xs={12} sm={6} md={4} key={follower.id}>
+                      <Paper 
+                        elevation={0} 
+                        sx={{ 
+                          bgcolor: 'white', 
+                          borderRadius: 3,
+                          p: 2,
+                          display: 'flex',
+                          alignItems: 'center',
+                          cursor: 'pointer',
+                          '&:hover': {
+                            boxShadow: 1
+                          }
+                        }}
+                        onClick={() => navigateToUserProfile(follower.id)}
+                      >
+                        <Avatar 
+                          src={follower.avatar || 'https://randomuser.me/api/portraits/men/22.jpg'} 
+                          sx={{ width: 60, height: 60 }} 
+                        />
+                        <Box sx={{ ml: 2, flexGrow: 1 }}>
+                          <Typography fontWeight="medium">{follower.username}</Typography>
+                          <Typography variant="body2" color="textSecondary">
+                            {follower.bio || '暂无简介'}
+                          </Typography>
+                        </Box>
+                        {currentUser && currentUser.id !== follower.id && (
+                          <Button 
+                            variant={follower.is_following ? "outlined" : "contained"}
+                            color="primary"
+                            size="small"
+                            sx={{ borderRadius: 20 }}
+                            onClick={(e) => {
+                              e.stopPropagation();
+                              if (follower.is_following) {
+                                handleUnfollow(follower.id, e);
+                              } else {
+                                handleFollowUser(follower.id);
+                              }
+                            }}
+                          >
+                            {follower.is_following ? '已关注' : '关注'}
+                          </Button>
+                        )}
+                      </Paper>
+                    </Grid>
+                  ))
+                ) : (
+                  <Grid item xs={12}>
+                    <Box sx={{ 
+                      display: 'flex', 
+                      flexDirection: 'column', 
+                      alignItems: 'center', 
+                      py: 8,
+                      textAlign: 'center'
+                    }}>
+                      <People sx={{ fontSize: 60, color: 'grey.300', mb: 2 }} />
+                      <Typography variant="h6" sx={{ mb: 1 }}>
+                        {isOwnProfile ? '你还没有粉丝' : '该用户还没有粉丝'}
+                      </Typography>
+                      <Typography variant="body1" color="textSecondary">
+                        {isOwnProfile ? '分享更多内容来吸引粉丝吧~' : ''}
+                      </Typography>
+                    </Box>
+                  </Grid>
+                )}
+              </Grid>
+            )}
+          </Box>
+        </Container>
+
+        {/* 底部导航栏 - 仅移动端显示 */}
+        {isMobile && (
+          <Box sx={{
+            position: 'fixed',
+            bottom: 0,
+            left: 0,
+            right: 0,
+            bgcolor: 'white',
+            boxShadow: 3,
+            py: 1,
+            display: 'flex',
+            justifyContent: 'space-around'
+          }}>
+            <IconButton color="primary">
+              <Search fontSize="large" />
+            </IconButton>
+            <IconButton>
+              <Collections fontSize="large" />
+            </IconButton>
+            <Fab color="primary" size="medium" sx={{ mt: -2 }}>
+              <Add />
+            </Fab>
+            <IconButton>
+              <Notifications fontSize="large" />
+            </IconButton>
+            <IconButton>
+              <Person fontSize="large" />
+            </IconButton>
+          </Box>
+        )}
+
+        {/* 编辑资料模态框 */}
+        {isEditing && (
+          <Box sx={{
+            position: 'fixed',
+            top: 0,
+            left: 0,
+            right: 0,
+            bottom: 0,
+            bgcolor: 'rgba(0,0,0,0.5)',
+            zIndex: 1300,
+            display: 'flex',
+            alignItems: 'center',
+            justifyContent: 'center',
+            px: 2
+          }}>
+            <Paper sx={{ 
+              width: '100%', 
+              maxWidth: 600, 
+              borderRadius: 4,
+              overflow: 'hidden'
+            }}>
+              <Box sx={{ 
+                bgcolor: 'primary.main', 
+                color: 'white', 
+                p: 2,
+                display: 'flex',
+                justifyContent: 'space-between',
+                alignItems: 'center'
+              }}>
+                <Typography variant="h6">编辑资料</Typography>
+                <IconButton color="inherit" onClick={() => setIsEditing(false)}>
+                  <Close />
+                </IconButton>
+              </Box>
+              
+              <Box sx={{ p: 3 }}>
+                <Box sx={{ display: 'flex', justifyContent: 'center', mb: 3 }}>
+                  <Badge
+                    overlap="circular"
+                    anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
+                    badgeContent={
+                      <IconButton 
+                        size="small" 
+                        sx={{ 
+                          bgcolor: 'grey.200',
+                          '&:hover': { bgcolor: 'grey.300' }
+                        }}
+                      >
+                        <CameraAlt fontSize="small" />
+                      </IconButton>
+                    }
+                  >
+                    <Avatar
+                      sx={{ width: 100, height: 100 }}
+                      src={formData.avatar || 'https://randomuser.me/api/portraits/women/12.jpg'}
+                    />
+                  </Badge>
+                </Box>
+                
+                <TextField
+                  fullWidth
+                  label="用户名"
+                  value={profileUser.username}
+                  margin="normal"
+                  disabled
+                />
+                
+                <TextField
+                  fullWidth
+                  name="avatar"
+                  label="头像URL"
+                  value={formData.avatar}
+                  onChange={handleFormChange}
+                  margin="normal"
+                />
+                
+                <TextField
+                  fullWidth
+                  name="bio"
+                  label="个人简介"
+                  value={formData.bio}
+                  onChange={handleFormChange}
+                  margin="normal"
+                  multiline
+                  rows={3}
+                />
+                
+                <Grid container spacing={2} sx={{ mt: 1 }}>
+                  <Grid item xs={6}>
+                    <TextField
+                      select
+                      fullWidth
+                      name="gender"
+                      label="性别"
+                      value={formData.gender}
+                      onChange={handleFormChange}
+                      margin="normal"
+                    >
+                      <MenuItem value="female">
+                        <Box sx={{ display: 'flex', alignItems: 'center' }}>
+                          <Female sx={{ mr: 1 }} /> 女
+                        </Box>
+                      </MenuItem>
+                      <MenuItem value="male">
+                        <Box sx={{ display: 'flex', alignItems: 'center' }}>
+                          <Male sx={{ mr: 1 }} /> 男
+                        </Box>
+                      </MenuItem>
+                      <MenuItem value="other">
+                        <Box sx={{ display: 'flex', alignItems: 'center' }}>
+                          <Public sx={{ mr: 1 }} /> 其他
+                        </Box>
+                      </MenuItem>
+                    </TextField>
+                  </Grid>
+                  <Grid item xs={6}>
+                    <TextField
+                      fullWidth
+                      name="birthday"
+                      label="生日"
+                      type="date"
+                      value={formData.birthday}
+                      onChange={handleFormChange}
+                      margin="normal"
+                      InputLabelProps={{ shrink: true }}
+                    />
+                  </Grid>
+                </Grid>
+                
+                <TextField
+                  fullWidth
+                  name="location"
+                  label="地区"
+                  value={formData.location}
+                  onChange={handleFormChange}
+                  margin="normal"
+                  InputProps={{
+                    startAdornment: (
+                      <InputAdornment position="start">
+                        <LocationOn />
+                      </InputAdornment>
+                    ),
+                  }}
+                />
+                
+                <Box sx={{ display: 'flex', justifyContent: 'space-between', mt: 3 }}>
+                  <Button 
+                    variant="outlined" 
+                    sx={{ width: '48%' }}
+                    onClick={() => setIsEditing(false)}
+                    disabled={updating}
+                  >
+                    取消
+                  </Button>
+                  <Button 
+                    variant="contained" 
+                    color="primary" 
+                    sx={{ width: '48%' }}
+                    onClick={handleUpdateProfile}
+                    disabled={updating}
+                  >
+                    {updating ? <CircularProgress size={24} /> : '保存'}
+                  </Button>
+                </Box>
+              </Box>
+            </Paper>
+          </Box>
+        )}
+
+        {/* 提示信息 */}
+        <Snackbar
+          open={snackbar.open}
+          autoHideDuration={3000}
+          onClose={() => setSnackbar({ ...snackbar, open: false })}
+          anchorOrigin={{ vertical: 'top', horizontal: 'center' }}
+        >
+          <Alert 
+            severity={snackbar.severity} 
+            sx={{ width: '100%' }}
+            onClose={() => setSnackbar({ ...snackbar, open: false })}
+          >
+            {snackbar.message}
+          </Alert>
+        </Snackbar>
+      </Box>
+    </ThemeProvider>
+  );
+};
+
+export default UserProfile;
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/index.css b/xiaohongshu-upload-platform/src/ljc/personalpage/src/index.css
new file mode 100644
index 0000000..ec2585e
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/index.css
@@ -0,0 +1,13 @@
+body {
+  margin: 0;
+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
+    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
+    sans-serif;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+code {
+  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
+    monospace;
+}
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/index.js b/xiaohongshu-upload-platform/src/ljc/personalpage/src/index.js
new file mode 100644
index 0000000..d563c0f
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/index.js
@@ -0,0 +1,17 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import App from './App';
+import reportWebVitals from './reportWebVitals';
+
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
+  <React.StrictMode>
+    <App />
+  </React.StrictMode>
+);
+
+// If you want to start measuring performance in your app, pass a function
+// to log results (for example: reportWebVitals(console.log))
+// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
+reportWebVitals();
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/logo.svg b/xiaohongshu-upload-platform/src/ljc/personalpage/src/logo.svg
new file mode 100644
index 0000000..9dfc1c0
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/logo.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/reportWebVitals.js b/xiaohongshu-upload-platform/src/ljc/personalpage/src/reportWebVitals.js
new file mode 100644
index 0000000..5253d3a
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/reportWebVitals.js
@@ -0,0 +1,13 @@
+const reportWebVitals = onPerfEntry => {
+  if (onPerfEntry && onPerfEntry instanceof Function) {
+    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
+      getCLS(onPerfEntry);
+      getFID(onPerfEntry);
+      getFCP(onPerfEntry);
+      getLCP(onPerfEntry);
+      getTTFB(onPerfEntry);
+    });
+  }
+};
+
+export default reportWebVitals;
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/services/api.js b/xiaohongshu-upload-platform/src/ljc/personalpage/src/services/api.js
new file mode 100644
index 0000000..a3ca1d1
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/services/api.js
@@ -0,0 +1,31 @@
+import axios from 'axios';
+
+const api = axios.create({
+  baseURL: 'http://localhost:5000/api',
+  withCredentials: true
+});
+
+// 用户相关API
+export const getCurrentUser = () => api.get('/current-user');
+export const getUser = (userId) => api.get(`/user/${userId}`);
+export const updateUser = (userId, data) => api.put(`/user/${userId}`, data);
+
+// 收藏相关API
+export const getFavorites = (userId) => api.get(`/user/${userId}/favorites`);
+
+// 关注相关API
+export const followUser = (followeeId) => api.post(`/follow/${followeeId}`);
+export const unfollowUser = (followeeId) => api.delete(`/follow/${followeeId}`);
+
+// 帖子相关API
+export const getUserPosts = (userId) => api.get(`/user/${userId}/posts`);
+
+// 关注列表API
+export const getUserFollowing = (userId) => api.get(`/user/${userId}/following`);
+
+// 用户互动数据API
+export const getUserInteractions = (userId) => api.get(`/user/${userId}/interactions`);
+// 获取粉丝
+export const getUserFollowers = (userId) => api.get(`/user/${userId}/followers`);
+
+export default api;
\ No newline at end of file
diff --git a/xiaohongshu-upload-platform/src/ljc/personalpage/src/setupTests.js b/xiaohongshu-upload-platform/src/ljc/personalpage/src/setupTests.js
new file mode 100644
index 0000000..8f2609b
--- /dev/null
+++ b/xiaohongshu-upload-platform/src/ljc/personalpage/src/setupTests.js
@@ -0,0 +1,5 @@
+// jest-dom adds custom jest matchers for asserting on DOM nodes.
+// allows you to do things like:
+// expect(element).toHaveTextContent(/react/i)
+// learn more: https://github.com/testing-library/jest-dom
+import '@testing-library/jest-dom';