perf: Refactor vite configuration

This commit is contained in:
vben
2023-04-05 00:20:48 +08:00
parent 5e4be0adbc
commit 5e99463cd0
68 changed files with 2437 additions and 3985 deletions

View File

@@ -0,0 +1,18 @@
import FileService from '../service/FileService';
class FileController {
private service: FileService = new FileService();
upload = async (ctx) => {
const files = ctx.request.files.file;
console.log(files);
if (files.length === undefined) {
this.service.upload(ctx, files, false);
} else {
this.service.upload(ctx, files, true);
}
};
}
export default new FileController();

View File

@@ -0,0 +1,15 @@
import UserService from '../service/UserService';
class UserController {
private service: UserService = new UserService();
login = async (ctx) => {
ctx.body = await this.service.login();
};
getUserInfoById = async (ctx) => {
ctx.body = await this.service.getUserInfoById();
};
}
export default new UserController();