This commit is contained in:
bietiaop 2024-07-08 16:27:34 +08:00
parent 5d109ef51c
commit 4828a31163
11 changed files with 100 additions and 126 deletions

View file

@ -1,4 +1,3 @@
// import User from "../../xiaoyao-cvs-plugin/model/user.js";
import fetch from 'node-fetch';
import MysZZZApi from './mysapi.js';
let User;
@ -12,7 +11,7 @@ try {
* 此方法依赖逍遥插件
* @returns {Promise<void>}
*/
export async function getAuthKey(e, srUid, authAppid = 'csc') {
export async function getAuthKey(e, zzzUid, authAppid = 'csc') {
if (!User) {
throw new Error('未安装逍遥插件,无法自动刷新抽卡链接');
}
@ -21,7 +20,7 @@ export async function getAuthKey(e, srUid, authAppid = 'csc') {
await user.getCookie(e);
let ck = await user.getStoken(e.user_id);
ck = `stuid=${ck.stuid};stoken=${ck.stoken};mid=${ck.mid};`;
let api = new MysZZZApi(srUid, ck);
let api = new MysZZZApi(zzzUid, ck);
let type = 'zzzPayAuthKey';
switch (authAppid) {
case 'csc': {