BiliHelper-personal/plugin/VipPoint/Traits/PointInfo.php
2023-08-06 16:21:56 +08:00

44 lines
1.6 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php declare(strict_types=1);
use Bhp\Log\Log;
/**
* Website: https://mudew.com/
* Author: Lkeme
* License: The MIT License
* Email: Useri@live.cn
* Updated: 2023 ~ 2024
*
* _____ _ _ _ _ _ _____ _ _____ _____ _____
* | _ \ | | | | | | | | | | | ____| | | | _ \ | ____| | _ \ & l、
* | |_| | | | | | | | | |_| | | |__ | | | |_| | | |__ | |_| | (゚、 。
* | _ { | | | | | | | _ | | __| | | | ___/ | __| | _ /   \、゙ ~ヽ *
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \  じしf_, )
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
*/
trait PointInfo
{
/**
* @param array $data
* @param string $name
* @return bool
*/
public function pointInfo(array $data, string $name): bool
{
$ts = date('Y-m-d H:i:s', $data['data']['current_ts']);
$point = $data['data']['point_info']['point'];
Log::notice("大会员积分@$name: 截至 $ts 您当前拥有 $point 个积分");
//
$score_limit = $data['data']['task_info']['score_limit'];
$score_month = $data['data']['task_info']['score_month'];
Log::notice("大会员积分@$name: 本月已经获得 $score_month/$score_limit 大积分");
//
$base_score = $data['data']['task_info']['sing_task_item']['base_score'];
$sign_count = $data['data']['task_info']['sing_task_item']['count'];
Log::notice("大会员积分@$name: 已连续签到 $sign_count 天 获取到 $base_score 个大积分");
return true;
}
}