no message

This commit is contained in:
hellcat 2025-04-01 18:32:37 +08:00
parent f0658c800a
commit e5adf66faa
4 changed files with 17 additions and 4 deletions

View File

@ -35,13 +35,14 @@ $oHttp->aData = [
'type' => 'private'
],
'date' => 1610000000,
'text' => '/reportUser_day_01111'
'text' => '/userFind 11'
]
];
$r = $oHttp->send();
var_dump($r);
exit;

View File

@ -8,6 +8,7 @@ use App\Models\Config;
use App\Models\TgStep;
use App\Models\Ticket;
use App\Models\Node;
use App\Models\User;
use App\Services\Tg\ReportUser as ServiceTgReportUser;
use GuzzleHttp\Exception\GuzzleException;
use Psr\Http\Client\ClientExceptionInterface;
@ -98,6 +99,19 @@ final class HookController
http_response_code(200);exit;
}
// 查找用户
if (strpos($sText, '/userFind') === 0) {
$iUserId = $this->trimText($sText, '/userFind');
$aUser = User::find($iUserId)->toArray();
$this->sendMessage(json_encode($aUser, JSON_PRETTY_PRINT));
Http::response(200, 'ok');
}
// 回复工单
if (strpos($sText, '/reply') === 0) {

View File

@ -114,6 +114,7 @@ final class ReportUser
$sStr .= " - 注册:".$row['count_reg']."(".$iRegRate."%)\n";
$sStr .= " - 支付:".$row['count_pay']."(".$iPayRate."%)【新".$row['count_pay_new']."".$row['count_pay_old']."\n";
$sStr .= " - 金额:".$row['count_money']."(".$iMoneyRate."%)【新".$row['count_money_new']."".$row['count_money_old']."\n";
}
return $sStr;

View File

@ -12,9 +12,6 @@ final class VisitorCount
public static function From()
{
// $t = self::normalizeUrl("https://www.wocao.com/sjjs/zzz");
// var_dump($t);exit;
// var_dump(self::normalizeUrl($_SERVER['HTTP_REFERER']));
// 如果以被设置,什么都不做
// 如果未被设置入库并保存cookie注册用
if (!isset($_COOKIE['VisitorFrom'])) {