mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 01:20:08 +08:00
[docs] pushDeer
This commit is contained in:
parent
a76cdd1c85
commit
d32e32b2ad
@ -147,6 +147,18 @@ token =
|
||||
token =
|
||||
```
|
||||
|
||||
**PushDeer**
|
||||
|
||||
> 文档: http://pushdeer.com/
|
||||
> 说明: 服务器地址,Token
|
||||
|
||||
```ini
|
||||
; PushDeer/服务器地址/token
|
||||
[notify_push_deer]
|
||||
url =
|
||||
token =
|
||||
```
|
||||
|
||||
### 调试
|
||||
|
||||
https://github.com/lkeme/BiliHelper-personal/blob/eb06f55fa0fa6cb07bbeffc7e85c6ac0bfaa67b3/data/latest_version.json#L8
|
||||
|
||||
@ -502,12 +502,18 @@ class Notice extends SingleTon
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PushDeer 推送
|
||||
* @doc http://pushdeer.com/
|
||||
* @param array $info
|
||||
* @return void
|
||||
*/
|
||||
protected function pushDeer(array $info)
|
||||
{
|
||||
Log::info('使用 PushDeer 推送消息');
|
||||
$token = getConf('notify_push_deer.token');
|
||||
$url = getConf('notify_push_deer.url');
|
||||
if (!str_contains($url, "http")){
|
||||
if (!str_contains($url, "http")) {
|
||||
$url = "https://api2.pushdeer.com/message/push";
|
||||
}
|
||||
|
||||
@ -521,7 +527,7 @@ class Notice extends SingleTon
|
||||
'Content-Type' => 'application/x-www-form-urlencoded'
|
||||
]);
|
||||
$de_raw = json_decode($raw, true);
|
||||
if ($de_raw['code'] == 0){
|
||||
if ($de_raw['code'] == 0) {
|
||||
Log::notice("推送消息成功: {$de_raw['content']['result'][0]}");
|
||||
} else {
|
||||
Log::warning("推送消息失败: $raw");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user