智慧园区前端大屏
shuishen
2024-12-18 9a37c5e1b2190c3f6ec71483923922189091dd52
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',
    },
  })