From 8f9d48be28aae04422edb407b18107e379cbda23 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 21 Nov 2024 13:48:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/main'
---
src/api/user.js | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/src/api/user.js b/src/api/user.js
index c96cec6..dcad943 100644
--- a/src/api/user.js
+++ b/src/api/user.js
@@ -1,3 +1,13 @@
+/*
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2024-10-30 15:34:08
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-11-21 12:18:06
+ * @FilePath: \bigScreen\src\api\user.js
+ * @Description:
+ *
+ * Copyright (c) 2024 by shuishen, All Rights Reserved.
+ */
import request from 'utils/http'
export const loginByUsername = (tenantId, deptId, roleId, username, password, type, key, code) =>
@@ -26,4 +36,21 @@
url: '/blade-auth/oauth/logout',
method: 'get',
authorization: false,
+ })
+
+export const refreshToken = (refresh_token, tenantId, deptId, roleId) =>
+ request({
+ url: '/blade-auth/oauth/token',
+ method: 'post',
+ headers: {
+ 'Tenant-Id': tenantId,
+ 'Dept-Id': deptId || '',
+ 'Role-Id': roleId || '',
+ },
+ params: {
+ tenantId,
+ refresh_token,
+ grant_type: 'refresh_token',
+ scope: 'all',
+ },
})
\ No newline at end of file
--
Gitblit v1.9.3