aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorNtkskwk <natsukawa247@outlook.com>2024-09-10 02:48:13 +0800
committerNtkskwk <natsukawa247@outlook.com>2024-09-10 02:51:59 +0800
commitfdd0e29011021ba334318dce2f571442bf69bc2f (patch)
tree4c3c4c9f2e5976036fbcb9424612ac1616dee5c4 /src
parent9ec3a2965c0e25f230b397a01c3c8b0543e61956 (diff)
downloadHydroRollSite-fdd0e29011021ba334318dce2f571442bf69bc2f.tar.gz
HydroRollSite-fdd0e29011021ba334318dce2f571442bf69bc2f.zip
refactor: package axios with utils lib
Diffstat (limited to 'src')
-rw-r--r--src/utils/http.ts9
-rw-r--r--src/views/index/Notepad/changelog.ts2
2 files changed, 10 insertions, 1 deletions
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() =>
{