From 685d31e3a8a299bb0f41f2151f2af64533c9ed9c Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期一, 17 二月 2025 14:07:49 +0800 Subject: [PATCH] #国际配置文件 --- rsf-admin/src/api/auth/index.js | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/rsf-admin/src/api/auth/index.js b/rsf-admin/src/api/auth/index.js index e61d2f0..f5c19dc 100644 --- a/rsf-admin/src/api/auth/index.js +++ b/rsf-admin/src/api/auth/index.js @@ -18,10 +18,12 @@ export async function login(_params) { const res = await request.post('/login', _params); - if (res.data.code === 200) { - return res.data.data; - } - return Promise.reject(new Error(res.data.msg)); + return res.data; +} + +export async function register(_params) { + const res = await request.post('/register', _params); + return res.data; } export async function menus(_params) { @@ -42,10 +44,7 @@ export async function updateUserInfo(_params) { const res = await request.post('/auth/user', _params); - if (res.data.code === 200) { - return res.data; - } - return Promise.reject(new Error(res.data.msg)); + return res.data; } export async function requestResetPassword(_params) { -- Gitblit v1.9.1