退出登录

newHome1.0
fanluyan 1 year ago
parent f44cee9ec8
commit 18480590c9

@ -1,55 +1,51 @@
import request from '@/utils/request' import request from "@/utils/request";
import { import { UPMS_SREVICE, AUTH_SREVICE, SJZD_SREVICE } from "@/api/module/urls";
UPMS_SREVICE,
AUTH_SREVICE,
SJZD_SREVICE
} from '@/api/module/urls'
const client_id = 'web' const client_id = "web";
const client_secret = '123456' const client_secret = "123456";
const scope = 'server' const scope = "server";
// 登录方法 // 登录方法
export function login(username, password, clienttype) { export function login(username, password, clienttype) {
return request({ return request({
url: '/login', url: "/user/login",
method: 'post', method: "post",
params: { params: {
username, username,
password, password,
clienttype clienttype,
} },
}) });
} }
// 刷新方法 // 刷新方法
export function refreshToken() { export function refreshToken() {
return request({ return request({
url: AUTH_SREVICE + '/auth/refresh', url: AUTH_SREVICE + "/auth/refresh",
method: 'post' method: "post",
}) });
} }
// 获取用户详细信息 // 获取用户详细信息
export function getInfo() { export function getInfo() {
return request({ return request({
url: UPMS_SREVICE + '/system/getInfo', url: UPMS_SREVICE + "/system/getInfo",
method: 'get' method: "get",
}) });
} }
// 退出方法 // 退出方法
export function logout() { export function logout() {
return request({ return request({
url: '/logout', url: "/user/logout",
method: 'delete' method: "post",
}) });
} }
// 获取验证码 // 获取验证码
export function getCodeImg() { export function getCodeImg() {
return request({ return request({
url: '/code', url: "/code",
method: 'get' method: "get",
}) });
} }
Loading…
Cancel
Save