feat:自定义enkaApi地址#134

This commit is contained in:
kissnavel 2025-06-29 16:08:05 +08:00
parent 76f23141f8
commit 79d0aa6773
3 changed files with 16 additions and 2 deletions

View file

@ -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:

View file

@ -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: '查询他人信息',

View file

@ -1,7 +1,10 @@
import { Enka2Mys } from './formater.js'
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 || {}