refactor: 整理unocss,重构useApi,完善通知i18n,调整了一些代码写法,调整了一些样式,清理了一些无用依赖和代码

This commit is contained in:
Rewrite0
2024-03-07 15:58:33 +08:00
parent c20369fb95
commit c95fe89d5d
67 changed files with 2028 additions and 1236 deletions

View File

@@ -1,4 +1,5 @@
import type { LoginSuccess, Logout, Update } from '#/auth';
import type { LoginSuccess, Update } from '#/auth';
import type { ApiSuccess } from '#/api';
export const apiAuth = {
async login(username: string, password: string) {
@@ -26,8 +27,8 @@ export const apiAuth = {
},
async logout() {
const { data } = await axios.get<Logout>('api/v1/auth/logout');
return data.message === 'logout success';
const { data } = await axios.get<ApiSuccess>('api/v1/auth/logout');
return data;
},
async update(username: string, password: string) {

View File

@@ -1,3 +1,4 @@
import { omit } from 'lodash';
import type { BangumiAPI, BangumiRule } from '#/bangumi';
import type { ApiSuccess } from '#/api';