This commit is contained in:
ElyPrism 2026-08-07 13:45:01 +08:00
parent 543660fcdf
commit a2a2a40d71
No known key found for this signature in database
2 changed files with 11 additions and 1 deletions

View File

@ -239,7 +239,7 @@ module.exports = async (query, request) => {
const res = await request(
`/api/ad/listening/rights/gain`,
data,
createOption(query, 'eapi', 'v2'),
createOption(query, 'xeapi', 'v3'),
)
return {

View File

@ -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) => {