mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 12:51:30 +00:00
37 lines
842 B
JavaScript
37 lines
842 B
JavaScript
/*
|
|
* 此配置文件为系统使用,请勿修改,否则可能无法正常使用
|
|
* 如需自定义配置请复制修改上一级profile_default.js
|
|
* */
|
|
|
|
export const getProfileServ = ({ uid, serv, diyCfg }) => {
|
|
let { Miao, Enka } = serv
|
|
let token = diyCfg?.miaoApi?.token
|
|
if (token && token.length === 32) {
|
|
return Miao
|
|
}
|
|
return Enka
|
|
}
|
|
|
|
export const miaoApi = {
|
|
url: 'http://miaoapi.cn/profile',
|
|
listApi: ({ url, uid, diyCfg }) => {
|
|
return `${url}/data?uid=${uid}&token=${diyCfg.token}`
|
|
}
|
|
}
|
|
|
|
export const enkaApi = {
|
|
url: 'https://enka.network/',
|
|
userAgent: 'Miao-Plugin/3.0',
|
|
listApi: ({ url, uid, diyCfg }) => {
|
|
let api = `${url}u/${uid}/__data.json`
|
|
if (diyCfg?.apiKey) {
|
|
api += '?key=' + diyCfg.apiKey
|
|
}
|
|
return api
|
|
}
|
|
}
|
|
|
|
export const requestInterval = 5
|
|
|
|
export const isSys = true
|