From 474acdc64f4cb0edf311265a2c1b1161800e564a Mon Sep 17 00:00:00 2001 From: liwenqiang Date: Tue, 29 Oct 2024 16:04:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E7=99=BB=E5=BD=95=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/authentication.ts | 3 +-- src/boot/msw-server.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api/authentication.ts b/src/api/authentication.ts index aa0bd21..9d760bf 100644 --- a/src/api/authentication.ts +++ b/src/api/authentication.ts @@ -8,8 +8,7 @@ import { SERVER_URL } from 'src/api/paths' * @returns token */ export const signin = (username: string, password: string) => { - return api.post(SERVER_URL.SIGNIN, {}, { auth: { username, password } }) - // return api.post(SERVER_URL.SIGNIN, new URLSearchParams({ username, password })) + return api.post(SERVER_URL.SIGNIN, new URLSearchParams({ username, password })) } /** diff --git a/src/boot/msw-server.ts b/src/boot/msw-server.ts index 5d4772c..873112d 100644 --- a/src/boot/msw-server.ts +++ b/src/boot/msw-server.ts @@ -4,7 +4,7 @@ import { handlers } from 'src/mocks/handlers' // 您的请求处理程序 export default boot(() => { // dev - if (!process.env.DEV) { + if (process.env.DEV) { const worker = setupWorker(...handlers) worker.start() }