mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
fix: uid
This commit is contained in:
parent
d02bfa9036
commit
08be225ffc
2 changed files with 9 additions and 8 deletions
|
|
@ -10,7 +10,7 @@ export const rulePrefix = '^((#|\\%)?(zzz|ZZZ|绝区零))';
|
||||||
* @returns {Promise<Object>}
|
* @returns {Promise<Object>}
|
||||||
*/
|
*/
|
||||||
export const getCk = async (e, s = false) => {
|
export const getCk = async (e, s = false) => {
|
||||||
e.isSr = true;
|
e.isZZZ = true;
|
||||||
let stoken = '';
|
let stoken = '';
|
||||||
const user = new User(e);
|
const user = new User(e);
|
||||||
if (s) {
|
if (s) {
|
||||||
|
|
@ -25,16 +25,18 @@ export const getCk = async (e, s = false) => {
|
||||||
});
|
});
|
||||||
return ck;
|
return ck;
|
||||||
}
|
}
|
||||||
const mysUser = (await user.user()).getMysUser('zzz');
|
const mysUser = await user.user();
|
||||||
|
const zzzUser = mysUser.getMysUser('zzz');
|
||||||
|
const uid = mysUser.getCkUid('zzz');
|
||||||
let ck;
|
let ck;
|
||||||
if (mysUser) {
|
if (zzzUser) {
|
||||||
ck = {
|
ck = {
|
||||||
default: {
|
default: {
|
||||||
ck: `${stoken}${mysUser.ck}`,
|
ck: `${stoken}${zzzUser.ck}`,
|
||||||
uid: mysUser.getUid('zzz'),
|
uid: uid,
|
||||||
qq: '',
|
qq: '',
|
||||||
ltuid: mysUser.ltuid,
|
ltuid: zzzUser.ltuid,
|
||||||
device_id: mysUser.device,
|
device_id: zzzUser.device,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ export class ZZZPlugin extends plugin {
|
||||||
await this.reply('尚未绑定cookie,请先绑定cookie');
|
await this.reply('尚未绑定cookie,请先绑定cookie');
|
||||||
return { api: null, uid: null, deviceFp: null };
|
return { api: null, uid: null, deviceFp: null };
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 创建米游社 API 对象
|
// 创建米游社 API 对象
|
||||||
const api = new MysZZZApi(uid, ck);
|
const api = new MysZZZApi(uid, ck);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue