mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
Merge branch 'ZZZure:main' into main
This commit is contained in:
commit
0e8af7f3ed
4 changed files with 33 additions and 20 deletions
|
|
@ -10,4 +10,6 @@ mysCode:
|
|||
- 1034
|
||||
- 10035
|
||||
# 自定义绑定设备下载url
|
||||
url: https://ghproxy.mihomo.me/https://raw.githubusercontent.com/forchannot/get_device_info/main/app/build/outputs/apk/debug/app-debug.apk
|
||||
url: https://ghproxy.mihomo.me/https://raw.githubusercontent.com/forchannot/get_device_info/main/app/build/outputs/apk/debug/app-debug.apk
|
||||
# 自定义enkaApi地址
|
||||
enkaApi:
|
||||
|
|
@ -53,6 +53,15 @@ export function supportGuoba() {
|
|||
placeholder: '请输入绑定设备apk下载url',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'config.enkaApi',
|
||||
label: '自定义enkaApi地址',
|
||||
bottomHelpMessage: '设置自定义的enkaApi地址',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入enkaApi地址',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'config.query.others',
|
||||
label: '查询他人信息',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
import { Enka2Mys } from './formater.js'
|
||||
import fetch from 'node-fetch'
|
||||
import request from '../../utils/request.js'
|
||||
import settings from '../../lib/settings.js'
|
||||
import _ from 'lodash'
|
||||
|
||||
const EnkaApi = 'https://enka.network/api/zzz/uid/'
|
||||
const config = settings.getConfig('config')
|
||||
const EnkaApi = _.get(config, 'enkaApi') ?? 'https://enka.network/api/zzz/uid/'
|
||||
|
||||
export function parsePlayerInfo(SocialDetail = {}) {
|
||||
const ProfileDetail = SocialDetail.ProfileDetail || {}
|
||||
|
|
@ -23,7 +26,7 @@ export function parsePlayerInfo(SocialDetail = {}) {
|
|||
* @param {string|number} uid
|
||||
*/
|
||||
export async function refreshPanelFromEnka(uid) {
|
||||
const res = await fetch(`${EnkaApi}${uid}`, {
|
||||
const res = await request(`${EnkaApi}${uid}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'User-Agent': 'ZZZ-Plugin/UCPr',
|
||||
|
|
@ -47,18 +50,3 @@ export async function refreshPanelFromEnka(uid) {
|
|||
panelList: Enka2Mys(panelList)
|
||||
}
|
||||
}
|
||||
|
||||
// import fs from 'fs'
|
||||
// const uid = 11070609
|
||||
// const res = await fetch(`${EnkaApi}${uid}`, {
|
||||
// method: 'GET',
|
||||
// headers: {
|
||||
// 'User-Agent': 'ZZZ-Plugin/UCPr',
|
||||
// }
|
||||
// })
|
||||
// if (!res.ok) {
|
||||
// console.log(`Enka更新面板失败:${res.status} ${res.statusText}`)
|
||||
// }
|
||||
// const data = await res.json()
|
||||
// console.log(data)
|
||||
// fs.writeFileSync('enkaPanel1.json', JSON.stringify(data, null, 2))
|
||||
|
|
@ -490,5 +490,19 @@
|
|||
"异常精通": 0,
|
||||
"异常掌控": 0,
|
||||
"物理属性伤害加成": 1
|
||||
},
|
||||
"橘福福": {
|
||||
"生命值百分比": 0,
|
||||
"攻击力百分比": 1,
|
||||
"防御力百分比": 0,
|
||||
"冲击力": 1,
|
||||
"暴击率": 1,
|
||||
"暴击伤害": 0.75,
|
||||
"穿透率": 0.75,
|
||||
"穿透值": 0.25,
|
||||
"能量自动回复": 0.5,
|
||||
"异常精通": 0,
|
||||
"异常掌控": 0,
|
||||
"火属性伤害加成": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue