diff --git a/plugin/VipPoint/VipPoint.php b/plugin/VipPoint/VipPoint.php index 41331b2..582ab94 100644 --- a/plugin/VipPoint/VipPoint.php +++ b/plugin/VipPoint/VipPoint.php @@ -35,6 +35,10 @@ class VipPoint extends BasePlugin use ViewFilmChannel; use ViewVipMall; use ViewVideo; + use BuyVipVideo; + use BuyVipProduct; + use BuyVipMall; + use PointInfo; /** * 插件信息 @@ -66,15 +70,16 @@ class VipPoint extends BasePlugin */ protected array $target_tasks = [ 'signIn' => '签到任务', -// 'bonus' => '福利任务', -// 'privilege' => '体验任务', + 'bonus' => '福利任务', + 'privilege' => '体验任务', 'viewAnimate' => '浏览追番频道页10秒', 'viewFilmChannel' => '浏览影视频道页10秒', -// 'viewVipMall' => '浏览会员购页面10秒', -// 'viewVideo' => '观看任意正片内容', -// 'buyVipVideo' => '购买单点付费影片', -// 'buyVipProduct' => '购买指定会员产品', -// 'buyVipMall' => '购买指定会员购商品', + 'viewVipMall' => '浏览会员购页面10秒', + 'viewVideo' => '观看任意正片内容', + 'buyVipVideo' => '购买单点付费影片', + 'buyVipProduct' => '购买指定大会员产品', + 'buyVipMall' => '购买指定会员购商品', + 'pointInfo' => '已有积分' ]; /** @@ -146,7 +151,7 @@ class VipPoint extends BasePlugin failExit("VipPoint 不存在{$target}方法 请暂时关闭任务检查代码或通知开发者"); } // - $this->setTask('signIn', $this->$target($response, $name)); + $this->setTask($target, $this->$target($response, $name)); } /** diff --git a/src/Api/Api/Pgc/Activity/Score/ApiTask.php b/src/Api/Api/Pgc/Activity/Score/ApiTask.php index 1902343..0d62714 100644 --- a/src/Api/Api/Pgc/Activity/Score/ApiTask.php +++ b/src/Api/Api/Pgc/Activity/Score/ApiTask.php @@ -71,7 +71,7 @@ class ApiTask 'csrf' => $user['csrf'], ], self::$payload); $headers = array_merge([], self::$headers); - return Request::postJson(true, 'app', $url, Sign::common($payload), $headers); + return Request::putJson(true, 'app', $url, Sign::common($payload), $headers); } /** @@ -93,7 +93,7 @@ class ApiTask $headers = array_merge([ 'Content-Type' => 'application/json' ], self::$headers); - return Request::postJson(true, 'app', $url, Sign::common($payload), $headers); + return Request::putJson(true, 'app', $url, Sign::common($payload), $headers); } diff --git a/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php b/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php index e6434c9..222c9a3 100644 --- a/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php +++ b/src/Api/Show/Api/Activity/Fire/Common/ApiEvent.php @@ -46,18 +46,19 @@ class ApiEvent // $user = User::parseCookie(); // - $url = 'https://show.bilibili.com/api/activity/fire/common/event/dispatch'; - $payload = array_merge([ - 'msource' => 'member_integral_browse', - 'action' => 'browse_all', - 'eventId' => 'hevent_oy4b7h3epeb', - 'eventTime' => '10', + $params = array_merge([ 'csrf' => $user['csrf'], ], self::$payload); + $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', + 'content-type' => 'application/json; charset=utf-8', ], self::$headers); - return Request::postJson(true, 'app', $url, Sign::common($payload), $headers); + // + return Request::putJson(true, 'app', $url, $payload, $headers); } }