mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
7e9817cc17
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Former-commit-id: 6fbe83de8e476b5b6de173cdaef67ddebfe3049f
18 lines
283 B
JavaScript
18 lines
283 B
JavaScript
import axios from 'axios';
|
|
|
|
const api = axios.create({
|
|
baseURL: '/api',
|
|
timeout: 30000,
|
|
});
|
|
|
|
api.interceptors.request.use((config) => {
|
|
return config;
|
|
});
|
|
|
|
api.interceptors.response.use(
|
|
(response) => response.data,
|
|
(error) => Promise.reject(error)
|
|
);
|
|
|
|
export default api;
|