mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
Some checks failed
Build and push Docker images / docker (push) Failing after 2m16s
Mirror and run GitLab CI / build (push) Failing after 1m44s
Publishing to NPM / publish (push) Failing after 14s
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Failing after 1m41s
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Failing after 52s
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Failing after 52s
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linux) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linuxstatic) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
28 lines
945 B
JavaScript
28 lines
945 B
JavaScript
const { login } = require('./login');
|
|
const { isMe } = require('./check');
|
|
const { clear } = require('./clear');
|
|
const { start } = require('./lottery');
|
|
const { account } = require('./account');
|
|
const global_var = require('./data/global_var');
|
|
const bili = require('./net/bili');
|
|
const { log } = require('./utils');
|
|
const { sendNotify } = require('./helper/notify');
|
|
|
|
/**
|
|
* 检查cookie是否有效
|
|
* @param {string} num
|
|
*/
|
|
async function checkCookie(num) {
|
|
const My_UID = global_var.get('myUID');
|
|
if (await bili.getMyinfo()) {
|
|
log.info('Cookie有效性检测', `成功登录 UID:${My_UID}`);
|
|
return true;
|
|
} else {
|
|
log.error('Cookie有效性检测', `登录失败 COOKIE${num} 已失效 UID:${My_UID}`);
|
|
await sendNotify('动态抽奖出错-登录失败', `COOKIE${num} 已失效 UID:${My_UID}`);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
module.exports = { login, start, isMe, clear, checkCookie, account }; |