From 18480590c9f039cbac7fbeb99925883e233bcbcd Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Mon, 11 Mar 2024 10:55:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.js | 50 ++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/src/api/login.js b/src/api/login.js index 36fbe87..6fc4cf2 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,55 +1,51 @@ -import request from '@/utils/request' -import { - UPMS_SREVICE, - AUTH_SREVICE, - SJZD_SREVICE -} from '@/api/module/urls' +import request from "@/utils/request"; +import { UPMS_SREVICE, AUTH_SREVICE, SJZD_SREVICE } from "@/api/module/urls"; -const client_id = 'web' -const client_secret = '123456' -const scope = 'server' +const client_id = "web"; +const client_secret = "123456"; +const scope = "server"; // 登录方法 export function login(username, password, clienttype) { return request({ - url: '/login', - method: 'post', + url: "/user/login", + method: "post", params: { username, password, - clienttype - } - }) + clienttype, + }, + }); } // 刷新方法 export function refreshToken() { return request({ - url: AUTH_SREVICE + '/auth/refresh', - method: 'post' - }) + url: AUTH_SREVICE + "/auth/refresh", + method: "post", + }); } // 获取用户详细信息 export function getInfo() { return request({ - url: UPMS_SREVICE + '/system/getInfo', - method: 'get' - }) + url: UPMS_SREVICE + "/system/getInfo", + method: "get", + }); } // 退出方法 export function logout() { return request({ - url: '/logout', - method: 'delete' - }) + url: "/user/logout", + method: "post", + }); } // 获取验证码 export function getCodeImg() { return request({ - url: '/code', - method: 'get' - }) -} \ No newline at end of file + url: "/code", + method: "get", + }); +}