feat(utils/request): make configuring baseURL easier

This commit is contained in:
pan93412 2020-10-17 16:15:59 +02:00
parent a4bf6cd577
commit 5bc29f9200
No known key found for this signature in database
GPG Key ID: 42154B1B1CFE3377
2 changed files with 8 additions and 1 deletions

6
src/config/request.js Normal file
View File

@ -0,0 +1,6 @@
/**
* The base url of your API.
*
* The API can be found at https://github.com/Binaryify/NeteaseCloudMusicApi
*/
export const baseURL = "";

View File

@ -1,7 +1,8 @@
import axios from "axios";
import { baseURL } from "@/config/request";
const service = axios.create({
baseURL: "/api",
baseURL: baseURL,
withCredentials: true,
timeout: 15000,
});