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 +})