diff --git a/src/api/User.ts b/src/api/User.ts index f2216eb..3492e83 100644 --- a/src/api/User.ts +++ b/src/api/User.ts @@ -11,4 +11,4 @@ export const getUserDataAPI = (id?: number) => Request("GET", `/user/${id} export const editUserDataAPI = (data: UserInfo) => Request("PATCH", "/user", { data }) // 修改管理员密码 -export const editAdminPassAPI = (data: EditUser) => Request("PATCH", "/user/admin", { data }) \ No newline at end of file +export const editAdminPassAPI = (data: EditUser) => Request("PATCH", "/user/pass", { data }) \ No newline at end of file diff --git a/src/pages/Article/index.tsx b/src/pages/Article/index.tsx index 2fe3e6d..f51c122 100644 --- a/src/pages/Article/index.tsx +++ b/src/pages/Article/index.tsx @@ -34,7 +34,7 @@ const ArticlePage = () => { const delArticleData = async (id: number) => { setLoading(true); - + await delArticleDataAPI(id); notification.success({ message: '🎉 删除文章成功' }) getArticleList(); diff --git a/src/pages/Setup/components/System/index.tsx b/src/pages/Setup/components/System/index.tsx index aba8d69..bec6524 100644 --- a/src/pages/Setup/components/System/index.tsx +++ b/src/pages/Setup/components/System/index.tsx @@ -47,7 +47,7 @@ const SystemPage = () => { } catch (error) { notification.error({ message: '错误', - description: '修改密码失败,请重试' + description: '修改密码失败,请重试:' + error }); } }; diff --git a/src/utils/request.ts b/src/utils/request.ts index 47363fc..501f032 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -3,8 +3,8 @@ import { Modal, notification } from "antd"; import { useUserStore } from "@/stores"; // 配置项目API域名 -export const baseURL = "http://localhost:9003/api"; -// export const baseURL = "http://api.liuyuyang.net/api"; +// export const baseURL = "http://localhost:9003/api"; +export const baseURL = "https://api.liuyuyang.net/api"; // 创建 axios 实例 export const instance = axios.create({