diff --git a/neutrino-proxy-admin/src/api/user.js b/neutrino-proxy-admin/src/api/user.js index 0429d4f4..0b982505 100644 --- a/neutrino-proxy-admin/src/api/user.js +++ b/neutrino-proxy-admin/src/api/user.js @@ -85,3 +85,15 @@ export function updatePassword(params) { }) } +/** + * 修改自己密码 + * @param params + */ +export function updateUserPassword(params) { + return request({ + url: '/user/current-user/update/password', + method: 'post', + data: params + }) +} + diff --git a/neutrino-proxy-admin/src/lang/zh.js b/neutrino-proxy-admin/src/lang/zh.js index cf08901a..86bda466 100644 --- a/neutrino-proxy-admin/src/lang/zh.js +++ b/neutrino-proxy-admin/src/lang/zh.js @@ -60,6 +60,7 @@ export default { logOut: '退出登录', dashboard: '首页', github: '项目地址', + updatePwd: '修改密码', screenfull: '全屏', theme: '换肤' }, diff --git a/neutrino-proxy-admin/src/views/layout/components/Navbar.vue b/neutrino-proxy-admin/src/views/layout/components/Navbar.vue index ca630f58..1c66e100 100644 --- a/neutrino-proxy-admin/src/views/layout/components/Navbar.vue +++ b/neutrino-proxy-admin/src/views/layout/components/Navbar.vue @@ -33,12 +33,17 @@ {{$t('navbar.github')}} + + {{$t('navbar.updatePwd')}} + {{$t('navbar.logOut')}} + + @@ -50,9 +55,11 @@ import ErrorLog from '@/components/ErrorLog' import Screenfull from '@/components/Screenfull' import LangSelect from '@/components/LangSelect' import ThemePicker from '@/components/ThemePicker' +import UpdatePwd from '../../system/components/update-pwd' export default { components: { + UpdatePwd, Breadcrumb, Hamburger, ErrorLog, @@ -68,6 +75,11 @@ export default { 'loginName' ]) }, + data() { + return { + updatePwdvisible: false + } + }, methods: { toggleSideBar() { this.$store.dispatch('toggleSideBar') @@ -76,6 +88,9 @@ export default { this.$store.dispatch('LogOut').then(() => { location.reload()// In order to re-instantiate the vue-router object to avoid bugs }) + }, + handleCancel() { + this.updatePwdvisible = false } } } @@ -130,12 +145,12 @@ export default { height: 40px; border-radius: 10px; } - .el-icon-caret-bottom { + /*.el-icon-caret-bottom { position: absolute; right: -20px; top: 25px; font-size: 12px; - } + }*/ } } } diff --git a/neutrino-proxy-admin/src/views/system/components/update-pwd.vue b/neutrino-proxy-admin/src/views/system/components/update-pwd.vue index 31e30097..cf307c87 100644 --- a/neutrino-proxy-admin/src/views/system/components/update-pwd.vue +++ b/neutrino-proxy-admin/src/views/system/components/update-pwd.vue @@ -4,14 +4,21 @@ :visible.sync="visible" :close-on-click-modal="false" :before-close="onCancel" + :width="width" > - - + + + + + + + +