完善项目

This commit is contained in:
BBIT-Kai
2026-04-09 15:46:26 +08:00
parent 63bd6da895
commit 5971791038
6 changed files with 9 additions and 60 deletions
@@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
open class BaseResponse<T>( open class BaseResponse<T>(
val status: Boolean = true, val status: Boolean = true,
val message: String = if(status) "操作成功" else "操作失败", val message: String = if (status) "操作成功" else "操作失败",
val data: T? = null, val data: T? = null,
) )
@@ -18,6 +18,10 @@ fun Application.configureCORS() {
// 进一步配置 CORS // 进一步配置 CORS
allowMethod(HttpMethod.Get) allowMethod(HttpMethod.Get)
allowMethod(HttpMethod.Post) allowMethod(HttpMethod.Post)
allowMethod(HttpMethod.Put)
allowMethod(HttpMethod.Patch)
allowMethod(HttpMethod.Delete)
allowMethod(HttpMethod.Options)
allowHeader(HttpHeaders.ContentType) allowHeader(HttpHeaders.ContentType)
allowHeader(HttpHeaders.Authorization) allowHeader(HttpHeaders.Authorization)
} }
+1
View File
@@ -6,3 +6,4 @@ export * from './llm';
export * from './manager'; export * from './manager';
export * from './sentinel'; export * from './sentinel';
export * from './ws'; export * from './ws';
export * from './traceability';
+1 -1
View File
@@ -9,7 +9,7 @@ export const overridesPreferences = defineOverridesPreferences({
// overrides // overrides
app: { app: {
name: 'BBIT', name: 'BBIT',
// layout: 'header-sidebar-nav', layout: 'header-sidebar-nav',
defaultHomePath: '/workspace', // 默认首页路径 defaultHomePath: '/workspace', // 默认首页路径
enablePreferences: false, // 是否启用偏好设置 enablePreferences: false, // 是否启用偏好设置
enableRefreshToken: true, // 启动刷新token模式 enableRefreshToken: true, // 启动刷新token模式
+1 -1
View File
@@ -1,7 +1,7 @@
import { initPreferences } from '@vben/preferences'; import { initPreferences } from '@vben/preferences';
import { unmountGlobalLoading } from '@vben/utils'; import { unmountGlobalLoading } from '@vben/utils';
import { overridesPreferences } from './preferences'; import { overridesPreferences } from '#/preferences';
/** /**
* 应用初始化完成之后再进行页面加载渲染 * 应用初始化完成之后再进行页面加载渲染
@@ -1,55 +0,0 @@
import { defineOverridesPreferences } from '@vben/preferences';
/**
* @description 项目配置文件
* 只需要覆盖项目中的一部分配置,不需要的配置不用覆盖,会自动使用默认配置
* !!! 更改配置后请清空缓存,否则可能不生效
*/
export const overridesPreferences = defineOverridesPreferences({
// overrides
app: {
name: import.meta.env.VITE_APP_TITLE,
layout: 'header-sidebar-nav',
defaultHomePath: '/workspace', // 默认首页路径
enablePreferences: false, // 是否启用偏好设置
enableRefreshToken: true, // 启动刷新token模式
loginExpiredMode: 'modal', // 登录过期模式 不用弹窗登录 跳转到页面登录,防止一些界面不会再加载
accessMode: 'mixed', // 混合权限模式
},
theme: {
mode: 'light',
radius: '0.75',
},
breadcrumb: {
hideOnlyOne: true,
styleType: 'normal',
showHome: true,
},
copyright: {
enable: false,
},
shortcutKeys: {
globalLockScreen: false,
},
sidebar: {
collapsed: false,
fixedButton: true,
width: 190,
},
transition: {
name: 'fade-up',
},
widget: {
lockScreen: false,
notification: false,
languageToggle: false,
themeToggle: false,
},
navigation: {
accordion: false,
},
tabbar: {
middleClickToClose: true,
keepAlive: true,
},
});