Merge commit 'aa796f8d0e519a03f5b56c7ea344bbc0d794e92c'

* commit 'aa796f8d0e519a03f5b56c7ea344bbc0d794e92c':
  Update README.md
  Update README.md
  Update README.md
  未注册设备的情况下发送消息,显示注册提示
  Update README.md
  Update README.md
This commit is contained in:
hext 2022-01-30 01:12:37 +08:00
commit 11864a1cb3
2 changed files with 38 additions and 12 deletions

View File

@ -1,6 +1,6 @@
# PushDeer
PushDeer开源版可以自行架设的无APP推送服务WIPAPI、iOS和Mac第一版本完成Android即将完成其他部分正在施工🚧)
PushDeer开源版可以自行架设的无APP推送服务WIPAPI、iOS、Android和Mac第一版本完成轻应用正在施工🚧)
[🐙🐱 GitHub仓库](https://github.com/easychen/pushdeer) [🔮 中国大陆镜像仓库](https://gitee.com/easychen/pushdeer)
@ -16,8 +16,8 @@ PushDeer开源版可以自行架设的无APP推送服务WIPAPI、iOS和
|功能|核心贡献人|预期完成时间|最低版本兼容|本周进度|
|-|-|-|-|-|
|iOS/MacApp+Clip开发|[Hext123](https://github.com/Hext123)|2022年1月20日|iOS1514兼容修复中|第一版完成代码在iOS目录下|
|Android客户端|[WolfHugo](https://github.com/alone-wolf)|2022年2月24日|5.1|界面细节调整中|
|iOS/MacApp+Clip开发|[Hext123](https://github.com/Hext123)|已完成|iOS1514兼容修复中|第一版完成代码在iOS目录下|
|Android客户端|[WolfHugo](https://github.com/alone-wolf)|已完成|5.1|第一版开发完成release页面可下载|
|快应用|[7YHong](https://github.com/7YHong)|2022年2月27日|-|完成快应用界面展示部分下周对接API|
|API完善和更新|[古俊杰](https://github.com/ilovintit)|配合客户端同步更新|-|添加自动生成swgger文档功能中|
@ -27,7 +27,7 @@ PushDeer开源版可以自行架设的无APP推送服务WIPAPI、iOS和
![](doc/image/clipcode.png)
1. 苹果系统iOS 15+)摄像头扫描上边的码
1. 苹果系统iOS 15+摄像头扫描上边的码 Android快应用未上架可从右侧Release处下载APP用
1. 通过apple账号登录
1. 切换到「设备」标签页,点击右上角的加号,注册当前设备
1. 切换到「Key」标签页点击右上角的加号创建一个Key
@ -37,6 +37,30 @@ iOS APP和Mac APP可以在苹果商店搜索安装。注意iOS APP、Mac APP和
PS系统设计最低支持版本为iOS14但目前存在兼容性问题有iOS14真机和苹果开发者证书的同学可以下载源码并编译参考[这个文档](ios/PushDeer-iOS/README.md)将报错信息提交到issue可以加速我们的修复时间。
## 将 PushDeer 接入 ServerChan
由于 PushDeer 刚开发,很多软件和平台都尚未整合其接口,你可以将 PushDeer 接入Server酱作为通道使用效果是
1. 调用Server酱接口
2. 在 PushDeer 客户端收到通知
方式如下:
1. 登入 sct.ftqq.com ,选择「消息通道」页面,选择「其他通道」中的「自定义」
2. 在「自定义 WebHook 配置用 json」中填入以下内容:
```json
{
"url":"https://api2.pushdeer.com/message/push?pushkey={{pushkey}}",
"values":[
{"type":"markdown"},
{"text":"{{title}} "},
{"desp":"{{desp}} [查看详情]({{url}})"}
]
}
```
注意将 `{{pushkey}}` 换成你自己的 PushDeer 账号中的 key保存即可。可点右侧的测试按钮测试效果。
## FAQ

View File

@ -62,7 +62,7 @@ class PushDeerMessageController extends Controller
$key = PushDeerKey::where('key', $validated['pushkey'])->get()->first();
$result = false;
$result = [];
if ($key) {
$readkey = Str::random(32);
@ -75,15 +75,17 @@ class PushDeerMessageController extends Controller
$the_message['pushkey_name'] = $key->name;
$pd_message = Message::create($the_message);
$devices = PushDeerDevice::where('uid', $key->uid)->get();
foreach ($devices as $device) {
if ($device) {
$func_name = $device['type'].'_send';
if (function_exists($func_name)) {
$result[] = $func_name($device->is_clip, $device->device_id, $validated['text'], '', env('APP_DEBUG'));
if ($devices = PushDeerDevice::where('uid', $key->uid)->get()) {
foreach ($devices as $device) {
if ($device) {
$func_name = $device['type'].'_send';
if (function_exists($func_name)) {
$result[] = $func_name($device->is_clip, $device->device_id, $validated['text'], '', env('APP_DEBUG'));
}
}
}
} else {
return send_error('没有可用的设备,请先注册', ErrorCode('ARGS'));
}
}