From 2f79f04bac437c6a09b3ebf4d0458522c3d413d8 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 20 二月 2025 09:41:28 +0800
Subject: [PATCH] #优化 1. dom文件引用优化 2. 接口文档代码优化

---
 rsf-admin/src/api/auth/index.js |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/rsf-admin/src/api/auth/index.js b/rsf-admin/src/api/auth/index.js
index 99d1cf5..f5c19dc 100644
--- a/rsf-admin/src/api/auth/index.js
+++ b/rsf-admin/src/api/auth/index.js
@@ -18,10 +18,7 @@
 
 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) {
@@ -47,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