guoshilong
2022-10-14 d8e0af2ce345f3b40581ad05c596f965ae729c01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import http from '@/http/api.js'
 
// 获取token
const token = (tenantId, username, password, type) => {
    return http.request({
        url: '/blade-auth/oauth/token',
        method: 'POST',
        header: {
            'Tenant-Id': tenantId
        },
        params: {
            tenantId,
            username,
            password,
            grant_type: "password",
            scope: "all",
            type
        }
    })
}
 
// 获取用户信息
const userInfo = () => {
    return http.request({
        url: '/blade-user/info',
        method: 'GET',
    })
}
 
export default {
    token,
    userInfo
}