mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
fix:无效url
This commit is contained in:
parent
79d0aa6773
commit
38939c366e
1 changed files with 4 additions and 4 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { Enka2Mys } from './formater.js'
|
||||
import request from '../../utils/request.js'
|
||||
import fetch from 'node-fetch'
|
||||
import settings from '../../lib/settings.js'
|
||||
import _ from 'lodash'
|
||||
|
||||
const config = settings.getConfig('config')
|
||||
const EnkaApi = _.get(config, 'enkaApi') ?? 'https://enka.network/api/zzz/uid/'
|
||||
const EnkaApi = _.get(config, 'enkaApi') || 'https://enka.network/api/zzz/uid/'
|
||||
|
||||
export function parsePlayerInfo(SocialDetail = {}) {
|
||||
const ProfileDetail = SocialDetail.ProfileDetail || {}
|
||||
|
|
@ -26,7 +26,7 @@ export function parsePlayerInfo(SocialDetail = {}) {
|
|||
* @param {string|number} uid
|
||||
*/
|
||||
export async function refreshPanelFromEnka(uid) {
|
||||
const res = await request(`${EnkaApi}${uid}`, {
|
||||
const res = await fetch(`${EnkaApi}${uid}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'User-Agent': 'ZZZ-Plugin/UCPr',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue