From 4cc4e8a8fa341fd2e375566eb2aefddc03aa97f4 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 06 Jan 2021 12:00:41 +0800
Subject: [PATCH] 编码解码用户名,防止中文出现乱码
---
ruoyi-ui/src/api/login.js | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js
index 9aa93ca..8b39686 100644
--- a/ruoyi-ui/src/api/login.js
+++ b/ruoyi-ui/src/api/login.js
@@ -2,15 +2,22 @@
const client_id = 'web'
const client_secret = '123456'
-const grant_type = 'password'
const scope = 'server'
// 登录方法
export function login(username, password, code, uuid) {
return request({
- url: '/auth/oauth/token',
+ url: '/auth/login',
method: 'post',
- params: { username, password, code, uuid, client_id, client_secret, grant_type, scope }
+ data: { username, password, code, uuid }
+ })
+}
+
+// 刷新方法
+export function refreshToken() {
+ return request({
+ url: '/auth/refresh',
+ method: 'post'
})
}
@@ -25,7 +32,7 @@
// 退出方法
export function logout() {
return request({
- url: '/auth/token/logout',
+ url: '/auth/logout',
method: 'delete'
})
}
--
Gitblit v1.9.3