与自己实现的 interceptor 配合 | import createLoaingIntercepotrs from '@jswork/nprogress-interceptor';
const loadingIntercepotrs = createLoaingIntercepotrs();
const opts = {
adapter: 'Axios',
slim: true,
interceptors: [...interceptorRequest, ...interceptorResponse, ...loadingIntercepotrs],
transformResponse(inResponse) {
return inResponse.data;
},
};
nx.$api = httpSchema(schema, opts);
|