|
@@ -2,7 +2,7 @@ import {httpApi} from "../request/httpApi";
|
|
|
import website from "~src/config/index";
|
|
|
import md5 from 'js-md5'
|
|
|
|
|
|
-export const userLogin = ({tenantId, deptId, roleId, username, password, type, key, code}) => httpApi({
|
|
|
+export const userLogin = ({tenantId, deptId, roleId, username, password, type, key, code}, msg = true) => httpApi({
|
|
|
url: '/api/blade-auth/oauth/token',
|
|
|
method: 'post',
|
|
|
headers: {
|
|
@@ -20,9 +20,9 @@ export const userLogin = ({tenantId, deptId, roleId, username, password, type, k
|
|
|
scope: "all",
|
|
|
type
|
|
|
}
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-export const refreshToken = (refresh_token, tenantId, deptId, roleId) => httpApi({
|
|
|
+export const refreshToken = (refresh_token, tenantId, deptId, roleId, msg = true) => httpApi({
|
|
|
url: '/api/blade-auth/oauth/token',
|
|
|
method: 'post',
|
|
|
headers: {
|
|
@@ -36,15 +36,14 @@ export const refreshToken = (refresh_token, tenantId, deptId, roleId) => httpApi
|
|
|
grant_type: "refresh_token",
|
|
|
scope: "all",
|
|
|
}
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-export const logout = () => httpApi({
|
|
|
+export const logout = (msg = true) => httpApi({
|
|
|
url: '/api/blade-auth/oauth/logout',
|
|
|
method: 'get'
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-
|
|
|
-export const registerGuest = (form, oauthId) => httpApi({
|
|
|
+export const registerGuest = (form, oauthId, msg = true) => httpApi({
|
|
|
url: '/api/blade-user/register-guest',
|
|
|
method: 'post',
|
|
|
params: {
|
|
@@ -54,30 +53,30 @@ export const registerGuest = (form, oauthId) => httpApi({
|
|
|
password: form.password,
|
|
|
oauthId
|
|
|
}
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-export const getProjectAndContract = () => httpApi({
|
|
|
+export const getProjectAndContract = (msg = true) => httpApi({
|
|
|
url: '/api/blade-business/userViewProjectContract/queryUserViewProjectAndContract',
|
|
|
method: 'get'
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-export const getCaptcha = () => httpApi({
|
|
|
+export const getCaptcha = (msg = true) => httpApi({
|
|
|
url: '/api/blade-auth/oauth/captcha',
|
|
|
method: 'get'
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-export const getUserInfo = () => httpApi({
|
|
|
+export const getUserInfo = (msg = true) => httpApi({
|
|
|
url: '/api/blade-auth/oauth/user-info',
|
|
|
method: 'get'
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-export const sendLogs = (list) => httpApi({
|
|
|
+export const sendLogs = (list, msg = true) => httpApi({
|
|
|
url: '/api/blade-auth/oauth/logout',
|
|
|
method: 'post',
|
|
|
data: list
|
|
|
-});
|
|
|
+}, msg);
|
|
|
|
|
|
-export const clearCache = () => httpApi({
|
|
|
+export const clearCache = (msg = true) => httpApi({
|
|
|
url: '/api/blade-auth/oauth/clear-cache',
|
|
|
method: 'get'
|
|
|
-});
|
|
|
+}, msg);
|