From 3dbf3cf13ac29d6f0a60ed38dee47736355f0ee9 Mon Sep 17 00:00:00 2001 From: Lkeme <19500576+lkeme@users.noreply.github.com> Date: Mon, 21 Aug 2023 21:11:29 +0800 Subject: [PATCH] [fix] ActivityLottery --- plugin/ActivityLottery/ActivityLottery.php | 7 +++++-- resources/activity_infos.json | 6 ------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/plugin/ActivityLottery/ActivityLottery.php b/plugin/ActivityLottery/ActivityLottery.php index 2bb2080..2de52f0 100644 --- a/plugin/ActivityLottery/ActivityLottery.php +++ b/plugin/ActivityLottery/ActivityLottery.php @@ -123,7 +123,9 @@ class ActivityLottery extends BasePlugin if ($ending) { Cache::set('config', $this->config); } 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']; foreach ($keys as $key) { if (!isset($this->config[$key])) $this->config[$key] = []; @@ -298,7 +300,8 @@ class ActivityLottery extends BasePlugin // $url = 'aHR0cHM6Ly9yYXcua2dpdGh1Yi5jb20vbGtlbWUvQmlsaUhlbHBlci1wZXJzb25hbC9tYXN0ZXIvcmVzb3VyY2VzL2FjdGl2aXR5X2luZm9zLmpzb24='; $url = base64_decode($url); - $response = Request::getJson(false, 'other', $url); + $response = Request::getJson(true, 'other', $url); + print_r($response); // $this->_fetchRemoteInfos($response['data']); } diff --git a/resources/activity_infos.json b/resources/activity_infos.json index 784e924..a570ccc 100644 --- a/resources/activity_infos.json +++ b/resources/activity_infos.json @@ -104,12 +104,6 @@ "url": "https://www.bilibili.com/blackboard/activity-Gjn1nAHMNq.html", "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", "title": "人人皆可狮子座",