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
|
2022-07-30 20:20:10 +00:00
|
|
|
|
let token = diyCfg?.miaoApi?.token
|
2022-11-12 14:05:40 +00:00
|
|
|
|
let qq = diyCfg?.miaoApi?.qq
|
|
|
|
|
if (qq && token && token.length === 32 && !/^test/.test(token)) {
|
2022-07-27 18:36:49 +00:00
|
|
|
|
return Miao
|
|
|
|
|
}
|
|
|
|
|
return Enka
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const miaoApi = {
|
2022-11-09 21:25:19 +00:00
|
|
|
|
listApi: ({ uid, diyCfg }) => {
|
|
|
|
|
let qq = /\d{5,12}/.test(diyCfg.qq) ? diyCfg.qq : 'none'
|
|
|
|
|
let token = diyCfg.token
|
|
|
|
|
return `http://miaoapi.cn/profile/data?uid=${uid}&qq=${qq}&token=${token}`
|
2022-07-27 18:36:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const enkaApi = {
|
2022-08-03 17:51:48 +00:00
|
|
|
|
url: 'https://enka.network/',
|
2022-07-29 17:54:09 +00:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|
2022-07-30 20:20:10 +00:00
|
|
|
|
|
|
|
|
|
export const requestInterval = 5
|
2022-08-18 10:13:42 +00:00
|
|
|
|
|
|
|
|
|
export const isSys = true
|