新增自定义源,但需要注意的是,移动端自定义源的环境与PC端不同,某些API不可用

This commit is contained in:
lyswhut
2023-11-03 21:04:28 +08:00
parent 1021bda5d5
commit e612a169de
38 changed files with 2090 additions and 29 deletions

View File

@ -47,6 +47,7 @@ for (const api of apiSourceInfo) {
const getAPI = source => apiList[`${settingState.setting['common.apiSource']}_api_${source}`]
const apis = source => {
if (/^user_api/.test(settingState.setting['common.apiSource'])) return global.lx.apis[source]
const api = getAPI(source)
if (api) return api
throw new Error('Api is not found')