是
This commit is contained in:
parent
afad033358
commit
5a512986f7
@ -483,7 +483,7 @@ final class Cron
|
||||
|
||||
// 流量报告,机器
|
||||
$oTgSendFormat = new TgSendFormat();
|
||||
$oTgSendFormat->sTitleEmoji = "⚡️⚡️⚡️⚡️⚡️⚡️";
|
||||
$oTgSendFormat->sTitleEmoji = "";
|
||||
$oTgSendFormat->sTitle = "流量报告 - 机器";
|
||||
|
||||
$oDucksAll = $oDucks->all();
|
||||
|
||||
@ -17,7 +17,7 @@ final class TgSendFormat
|
||||
{
|
||||
$sStr = '';
|
||||
|
||||
$sStr .= "\n\n".$this->sTitleEmoji;
|
||||
$sStr .= " \n".$this->sTitleEmoji;
|
||||
|
||||
$sStr .= "\n\n".$this->sTitle;
|
||||
|
||||
@ -32,8 +32,8 @@ final class TgSendFormat
|
||||
|
||||
public function rowAdd($sName, $iFlowToday, $iUseWidth, $iMaxWidth, $iLimitDay = false) {
|
||||
|
||||
$iUseWidth = number_format(Tools::flowToGB($iUseWidth) / 1024, 2);
|
||||
$iMaxWidth = number_format(Tools::flowToGB($iMaxWidth) / 1024, 2);
|
||||
$iUseWidth = Tools::flowToTB($iUseWidth);
|
||||
$iMaxWidth = Tools::flowToTB($iMaxWidth);
|
||||
$iFlowToday = Tools::flowToGB($iFlowToday);
|
||||
|
||||
if ($iMaxWidth <= 0) {
|
||||
@ -48,13 +48,13 @@ final class TgSendFormat
|
||||
$sFlowEmoji = '🔋';
|
||||
}
|
||||
|
||||
$sFlowMix = $sFlowEmoji.' '.(100 - $sFlowRate)."%(".$iMaxWidth." - ".$iUseWidth." = ".$iMaxWidth - $iUseWidth.")【 消耗:".$iFlowToday."g";
|
||||
$sFlowMix = $sFlowEmoji.' '.(100 - $sFlowRate)."%(".$iMaxWidth." - ".$iUseWidth." = ".$iMaxWidth - $iUseWidth.")【 消耗:".$iFlowToday."g 】";
|
||||
|
||||
if ($iLimitDay > 0) {
|
||||
$sFlowMix .= ",距离重置:".$iLimitDay." 天";
|
||||
$sFlowMix .= "【 距离重置:".$iLimitDay." 天 】";
|
||||
}
|
||||
|
||||
$sFlowMix .= " 】";
|
||||
// $sFlowMix .= " 】";
|
||||
|
||||
$this->aContent[] = [$sName, $sFlowMix];
|
||||
|
||||
|
||||
@ -168,6 +168,11 @@ final class Tools
|
||||
{
|
||||
return round($traffic / 1073741824, 2);
|
||||
}
|
||||
|
||||
public static function flowToTB($traffic): float
|
||||
{
|
||||
return round($traffic / 1099511627776, 2);
|
||||
}
|
||||
|
||||
public static function genSubToken(): string
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user