style(projects): update prettier config

This commit is contained in:
Soybean
2022-04-01 14:47:57 +08:00
parent ca2dfa6185
commit df56abe18d
128 changed files with 2237 additions and 2037 deletions

View File

@ -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;

View File

@ -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
};
}