refactor(modules/web): Mirgrat to typescript; fix bugs

This commit is contained in:
Xwite
2024-10-14 21:46:45 +08:00
parent b95deeb607
commit 7984c45cb9
81 changed files with 6396 additions and 3166 deletions
+15
View File
@@ -0,0 +1,15 @@
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