## 后端修复
- 修复教师端课程查询 - 包含系统课程和租户课程
- 修复系统课程创建 - isSystem 标志正确保存到数据库
- 新增套餐授权接口 POST /api/v1/admin/packages/{id}/grant
## 新增 Controller
- SchoolStatsController - 学校端统计数据
- SchoolCourseController - 学校端课程管理
- TeacherStatsController - 教师端统计数据
## 前端修复
- 修复 API 客户端导入 - getApi → getReadingPlatformAPI
- 修复三端 API 调用方法名
- 更新 Orval 生成配置和 API 类型
- 修复学校端视图 - result.items → result.list
## 测试结果
- ✅ 超管端:课程创建/发布、套餐完整流程、授权
- ✅ 学校端:登录、统计、课程、套餐查看
- ✅ 教师端:登录、Dashboard、班级、课程查看
## 文档更新
- 新增测试记录:/docs/test-logs/
- 更新 CHANGELOG.md
- 更新今日开发日志
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
81 lines
1.9 KiB
TypeScript
81 lines
1.9 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { resolve } from 'path';
|
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
import Components from 'unplugin-vue-components/vite';
|
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
|
|
import viteCompression from 'vite-plugin-compression';
|
|
import fileRouter from 'unplugin-vue-router/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
fileRouter({
|
|
routesFolder: 'src/views',
|
|
extensions: ['.vue'],
|
|
importMode: 'sync',
|
|
}),
|
|
AutoImport({
|
|
imports: [
|
|
'vue',
|
|
'vue-router',
|
|
'pinia',
|
|
{
|
|
'ant-design-vue': ['message', 'notification', 'Modal'],
|
|
},
|
|
],
|
|
dts: 'src/auto-imports.d.ts',
|
|
// 添加 vue-router 的自动导入
|
|
vueTemplate: true,
|
|
}),
|
|
Components({
|
|
resolvers: [
|
|
AntDesignVueResolver({
|
|
importStyle: false,
|
|
}),
|
|
],
|
|
dts: 'src/components.d.ts',
|
|
}),
|
|
viteCompression({
|
|
verbose: true,
|
|
disable: false,
|
|
threshold: 10240,
|
|
algorithm: 'gzip',
|
|
ext: '.gz',
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api\/v1/, '/api'),
|
|
},
|
|
'/uploads': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'ant-design-vue': ['ant-design-vue', '@ant-design/icons-vue'],
|
|
'echarts': ['echarts'],
|
|
'fullcalendar': ['@fullcalendar/vue3', '@fullcalendar/core', '@fullcalendar/daygrid', '@fullcalendar/timegrid', '@fullcalendar/interaction'],
|
|
'dayjs': ['dayjs'],
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
});
|