mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix:ck
This commit is contained in:
parent
1f298a64c9
commit
d6ab61fe5a
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue