feat: 新增疯言疯语功能并优化UI样式

- 添加疯言疯语服务及页面,支持随机字符颜色变化效果
- 引入汉仪唐韵字体并优化全局字体设置
- 重构日期工具函数,优化时间显示格式
- 改进左侧模块布局,添加文章/分类/标签统计
- 优化浮动按钮组件,增加动态过渡效果
- 调整多个页面的背景透明度,提升视觉一致性
- 完善文章保存页面样式和交互逻辑
- 更新关于页面内容,增加个人介绍和技术栈展示
- 修复路由状态管理问题,优化页面跳转逻辑
This commit is contained in:
qingfeng1121
2025-11-05 16:11:46 +08:00
parent a927ad5a4d
commit ad893b3e5c
19 changed files with 1226 additions and 600 deletions

View File

@@ -5,17 +5,22 @@ import { ElMessage } from 'element-plus'
// 创建axios实例
const api = axios.create({
baseURL:'http://localhost:8080/api', // API基础URL
timeout: 10000 // 请求超时时间
timeout: 10000, // 请求超时时间
withCredentials: true // 允许跨域请求携带凭证如cookies
})
// 请求拦截器
api.interceptors.request.use(
config => {
// 从localStorage获取token
const token = localStorage.getItem('token')
let token = localStorage.getItem('token')
if (token) {
// 设置Authorization头
config.headers['Authorization'] = `Bearer ${token}`
// 确保不重复添加Bearer前缀
if (!token.startsWith('Bearer ')) {
config.headers['Authorization'] = `Bearer ${token}`
} else {
config.headers['Authorization'] = token
}
}
return config
},