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() }