From 4d63084f45009b48ee21d35c89ce9d20e59b3572 Mon Sep 17 00:00:00 2001
From: yyhouc <792163605@qq.com>
Date: Fri, 7 Jul 2023 18:40:12 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/response/administrator.js | 32 +++
src/stores/userInfo.js | 1 -
src/utils/request.js | 4 +-
src/views/login/component/account.vue | 1 +
src/views/login/component/forgotPassword.vue | 230 ++++++++++++++++++
src/views/login/index.vue | 9 +-
.../responseManagement/userResponse/index.vue | 62 ++++-
7 files changed, 326 insertions(+), 13 deletions(-)
create mode 100644 src/views/login/component/forgotPassword.vue
diff --git a/src/api/response/administrator.js b/src/api/response/administrator.js
index 7e030cf..3cdfee0 100644
--- a/src/api/response/administrator.js
+++ b/src/api/response/administrator.js
@@ -59,3 +59,35 @@ export const remove = (ids) => {
}
})
}
+export const sendEmail = (email,tenantId) => {
+ return request({
+ url: '/api/' + moduleName + '/ui/administrator/sendEmailCode',
+ method: 'get',
+ params: {
+ email,
+ tenantId
+ }
+ });
+}
+export const checkAccountOrEmail = (email,tenantId) => {
+ return request({
+ url: '/api/' + moduleName + '/ui/administrator/checkAccountOrEmail',
+ method: 'get',
+ params: {
+ email,
+ tenantId
+ }
+ });
+}
+export const updatePassword = (email,newPassword,tenantId,code) => {
+ return request({
+ url: '/api/' + moduleName + '/ui/administrator/updatePassword',
+ method: 'put',
+ params: {
+ email,
+ newPassword,
+ tenantId,
+ code
+ }
+ });
+}
diff --git a/src/stores/userInfo.js b/src/stores/userInfo.js
index 417608d..704082c 100644
--- a/src/stores/userInfo.js
+++ b/src/stores/userInfo.js
@@ -84,7 +84,6 @@ export const useUserInfo = defineStore('userInfo', {
// })
});
});
-
},
},
});
diff --git a/src/utils/request.js b/src/utils/request.js
index 46a61b6..66754fa 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -2,8 +2,7 @@ import axios from 'axios';
import { ElMessage, ElMessageBox } from 'element-plus';
import qs from 'qs';
import { Session } from '/@/utils/storage';
-
-export const moduleName = 'biz-vordm';
+export const moduleName = 'yyhouc-biz-vordm';
export const crawlModule = 'vordm-crawl';
export const twitterModule = "vordm-twitter";
const service = axios.create({
@@ -21,7 +20,6 @@ const service = axios.create({
service.interceptors.request.use(
(config) => {
config.headers['Authorization'] = 'Basic Vm9SRE1BZG1pbjp2b3JkbV9hZG1pbl9zZWNyZXQ=';
- // 在发送请求之前做些什么 token
if (Session.getEx('token')) {
config.headers['Blade-Auth'] = `Bearer ${Session.getEx('token')}`;
}
diff --git a/src/views/login/component/account.vue b/src/views/login/component/account.vue
index d22f678..ee522e5 100644
--- a/src/views/login/component/account.vue
+++ b/src/views/login/component/account.vue
@@ -146,6 +146,7 @@ const onSignIn = () => {
};
// 登录成功后的跳转
const signInSuccess = () => {
+ console.log('登录成功');
// 初始化登录成功时间问候语
let currentTimeInfo = currentTime.value;
// 登录成功,跳到转首页
diff --git a/src/views/login/component/forgotPassword.vue b/src/views/login/component/forgotPassword.vue
new file mode 100644
index 0000000..49a3a96
--- /dev/null
+++ b/src/views/login/component/forgotPassword.vue
@@ -0,0 +1,230 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{state.send}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Edit
+
+
+
+
+
+
+
+
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index c7fa762..6f4d132 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -19,9 +19,9 @@
-
+
+
+
@@ -47,8 +47,7 @@ import loginBg from '/@/assets/login-bg.svg';
// 引入组件
const Account = defineAsyncComponent(() => import('/@/views/login/component/account.vue'));
-const Mobile = defineAsyncComponent(() => import('/@/views/login/component/mobile.vue'));
-const Scan = defineAsyncComponent(() => import('/@/views/login/component/scan.vue'));
+const ForgotPassword = defineAsyncComponent(() => import('/@/views/login/component/forgotPassword.vue'));
// 定义变量内容
const storesThemeConfig = useThemeConfig();
diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue
index 3c9cad9..0f12ab4 100644
--- a/src/views/responseManagement/userResponse/index.vue
+++ b/src/views/responseManagement/userResponse/index.vue
@@ -420,7 +420,7 @@