忘记密码,确信(,另外加了个在编译的时候会去掉log,应该能编译成功吧

This commit is contained in:
2025-07-18 01:29:24 +08:00
parent 6fcc13b31f
commit ba077c8e9c
5 changed files with 127 additions and 62 deletions

View File

@@ -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,

View File

@@ -154,12 +154,12 @@ export const changeUserName = async (name) => {
* 用户请求修改密码(发送重置请求)
* 路由: /user/resetpassword
* 方法: POST
* 需要登录
* @param {string} uuid - 要修改的用户的uuid
* @returns {Promise<void>} 无返回值,成功即为请求成功
*/
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;
}