mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
style(projects): update prettier config
This commit is contained in:
@ -7,7 +7,7 @@ import {
|
||||
handleAxiosError,
|
||||
handleResponseError,
|
||||
handleBackendError,
|
||||
handleServiceResult,
|
||||
handleServiceResult
|
||||
} from '@/utils';
|
||||
import { handleRefreshToken } from './helpers';
|
||||
|
||||
@ -31,7 +31,7 @@ export default class CustomAxiosInstance {
|
||||
codeKey: 'code',
|
||||
dataKey: 'data',
|
||||
msgKey: 'message',
|
||||
successCode: 200,
|
||||
successCode: 200
|
||||
}
|
||||
) {
|
||||
this.backendConfig = backendConfig;
|
||||
@ -42,7 +42,7 @@ export default class CustomAxiosInstance {
|
||||
/** 设置请求拦截器 */
|
||||
setInterceptor() {
|
||||
this.instance.interceptors.request.use(
|
||||
async (config) => {
|
||||
async config => {
|
||||
const handleConfig = { ...config };
|
||||
if (handleConfig.headers) {
|
||||
// 数据转换
|
||||
@ -59,7 +59,7 @@ export default class CustomAxiosInstance {
|
||||
}
|
||||
);
|
||||
this.instance.interceptors.response.use(
|
||||
async (response) => {
|
||||
async response => {
|
||||
const { status } = response;
|
||||
if (status === 200 || status < 300 || status === 304) {
|
||||
const backend = response.data;
|
||||
|
@ -85,7 +85,7 @@ export function createRequest(axiosConfig: AxiosRequestConfig, backendConfig?: S
|
||||
get,
|
||||
post,
|
||||
put,
|
||||
delete: handleDelete,
|
||||
delete: handleDelete
|
||||
};
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ export function createHookRequest(axiosConfig: AxiosRequestConfig, backendConfig
|
||||
data,
|
||||
error,
|
||||
loading,
|
||||
network,
|
||||
network
|
||||
};
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ export function createHookRequest(axiosConfig: AxiosRequestConfig, backendConfig
|
||||
get,
|
||||
post,
|
||||
put,
|
||||
delete: handleDelete,
|
||||
delete: handleDelete
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user