mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 09:30:10 +08:00
[fix] Schedule fixed #68
This commit is contained in:
parent
b8686392e1
commit
86bc55fc1a
@ -20,8 +20,6 @@ class AnchorRaffle extends BaseRaffle
|
|||||||
const ACTIVE_TITLE = '天选时刻';
|
const ACTIVE_TITLE = '天选时刻';
|
||||||
const ACTIVE_SWITCH = 'USE_ANCHOR';
|
const ACTIVE_SWITCH = 'USE_ANCHOR';
|
||||||
|
|
||||||
use TimeLock;
|
|
||||||
|
|
||||||
protected static $wait_list = [];
|
protected static $wait_list = [];
|
||||||
protected static $finish_list = [];
|
protected static $finish_list = [];
|
||||||
protected static $all_list = [];
|
protected static $all_list = [];
|
||||||
|
|||||||
@ -249,6 +249,9 @@ class CapsuleLottery
|
|||||||
private static function xHeartBeat(int $index = 1): array
|
private static function xHeartBeat(int $index = 1): array
|
||||||
{
|
{
|
||||||
$s_data = self::encParamS($index);
|
$s_data = self::encParamS($index);
|
||||||
|
if (!$s_data) {
|
||||||
|
return ['status' => false];
|
||||||
|
}
|
||||||
$s = $s_data['s'];
|
$s = $s_data['s'];
|
||||||
$t = $s_data['payload'];
|
$t = $s_data['payload'];
|
||||||
|
|
||||||
@ -284,13 +287,12 @@ class CapsuleLottery
|
|||||||
return ['status' => true];
|
return ['status' => true];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @use 加密参数S
|
* @use 加密参数S
|
||||||
* @param int $index
|
* @param int $index
|
||||||
* @return array
|
* @return array|false
|
||||||
*/
|
*/
|
||||||
private static function encParamS(int $index): array
|
private static function encParamS(int $index)
|
||||||
{
|
{
|
||||||
// 转换index
|
// 转换index
|
||||||
$temp = json_decode(self::$hb_payload['id'], true);
|
$temp = json_decode(self::$hb_payload['id'], true);
|
||||||
@ -314,12 +316,16 @@ class CapsuleLottery
|
|||||||
];
|
];
|
||||||
$data = Curl::put('other', self::$enc_server, $payload, $headers);
|
$data = Curl::put('other', self::$enc_server, $payload, $headers);
|
||||||
$de_raw = json_decode($data, true);
|
$de_raw = json_decode($data, true);
|
||||||
Log::info("S参数加密 {$de_raw['s']}");
|
if ($de_raw['code'] == 0) {
|
||||||
|
Log::info("S加密成功 {$de_raw['s']}");
|
||||||
return [
|
return [
|
||||||
's' => $de_raw['s'],
|
's' => $de_raw['s'],
|
||||||
'payload' => $payload['t']
|
'payload' => $payload['t']
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
Log::warning("S加密成功 {$de_raw['message']}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -20,8 +20,6 @@ class GiftRaffle extends BaseRaffle
|
|||||||
const ACTIVE_TITLE = '活动礼物';
|
const ACTIVE_TITLE = '活动礼物';
|
||||||
const ACTIVE_SWITCH = 'USE_ACTIVE';
|
const ACTIVE_SWITCH = 'USE_ACTIVE';
|
||||||
|
|
||||||
use TimeLock;
|
|
||||||
|
|
||||||
protected static $wait_list = [];
|
protected static $wait_list = [];
|
||||||
protected static $finish_list = [];
|
protected static $finish_list = [];
|
||||||
protected static $all_list = [];
|
protected static $all_list = [];
|
||||||
|
|||||||
@ -20,8 +20,6 @@ class GuardRaffle extends BaseRaffle
|
|||||||
const ACTIVE_TITLE = '总督舰长';
|
const ACTIVE_TITLE = '总督舰长';
|
||||||
const ACTIVE_SWITCH = 'USE_GUARD';
|
const ACTIVE_SWITCH = 'USE_GUARD';
|
||||||
|
|
||||||
use TimeLock;
|
|
||||||
|
|
||||||
protected static $wait_list = [];
|
protected static $wait_list = [];
|
||||||
protected static $finish_list = [];
|
protected static $finish_list = [];
|
||||||
protected static $all_list = [];
|
protected static $all_list = [];
|
||||||
|
|||||||
@ -21,8 +21,6 @@ class PkRaffle extends BaseRaffle
|
|||||||
const ACTIVE_TITLE = '大乱斗';
|
const ACTIVE_TITLE = '大乱斗';
|
||||||
const ACTIVE_SWITCH = 'USE_PK';
|
const ACTIVE_SWITCH = 'USE_PK';
|
||||||
|
|
||||||
use TimeLock;
|
|
||||||
|
|
||||||
protected static $wait_list = [];
|
protected static $wait_list = [];
|
||||||
protected static $finish_list = [];
|
protected static $finish_list = [];
|
||||||
protected static $all_list = [];
|
protected static $all_list = [];
|
||||||
|
|||||||
@ -212,6 +212,9 @@ class SmallHeart
|
|||||||
private static function xHeartBeat(int $index = 1): array
|
private static function xHeartBeat(int $index = 1): array
|
||||||
{
|
{
|
||||||
$s_data = self::encParamS($index);
|
$s_data = self::encParamS($index);
|
||||||
|
if (!$s_data) {
|
||||||
|
return ['status' => false];
|
||||||
|
}
|
||||||
$s = $s_data['s'];
|
$s = $s_data['s'];
|
||||||
$t = $s_data['payload'];
|
$t = $s_data['payload'];
|
||||||
|
|
||||||
@ -251,9 +254,9 @@ class SmallHeart
|
|||||||
/**
|
/**
|
||||||
* @use 加密参数S
|
* @use 加密参数S
|
||||||
* @param int $index
|
* @param int $index
|
||||||
* @return array
|
* @return array|false
|
||||||
*/
|
*/
|
||||||
private static function encParamS(int $index): array
|
private static function encParamS(int $index)
|
||||||
{
|
{
|
||||||
// 转换index
|
// 转换index
|
||||||
$temp = json_decode(self::$hb_payload['id'], true);
|
$temp = json_decode(self::$hb_payload['id'], true);
|
||||||
@ -277,12 +280,16 @@ class SmallHeart
|
|||||||
];
|
];
|
||||||
$data = Curl::put('other', self::$enc_server, $payload, $headers);
|
$data = Curl::put('other', self::$enc_server, $payload, $headers);
|
||||||
$de_raw = json_decode($data, true);
|
$de_raw = json_decode($data, true);
|
||||||
Log::info("S参数加密 {$de_raw['s']}");
|
if ($de_raw['code'] == 0) {
|
||||||
|
Log::info("S加密成功 {$de_raw['s']}");
|
||||||
return [
|
return [
|
||||||
's' => $de_raw['s'],
|
's' => $de_raw['s'],
|
||||||
'payload' => $payload['t']
|
'payload' => $payload['t']
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
Log::warning("S加密成功 {$de_raw['message']}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,8 +20,6 @@ class StormRaffle extends BaseRaffle
|
|||||||
const ACTIVE_TITLE = '节奏风暴';
|
const ACTIVE_TITLE = '节奏风暴';
|
||||||
const ACTIVE_SWITCH = 'USE_STORM';
|
const ACTIVE_SWITCH = 'USE_STORM';
|
||||||
|
|
||||||
use TimeLock;
|
|
||||||
|
|
||||||
protected static $wait_list = [];
|
protected static $wait_list = [];
|
||||||
protected static $finish_list = [];
|
protected static $finish_list = [];
|
||||||
protected static $all_list = [];
|
protected static $all_list = [];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user