diff --git a/plugin/DailyGold/DailyGold.php b/plugin/DailyGold/DailyGold.php index 4d4af01..72e3b00 100644 --- a/plugin/DailyGold/DailyGold.php +++ b/plugin/DailyGold/DailyGold.php @@ -74,7 +74,13 @@ class DailyGold extends BasePlugin break; case 0: // 领取ing - $this->userTaskReceiveRewards($up_uid); + if (!$this->userTaskReceiveRewards($up_uid)) { + // 领取失败 TODO + // [code] => 27000002 + // [message] => 领取失败,请重试 + // [data][num] => 0 + TimeLock::setTimes(10 * 60); + } break; default: // 默认一次弹幕进度 diff --git a/plugin/VipPoint/VipPoint.php b/plugin/VipPoint/VipPoint.php index 582ab94..c36636d 100644 --- a/plugin/VipPoint/VipPoint.php +++ b/plugin/VipPoint/VipPoint.php @@ -106,7 +106,10 @@ class VipPoint extends BasePlugin $this->initTask(); // $this->receiveTask(); - + // 全部完成 + if (TimeLock::getTimes() <= time()) { + TimeLock::setTimes(TimeLock::timing(9)); + } } /** @@ -132,9 +135,6 @@ class VipPoint extends BasePlugin // 每次执行一个任务 return; } - // 全部完成 - TimeLock::setTimes(TimeLock::timing(9)); - return; } /** diff --git a/src/Api/Api/Pgc/Activity/Deliver/ApiTask.php b/src/Api/Api/Pgc/Activity/Deliver/ApiTask.php index 56bd814..5d98ee4 100644 --- a/src/Api/Api/Pgc/Activity/Deliver/ApiTask.php +++ b/src/Api/Api/Pgc/Activity/Deliver/ApiTask.php @@ -30,13 +30,6 @@ class ApiTask 'Referer' => 'https://big.bilibili.com/mobile/bigPoint/task' ]; - /** - * @var array|string[] - */ - protected static array $payload = [ - 'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}', - ]; - /** * 完成任务 jp:追番页浏览 tv: 影视页浏览 * @param string $position @@ -48,11 +41,14 @@ class ApiTask $user = User::parseCookie(); // $url = 'https://api.bilibili.com/pgc/activity/deliver/task/complete'; - $payload = array_merge([ + // + $payload = [ 'disable_rcmd' => '0', 'position' => $position, 'csrf' => $user['csrf'], - ], self::$payload); + 'statistics' => getDevice('app.bili_a.statistics'), + ]; + // $headers = array_merge([], self::$headers); return Request::postJson(true, 'app', $url, Sign::common($payload), $headers); } diff --git a/src/Api/Api/Pgc/Activity/Score/ApiTask.php b/src/Api/Api/Pgc/Activity/Score/ApiTask.php index 7c2f2cd..ecf21db 100644 --- a/src/Api/Api/Pgc/Activity/Score/ApiTask.php +++ b/src/Api/Api/Pgc/Activity/Score/ApiTask.php @@ -30,13 +30,6 @@ class ApiTask 'Referer' => 'https://big.bilibili.com/mobile/bigPoint/task' ]; - /** - * @var array|string[] - */ - protected static array $payload = [ - 'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}', - ]; - /** * 大会员签到 * @return array @@ -47,10 +40,13 @@ class ApiTask $user = User::parseCookie(); // $url = 'https://api.bilibili.com/pgc/activity/score/task/sign'; - $payload = array_merge([ + // + $payload = [ 'disable_rcmd' => '0', 'csrf' => $user['csrf'], - ], self::$payload); + 'statistics' => getDevice('app.bili_a.statistics'), + ]; + // $headers = array_merge([], self::$headers); return Request::postJson(true, 'app', $url, Sign::common($payload), $headers); } diff --git a/src/Api/Passport/ApiLogin.php b/src/Api/Passport/ApiLogin.php index 1efa683..861670a 100644 --- a/src/Api/Passport/ApiLogin.php +++ b/src/Api/Passport/ApiLogin.php @@ -56,12 +56,6 @@ class ApiLogin public static function sendSms(array $payload): string { $url = 'https://passport.bilibili.com//x/passport-login/sms/send'; - // TODO 动态版本参数 -// $payload = [ -// 'cid' => $cid, -// 'tel' => $phone, -// 'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}', -// ]; // {"code":0,"message":"0","ttl":1,"data":{"is_new":false,"captcha_key":"4e292933816755442c1568e2043b8e41","recaptcha_url":""}} // {"code":0,"message":"0","ttl":1,"data":{"is_new":false,"captcha_key":"","recaptcha_url":"https://www.bilibili.com/h5/project-msg-auth/verify?ct=geetest\u0026recaptcha_token=ad520c3a4a3c46e29b1974d85efd2c4b\u0026gee_gt=1c0ea7c7d47d8126dda19ee3431a5f38\u0026gee_challenge=c772673050dce482b9f63ff45b681ceb\u0026hash=ea2850a43cc6b4f1f7b925d601098e5e"}} return Request::post('app', $url, Sign::login($payload)); diff --git a/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php b/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php index 3f8633d..eddf22f 100644 --- a/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php +++ b/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php @@ -31,13 +31,6 @@ class ApiEvent 'Referer' => 'https://big.bilibili.com/mobile/bigPoint/task' ]; - /** - * @var array|string[] - */ - protected static array $payload = [ - 'statistics' => '{"appId":1,"platform":3,"version":"7.14.1","abtest":""}', - ]; - /** * @return array */ @@ -46,14 +39,16 @@ class ApiEvent // $user = User::parseCookie(); // - $params = array_merge([ + $params = [ 'csrf' => $user['csrf'], - ], self::$payload); + 'statistics' => getDevice('app.bili_a.statistics'), + ]; $url = 'https://show.bilibili.com/api/activity/fire/common/event/dispatch?' . http_build_query(Sign::common($params)); // $payload = [ 'eventId' => 'hevent_oy4b7h3epeb', ]; + // $headers = array_merge([ 'content-type' => 'application/json; charset=utf-8', ], self::$headers);