diff --git a/README.md b/README.md index 9410e416..c1f1c8a0 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,6 @@ continew-admin-ui # 前端项目 │ │ │ └─ online # 在线用户 │ │ ├─ setting # 设置 │ │ │ ├─ profile # 账号管理 -│ │ │ └─ security # 安全设置 │ │ ├─ tool # 系统工具 │ │ │ └─ generator # 代码生成 │ │ └─ system # 系统管理 diff --git a/src/apis/auth/type.ts b/src/apis/auth/type.ts index 45b5a2c9..29d08791 100644 --- a/src/apis/auth/type.ts +++ b/src/apis/auth/type.ts @@ -8,6 +8,7 @@ export interface UserInfo { phone: string avatar: string pwdResetTime: string + passwordExpired: boolean registrationDate: string deptName: string roles: string[] diff --git a/src/apis/system/type.ts b/src/apis/system/type.ts index f34e2513..f1264a33 100644 --- a/src/apis/system/type.ts +++ b/src/apis/system/type.ts @@ -251,6 +251,16 @@ export interface BasicConfigResp { site_copyright: string } +/** 安全配置类型 */ +export interface SecurityConfigResp { + password_contain_name: OptionResp + password_error_count: OptionResp + password_lock_minutes: OptionResp + password_min_length: OptionResp + password_special_char: OptionResp + password_update_interval: OptionResp +} + /** 绑定三方账号信息*/ export interface BindSocialAccountRes { source: string diff --git a/src/layout/components/HeaderRightBar/index.vue b/src/layout/components/HeaderRightBar/index.vue index 62da6381..3e6e1572 100644 --- a/src/layout/components/HeaderRightBar/index.vue +++ b/src/layout/components/HeaderRightBar/index.vue @@ -53,9 +53,6 @@ 账号管理 - - 安全设置 - 退出登录 @@ -111,10 +108,12 @@ const logout = () => { .user { cursor: pointer; color: var(--color-text-1); + .username { margin-left: 10px; white-space: nowrap; } + .arco-icon-down { transition: all 0.3s; margin-left: 2px; diff --git a/src/router/index.ts b/src/router/index.ts index d2fdaf6a..6a4233b9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -62,12 +62,6 @@ export const constantRoutes: RouteRecordRaw[] = [ name: 'SettingProfile', component: () => import('@/views/setting/profile/index.vue'), meta: { title: '账号管理', showInTabs: false } - }, - { - path: '/setting/security', - name: 'SettingSecurity', - component: () => import('@/views/setting/security/index.vue'), - meta: { title: '安全设置', showInTabs: false } } ] } @@ -88,7 +82,7 @@ export function resetRouter() { router.getRoutes().forEach((route) => { const { name } = route // console.log('name', name, path) - if (name && !['Home', 'Setting', 'SettingProfile', 'SettingSecurity'].includes(name.toString())) { + if (name && !['Home', 'Setting', 'SettingProfile'].includes(name.toString())) { router.hasRoute(name) && router.removeRoute(name) } }) diff --git a/src/stores/modules/user.ts b/src/stores/modules/user.ts index 45c30813..5c1727b2 100644 --- a/src/stores/modules/user.ts +++ b/src/stores/modules/user.ts @@ -27,6 +27,7 @@ const storeSetup = () => { phone: '', avatar: '', pwdResetTime: '', + passwordExpired: false, registrationDate: '', deptName: '', roles: [], diff --git a/src/views/login/components/account/index.vue b/src/views/login/components/account/index.vue index db1e650f..e446334f 100644 --- a/src/views/login/components/account/index.vue +++ b/src/views/login/components/account/index.vue @@ -31,7 +31,9 @@ - 立即登录 + 立即登录 + @@ -39,7 +41,7 @@ diff --git a/src/views/setting/profile/index.vue b/src/views/setting/profile/index.vue index 725d177d..e7682582 100644 --- a/src/views/setting/profile/index.vue +++ b/src/views/setting/profile/index.vue @@ -1,11 +1,16 @@