This commit is contained in:
bietiaop 2024-07-30 19:37:40 +08:00
parent d02bfa9036
commit 08be225ffc
2 changed files with 9 additions and 8 deletions

View file

@ -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,
}, },
}; };
} }

View file

@ -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);