修正miaoApi下星铁面板游戏识别错误的问题

This commit is contained in:
Kokomi 2023-10-23 11:11:08 +08:00
parent b4a8fbf659
commit 832902b239
3 changed files with 4 additions and 3 deletions

View File

@ -228,7 +228,7 @@ export default class Player extends Base {
async forEachAvatar (fn) {
for (let id in this._avatars) {
let avatar = this.getAvatar(id)
if (avatar && avatar.hasData) {
if (avatar && avatar.hasData && avatar.game === this.game) {
let ret = fn(avatar, id)
ret = Data.isPromise(ret) ? await ret : ret
if (ret === false) {

View File

@ -69,7 +69,7 @@ export default class ProfileReq extends Base {
let self = this
this.serv = serv
let uid = this.uid
let reqParam = await serv.getReqParam(uid, self.game)
let reqParam = await serv.getReqParam(uid, player.game)
let cdTime = await this.inCd()
if (cdTime && !process.argv.includes('web-debug')) {
// return this.err(`请求过快,请${cdTime}秒后重试..`)
@ -109,7 +109,7 @@ export default class ProfileReq extends Base {
self._isReq = false
data = {}
}
data = await serv.response(data, this, self.game)
data = await serv.response(data, this, player.game)
// 设置CD
cdTime = serv.getCdTime(data)
if (cdTime) {

View File

@ -36,6 +36,7 @@ export default class ProfileServ extends Base {
let url = this.getCfg('url')
let profileApi = this.getCfg('listApi')
let cfg = this._cfg
let api = profileApi({
url,
uid: uid,