This commit is contained in:
bietiaop 2024-07-15 15:38:19 +08:00
parent 1f298a64c9
commit d6ab61fe5a

View file

@ -26,9 +26,11 @@ export default class MysZZZApi extends MysApi {
this.uid = uid;
this.server = this.getServer(uid);
this.apiTool = new ZZZApiTool(uid, this.server);
if (typeof this.cookie != 'string' && this.cookie) {
let ck =
this.cookie[Object.keys(this.cookie).filter(k => this.cookie[k].ck)[0]];
if (typeof this.cookie !== 'string' && this.cookie) {
const ck = Object.values(this.cookie).find(item => {
return item.ck && item.uid === uid;
});
logger.debug(ck);
this._device = ck?.device_id || ck?.device;
this.cookie = ck?.ck;
}