miao-plugin/config/system/profile.js

38 lines
894 B
JavaScript
Raw Normal View History

2022-07-27 18:36:49 +00:00
/*
* 此配置文件为系统使用请勿修改否则可能无法正常使用
2022-07-28 14:53:17 +00:00
* 如需自定义配置请复制修改上一级profile_default.js
2022-07-27 18:36:49 +00:00
* */
2022-08-18 10:13:42 +00:00
export const getProfileServ = ({ uid, serv, diyCfg }) => {
let { Miao, Enka } = serv
let token = diyCfg?.miaoApi?.token
if (token && token.length === 32) {
2022-07-27 18:36:49 +00:00
return Miao
}
return Enka
}
export const miaoApi = {
url: 'http://49.232.91.210/profile',
2022-08-18 10:13:42 +00:00
listApi: ({ url, uid, diyCfg }) => {
return `${url}/data?uid=${uid}&token=${diyCfg.token}`
2022-07-27 18:36:49 +00:00
}
}
export const enkaApi = {
url: 'https://enka.network/',
userAgent: 'Miao-Plugin/3.0',
2022-08-18 10:13:42 +00:00
listApi: ({ url, uid, diyCfg }) => {
let api = `${url}u/${uid}/__data.json`
if (diyCfg?.apiKey) {
api += '?key=' + diyCfg.apiKey
}
return api
2022-07-27 18:36:49 +00:00
}
}
/* 请求面板的冷却时间,单位分钟 */
export const requestInterval = 5
2022-08-18 10:13:42 +00:00
export const isSys = true