mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
16 lines
376 B
TypeScript
16 lines
376 B
TypeScript
import axios from 'axios'
|
|
|
|
/** @type {string} localStorage保存自定义阅读http服务接口的键值 */
|
|
export const baseURL_localStorage_key = 'remoteUrl'
|
|
const SECOND = 1000
|
|
|
|
const ajax = axios.create({
|
|
baseURL:
|
|
import.meta.env.VITE_API ||
|
|
localStorage.getItem(baseURL_localStorage_key) ||
|
|
location.origin,
|
|
timeout: 120 * SECOND,
|
|
})
|
|
|
|
export default ajax
|