feat: 适配5.x后端,重构前端架构

主要变更:
1. 重构API目录结构,采用模块化设计,适配5.x后端接口规范
2. 优化布局组件,提升用户界面体验
3. 增强国际化支持,完善多语言配置
4. 新增权限控制功能,支持前端路由权限管理
5. 优化认证流程,支持JWT认证机制
6. 新增中间件和插件,提升系统扩展性
7. 优化状态管理,采用更清晰的模块化设计
8. 新增搜索框、广告等组件,丰富页面功能
9. 更改包管理工具从npm到pnpm,提升依赖管理效率
10. 完善配置系统,支持多环境配置

适配5.x后端特性:
- 采用新的API接口规范
- 支持JWT认证机制
- 适配后端权限控制体系
- 支持后端国际化接口
- 优化数据交互方式
This commit is contained in:
Mr.April
2026-04-07 11:01:11 +08:00
parent 1b83f1890b
commit d84d972e73
127 changed files with 103052 additions and 14661 deletions
+131
View File
@@ -0,0 +1,131 @@
// 会员相关类型定义
// 会员信息类型
export interface MemberInfo {
id: number
username: string
nickname: string
phone: string
email: string
avatar: string
level_id: number
level_name: string
points: number
balance: number
create_time: number
}
// 会员登录请求类型
export interface LoginRequest {
username: string
password: string
remember?: boolean
}
// 会员注册请求类型
export interface RegisterRequest {
username: string
password: string
nickname: string
phone: string
email?: string
verify_code: string
}
// 会员签到响应类型
export interface SignResponse {
points: number
continue_days: number
total_points: number
}
// 积分记录类型
export interface PointsRecord {
id: number
points: number
balance: number
type: number
type_text: string
remark: string
create_time: number
}
// 积分记录列表响应类型
export interface PointsRecordResponse {
total: number
list: PointsRecord[]
}
// 积分规则类型
export interface PointsRule {
title: string
points: number
remark: string
}
// 积分规则响应类型
export interface PointsRulesResponse {
sign_points: number
login_points: number
max_sign_days: number
rules: PointsRule[]
}
// 积分等级类型
export interface PointsLevel {
id: number
name: string
min_points: number
max_points: number
icon: string
description: string
}
// 地址类型
export interface Address {
id: number
name: string
phone: string
province: string
city: string
district: string
address: string
is_default: number
}
// 更新会员信息请求类型
export interface UpdateMemberRequest {
nickname?: string
avatar?: string
email?: string
}
// 修改密码请求类型
export interface ChangePasswordRequest {
old_password: string
new_password: string
}
// 绑定手机号请求类型
export interface BindPhoneRequest {
phone: string
verify_code: string
}
// 创建地址请求类型
export interface CreateAddressRequest {
name: string
phone: string
province: string
city: string
district: string
address: string
is_default?: number
}
// 通用响应类型
export interface ApiResponse<T = any> {
code: number
msg: string
data: T
}