This commit is contained in:
候学杰 2018-05-08 15:40:54 +08:00
parent 883593849d
commit 58e5dd8a08
3 changed files with 23 additions and 5 deletions

21
README.md Normal file
View File

@ -0,0 +1,21 @@
# 报警或通知 (PHP版)
> 该项目使用 composer 来完成加载
执行
```bash
composer config repositories.php-alert vcs git@git.int.haowumc.com:arch/php-alert-client.git
composer require arch/alert
```
### 如何使用
```php
//通知单个或多个用户文本消息
user_text_alert('dongwei|lisida','快去领红包');
//通知一个企业微信群文本消息
chat_text_alert('api','系统挂了');
```

View File

@ -1,5 +1,5 @@
{
"name": "arch/notification",
"name": "arch/alert",
"authors": [
{
"name": "候学杰",
@ -7,9 +7,6 @@
}
],
"autoload": {
"psr-4": {
"Arch\\Notification\\": "src/Notification"
},
"files": [
"src/functions.php"
]

View File

@ -2,7 +2,7 @@
require_once dirname(__DIR__).'/vendor/autoload.php';
$ret = notify('houxuejie','dfdfdf');
$ret = user_text_alert('houxuejie','dfdfdf');
if( $ret['err_code'] == '0' ){
echo "发送成功\n";
}else{