mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
fixes
This commit is contained in:
@@ -114,6 +114,16 @@ async function ensureWatchman() {
|
||||
// 获取新 token
|
||||
async function fetchToken() {
|
||||
const instance = await ensureWatchman()
|
||||
const raw = instance.getInstance()
|
||||
|
||||
await new Promise((resolve) => {
|
||||
const timer = setTimeout(() => resolve(), 15000)
|
||||
raw.I(() => {
|
||||
clearTimeout(timer)
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const timer = setTimeout(() => resolve(''), 15000)
|
||||
instance.getToken(BUSINESS_ID, (tk) => {
|
||||
|
||||
Reference in New Issue
Block a user