From fdd0e29011021ba334318dce2f571442bf69bc2f Mon Sep 17 00:00:00 2001 From: Ntkskwk Date: Tue, 10 Sep 2024 02:48:13 +0800 Subject: refactor: package axios with utils lib --- src/utils/http.ts | 9 +++++++++ src/views/index/Notepad/changelog.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/utils/http.ts diff --git a/src/utils/http.ts b/src/utils/http.ts new file mode 100644 index 0000000..d49fad4 --- /dev/null +++ b/src/utils/http.ts @@ -0,0 +1,9 @@ +import axios from "axios"; + +const serviceAxios = axios.create({ + baseURL: "", + timeout: 3 * 1000, + withCredentials: false, +}); + +export default serviceAxios; \ No newline at end of file diff --git a/src/views/index/Notepad/changelog.ts b/src/views/index/Notepad/changelog.ts index 111f8f2..1090c6c 100644 --- a/src/views/index/Notepad/changelog.ts +++ b/src/views/index/Notepad/changelog.ts @@ -1,4 +1,4 @@ -import axios from 'axios'; +import http from '@/utils/http' export const getChangeLog = async() => { -- cgit v1.2.3-70-g09d2