[fix] ActivityLottery

This commit is contained in:
Lkeme 2023-08-21 21:11:29 +08:00
parent 1dabaa7213
commit 3dbf3cf13a
2 changed files with 5 additions and 8 deletions

View File

@ -123,7 +123,9 @@ class ActivityLottery extends BasePlugin
if ($ending) { if ($ending) {
Cache::set('config', $this->config); Cache::set('config', $this->config);
} else { } else {
$this->config = Cache::get('config'); print_r(Cache::get('config'));
$this->config = ($tmp = Cache::get('config')) ? $tmp : [];
//
$keys = ['invalid_sids', 'wait_add_infos', 'wait_get_infos', 'wait_do_infos']; $keys = ['invalid_sids', 'wait_add_infos', 'wait_get_infos', 'wait_do_infos'];
foreach ($keys as $key) { foreach ($keys as $key) {
if (!isset($this->config[$key])) $this->config[$key] = []; if (!isset($this->config[$key])) $this->config[$key] = [];
@ -298,7 +300,8 @@ class ActivityLottery extends BasePlugin
// //
$url = 'aHR0cHM6Ly9yYXcua2dpdGh1Yi5jb20vbGtlbWUvQmlsaUhlbHBlci1wZXJzb25hbC9tYXN0ZXIvcmVzb3VyY2VzL2FjdGl2aXR5X2luZm9zLmpzb24='; $url = 'aHR0cHM6Ly9yYXcua2dpdGh1Yi5jb20vbGtlbWUvQmlsaUhlbHBlci1wZXJzb25hbC9tYXN0ZXIvcmVzb3VyY2VzL2FjdGl2aXR5X2luZm9zLmpzb24=';
$url = base64_decode($url); $url = base64_decode($url);
$response = Request::getJson(false, 'other', $url); $response = Request::getJson(true, 'other', $url);
print_r($response);
// //
$this->_fetchRemoteInfos($response['data']); $this->_fetchRemoteInfos($response['data']);
} }

View File

@ -104,12 +104,6 @@
"url": "https://www.bilibili.com/blackboard/activity-Gjn1nAHMNq.html", "url": "https://www.bilibili.com/blackboard/activity-Gjn1nAHMNq.html",
"update_time": "2023-08-20 20:57:08" "update_time": "2023-08-20 20:57:08"
}, },
{
"sid": "newLottery_77ac403d-29fc-11ee-9251-a4ae12675bc2",
"title": "和平精空投节视频征集",
"url": "https://www.bilibili.com/blackboard/activity-3Dz7tbzGSz.html",
"update_time": "2023-08-20 20:57:10"
},
{ {
"sid": "newLottery_8e0055f5-27b1-11ee-9251-a4ae12675bc2", "sid": "newLottery_8e0055f5-27b1-11ee-9251-a4ae12675bc2",
"title": "人人皆可狮子座", "title": "人人皆可狮子座",