From af49ad54f69cd76fec0dd77a55894fabe9b12b69 Mon Sep 17 00:00:00 2001
From: duandazhi <ab601026460@163.com>
Date: Fri, 16 Jul 2021 12:26:07 +0800
Subject: [PATCH] RuoYFileApplication-rename

---
 ruoyi-ui/src/api/login.js |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js
index f72fe46..4e9da7f 100644
--- a/ruoyi-ui/src/api/login.js
+++ b/ruoyi-ui/src/api/login.js
@@ -1,26 +1,19 @@
 import request from '@/utils/request'
 
-const client_id = 'web'
-const client_secret = '123456'
-const scope = 'server'
-
 // 登录方法
 export function login(username, password, code, uuid) {
-  const grant_type = 'password'
   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(refresh_token) {
-  const grant_type = 'refresh_token'
+export function refreshToken() {
   return request({
-    url: '/auth/oauth/token',
-    method: 'post',
-    params: { client_id, client_secret, grant_type, scope, refresh_token }
+    url: '/auth/refresh',
+    method: 'post'
   })
 }
 
@@ -35,7 +28,7 @@
 // 退出方法
 export function logout() {
   return request({
-    url: '/auth/token/logout',
+    url: '/auth/logout',
     method: 'delete'
   })
 }

--
Gitblit v1.9.3