From ba077c8e9c8d3490ce9dd641e0d2e483a17cc40f Mon Sep 17 00:00:00 2001 From: Kunagisa <1549184870@qq.com> Date: Fri, 18 Jul 2025 01:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E7=A1=AE=E4=BF=A1=EF=BC=88=EF=BC=8C=E5=8F=A6=E5=A4=96=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E4=B8=AA=E5=9C=A8=E7=BC=96=E8=AF=91=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BC=9A=E5=8E=BB=E6=8E=89log=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E8=83=BD=E7=BC=96=E8=AF=91=E6=88=90=E5=8A=9F=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/axiosConfig.js | 4 +- src/api/login.js | 6 +- src/components/ChangePasswordDialog.vue | 5 +- src/components/forget_module.vue | 164 ++++++++++++++++-------- vite.config.js | 10 +- 5 files changed, 127 insertions(+), 62 deletions(-) diff --git a/src/api/axiosConfig.js b/src/api/axiosConfig.js index c92bf30..3964457 100644 --- a/src/api/axiosConfig.js +++ b/src/api/axiosConfig.js @@ -1,8 +1,8 @@ import axios from 'axios'; import { logoutUser } from '../utils/jwt'; // logoutUser会处理清除存储和重定向 -const API_BASE_URL = 'https://api.zybdatasupport.online'; -//const API_BASE_URL = 'http://hk.zybdatasupport.online:8000/'; +//const API_BASE_URL = 'https://api.zybdatasupport.online'; +const API_BASE_URL = 'http://hk.zybdatasupport.online:8000/'; const axiosInstance = axios.create({ baseURL: API_BASE_URL, diff --git a/src/api/login.js b/src/api/login.js index 50effd7..a53f4aa 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -154,12 +154,12 @@ export const changeUserName = async (name) => { * 用户请求修改密码(发送重置请求) * 路由: /user/resetpassword * 方法: POST - * 需要登录 + * @param {string} uuid - 要修改的用户的uuid * @returns {Promise} 无返回值,成功即为请求成功 */ -export const requestResetPassword = async () => { +export const requestResetPassword = async (uuid) => { try { - await axiosInstance.post('/user/resetpassword'); + await axiosInstance.post('/user/resetpassword', null, { params: { uuid } }); } catch (error) { throw error; } diff --git a/src/components/ChangePasswordDialog.vue b/src/components/ChangePasswordDialog.vue index cade203..83fd9df 100644 --- a/src/components/ChangePasswordDialog.vue +++ b/src/components/ChangePasswordDialog.vue @@ -26,6 +26,7 @@ diff --git a/vite.config.js b/vite.config.js index 577c427..c4599ca 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,6 +4,14 @@ import path from 'path' export default defineConfig({ plugins: [vue()], + build: { + terserOptions:{ + compress:{ + drop_console:true, + drop_debugger:true, + } + } + }, resolve: { alias: { '@': path.resolve(__dirname, './src') @@ -13,4 +21,4 @@ export default defineConfig({ port: 80, open: true } -}) \ No newline at end of file +})