|
|
@@ -1,7 +1,6 @@ |
|
|
|
import http from '@/http/api.js' |
|
|
|
|
|
|
|
// 获取token |
|
|
|
const token = (tenantId, username, password, type) => { |
|
|
|
export const token = (tenantId, username, password, type) => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-auth/oauth/token', |
|
|
|
method: 'POST', |
|
|
@@ -18,7 +17,7 @@ const token = (tenantId, username, password, type) => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
const getTenantId = (params) => { |
|
|
|
export const getTenantId = (params) => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-auth/oauth/getTenantId', |
|
|
|
method: 'get', |
|
|
@@ -28,7 +27,7 @@ const getTenantId = (params) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const refreshToken = (refresh_token, tenantId) => { |
|
|
|
export const refreshToken = (refresh_token, tenantId) => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-auth/oauth/token', |
|
|
|
method: 'post', |
|
|
@@ -45,7 +44,7 @@ const refreshToken = (refresh_token, tenantId) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 获取用户信息 |
|
|
|
const userInfo = () => { |
|
|
|
export const userInfo = () => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-user/info', |
|
|
|
method: 'GET', |
|
|
@@ -60,14 +59,8 @@ export const getUser = (id) => { |
|
|
|
params: { id } |
|
|
|
}) |
|
|
|
} |
|
|
|
export const getUserInfo = () => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-user/info', |
|
|
|
method: 'get', |
|
|
|
}) |
|
|
|
} |
|
|
|
/* 修改用户信息 */ |
|
|
|
const updateInfo = (row) => { |
|
|
|
export const updateInfo = (row) => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-user/update-info', |
|
|
|
method: 'post', |
|
|
@@ -75,7 +68,7 @@ const updateInfo = (row) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
// 修改密码 |
|
|
|
const updatePassword = (data) => { |
|
|
|
export const updatePassword = (data) => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-user/update-password', |
|
|
|
method: 'post', |
|
|
@@ -83,20 +76,10 @@ const updatePassword = (data) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
// 修改密码 |
|
|
|
const passwordCheck = (data) => { |
|
|
|
export const passwordCheck = (data) => { |
|
|
|
return http.request({ |
|
|
|
url: '/api/blade-user/passwordCheck', |
|
|
|
method: 'post', |
|
|
|
params: data |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
export default { |
|
|
|
token, |
|
|
|
userInfo, |
|
|
|
refreshToken, |
|
|
|
getTenantId, |
|
|
|
updatePassword, |
|
|
|
updateInfo, |
|
|
|
passwordCheck |
|
|
|
} |