diff --git a/src/api/response/administrator.js b/src/api/response/administrator.js
index 3cdfee0..aac24ad 100644
--- a/src/api/response/administrator.js
+++ b/src/api/response/administrator.js
@@ -91,3 +91,29 @@ export const updatePassword = (email,newPassword,tenantId,code) => {
}
});
}
+//根据用户名与租户Id验证密码是否正确
+export const checkPassword = (account,password,tenantId) => {
+ return request({
+ url: '/api/' + moduleName + '/ui/administrator/checkPassword',
+ method: 'get',
+ params: {
+ account,
+ tenantId,
+ password
+ }
+ });
+}
+//根据用户名、租户ID、旧密码修改密码
+export const updatePasswordByOldPassword = (account,oldPassword,newPassword,tenantId) => {
+ return request({
+ url: '/api/' + moduleName + '/ui/administrator/updatePasswordByOldPassword',
+ method: 'put',
+ params: {
+ account,
+ tenantId,
+ oldPassword,
+ newPassword,
+
+ }
+ });
+}
\ No newline at end of file
diff --git a/src/layout/navBars/breadcrumb/updatePassword.vue b/src/layout/navBars/breadcrumb/updatePassword.vue
new file mode 100644
index 0000000..0d78d87
--- /dev/null
+++ b/src/layout/navBars/breadcrumb/updatePassword.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Edit
+
+
+
+
+
+
+
+
diff --git a/src/layout/navBars/breadcrumb/user.vue b/src/layout/navBars/breadcrumb/user.vue
index 47f65c0..66f1140 100644
--- a/src/layout/navBars/breadcrumb/user.vue
+++ b/src/layout/navBars/breadcrumb/user.vue
@@ -70,7 +70,7 @@
@@ -87,14 +87,15 @@
- Dashboard
- Sign out
+ Edit Password
+
+ Sign out
+
@@ -110,10 +111,12 @@ import mittBus from '/@/utils/mitt';
import { Session, Local } from '/@/utils/storage';
import { refreshToken } from '/@/api/system/user.js'
import { useTranslate } from '/@/stores/translate';
+//引入updatePassword
import other from '/@/utils/other';
// 引入组件
const UserNews = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/userNews.vue'));
const Search = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/search.vue'));
+const updatePassword =defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/updatePassword.vue'));
const useTranslateStore = useTranslate()
const onLanguageChange = (lang) => {
if (lang == "en") {
@@ -133,12 +136,16 @@ const { userInfos } = storeToRefs(stores);
const { themeConfig, website } = storeToRefs(storesThemeConfig);
const searchRef = ref();
+const updatePasswordRef = ref();
const state = reactive({
isScreenfull: false,
disabledSize: 'large',
setIntervalId: null,
disabledI18n: "en",
});
+const editPassword = () => {
+ updatePasswordRef.value.show()
+}
// 设置分割样式
const layoutUserFlexNum = computed(() => {