From 5ac13564885c639671b00a463e528ba3bb724b3c Mon Sep 17 00:00:00 2001 From: glj Date: Sat, 8 Jul 2023 13:49:40 +0800 Subject: [PATCH] =?UTF-8?q?glj-=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login/index.js | 29 +++- src/api/system/user.js | 1 + .../navBars/breadcrumb/changePassword.vue | 90 ++++++++++++ src/layout/navBars/breadcrumb/user.vue | 137 ++++++++---------- .../dataService/multimediaData/index.vue | 1 - src/views/login/component/account.vue | 90 ++++++------ src/views/login/component/sendEmail.vue | 108 ++++++++++++++ .../userResponse/component/selectUser.vue | 2 +- 8 files changed, 339 insertions(+), 119 deletions(-) create mode 100644 src/layout/navBars/breadcrumb/changePassword.vue create mode 100644 src/views/login/component/sendEmail.vue diff --git a/src/api/login/index.js b/src/api/login/index.js index 7da26b5..d41505a 100644 --- a/src/api/login/index.js +++ b/src/api/login/index.js @@ -1,6 +1,6 @@ import request from '/@/utils/request'; import qs from 'qs' - +import { moduleName } from '/@/utils/request'; /** * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参) * @@ -10,7 +10,7 @@ import qs from 'qs' */ export function useLoginApi() { return { - signInByUsername: ({tenantId, deptId, roleId, username, password, type, key, code, grantType}) => { + signInByUsername: ({ tenantId, deptId, roleId, username, password, type, key, code, grantType }) => { return request({ url: '/api/system-manager/oauth/token', method: 'post', @@ -22,7 +22,7 @@ export function useLoginApi() { 'Captcha-Code': code, 'Content-Type': 'application/x-www-form-urlencoded', }, - data: qs.stringify( { + data: qs.stringify({ tenantId, username, password, @@ -50,3 +50,26 @@ export function useLoginApi() { }, }; } + +//sendEmailCode 邮箱发送验证码 +export function sendEmailCode(emailAccount) { + return request({ + url: '/api/' + moduleName + '/ui/captcha/sendEmailCode', + method: 'get', + params: { + emailAccount + } + }); +} + +//sendEmailCode 邮箱发送验证码 +export function codeCheck(emailAccount,code) { + return request({ + url: '/api/' + moduleName + '/ui/captcha/codeCheck', + method: 'get', + params: { + emailAccount, + code + } + }); +} diff --git a/src/api/system/user.js b/src/api/system/user.js index aff766e..45e9498 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -1,5 +1,6 @@ import request from '/@/utils/request'; import qs from 'qs'; +import {moduleName} from '/@/utils/request'; export const getUserInfo = () => { return request({ diff --git a/src/layout/navBars/breadcrumb/changePassword.vue b/src/layout/navBars/breadcrumb/changePassword.vue new file mode 100644 index 0000000..d420cd0 --- /dev/null +++ b/src/layout/navBars/breadcrumb/changePassword.vue @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file diff --git a/src/layout/navBars/breadcrumb/user.vue b/src/layout/navBars/breadcrumb/user.vue index 47f65c0..fb40ddf 100644 --- a/src/layout/navBars/breadcrumb/user.vue +++ b/src/layout/navBars/breadcrumb/user.vue @@ -1,22 +1,14 @@ --> - + -
- +
+
- + - + {{ userInfos.userName === '' ? 'chief' : userInfos.userName }} @@ -88,8 +72,7 @@ @@ -240,53 +223,61 @@ onMounted(() => { Session.set('refresh-token', res.refresh_token); }) } - }, 5*60*1000); + }, 5 * 60 * 1000); }); diff --git a/src/views/dataService/multimediaData/index.vue b/src/views/dataService/multimediaData/index.vue index 9f9228c..1e5be43 100644 --- a/src/views/dataService/multimediaData/index.vue +++ b/src/views/dataService/multimediaData/index.vue @@ -277,7 +277,6 @@ const getTableData = () => { // 打开上传弹窗 const startBot = (row) => { bootRef.value.openDialog(row); - }; // 打开上传弹窗 diff --git a/src/views/login/component/account.vue b/src/views/login/component/account.vue index d22f678..73ed34a 100644 --- a/src/views/login/component/account.vue +++ b/src/views/login/component/account.vue @@ -1,30 +1,31 @@ + + \ No newline at end of file diff --git a/src/views/responseManagement/userResponse/component/selectUser.vue b/src/views/responseManagement/userResponse/component/selectUser.vue index 61fd8c3..6a6ff9a 100644 --- a/src/views/responseManagement/userResponse/component/selectUser.vue +++ b/src/views/responseManagement/userResponse/component/selectUser.vue @@ -28,7 +28,7 @@ Cancel - Save + Send