ec-admin/src/config/login.ts
liuyun eff4f8b314 fix: 第二轮残留(前端)
- 移除 config.tenantCode 死配置,注册页加租户输入
- 全局 errorHandler + unhandledrejection 兜底错误提示
- selectTenant 二次登录加 loading
- 路由守卫支持 meta.freeAccess 白名单

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 17:22:16 +08:00

61 lines
1.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { JsonSchema } from '@/types/crud'
import logo from '@/assets/images/logo.png'
/** 登录页布局:split=左右分栏(左品牌右表单)/ card=居中卡片。 */
export type LoginLayout = 'split' | 'card'
/** 登录页配置。默认值在此集中配置,fork 项目时改这里即可。 */
export interface LoginConfig {
/** 系统名称。 */
title: string
/** Logo 图片地址。 */
logo?: string
/** 副标题/标语。 */
subtitle?: string
/** 版权信息。 */
copyright: string
/** 布局形态。 */
layout: LoginLayout
/** 背景(图 URL 或 CSS 渐变/颜色)。 */
background?: string
/** 登录字段(JSON Schema,字段名须与后端 DTO 一致)。 */
fields: JsonSchema
/** 是否显示「记住我」。 */
showRemember: boolean
/** 是否显示「忘记密码」。 */
showForgetPassword: boolean
/** 是否显示「注册」。 */
showRegister: boolean
/** 是否显示验证码(当前为 UI 占位,后端 DTO 暂无 captcha)。 */
showCaptcha: boolean
/** 登录成功跳转路径。 */
homePath: string
}
export const defaultLoginConfig: LoginConfig = {
title: '投云系统管理平台',
logo,
subtitle: '通用系统管理脚手架',
copyright: '云南投云科技有限公司',
layout: 'split',
fields: {
type: 'object',
properties: {
username: { type: 'string', title: '用户名', placeholder: '请输入用户名', prefixIcon: 'mdi:account' },
password: {
type: 'string',
title: '密码',
format: 'password',
placeholder: '请输入密码',
prefixIcon: 'mdi:lock',
},
},
required: ['username', 'password'],
},
showRemember: true,
showForgetPassword: false,
showRegister: false,
showCaptcha: true,
homePath: '/',
}