Skip to content

Commit

Permalink
添加server酱多通道支持
Browse files Browse the repository at this point in the history
  • Loading branch information
easychen committed May 27, 2022
1 parent e4c8d86 commit 55f65ee
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

## 最新版本

- 插件·Chrome/Edge:[2022.05.27.16.22](ckc.zip)
- 自架云端Docker镜像:2022.05.27.16.18
- 文档:2022.05.27.16.21
- 插件·Chrome/Edge:[2022.05.27.19.05](ckc.zip)
- 自架云端Docker镜像:2022.05.27.19.01
- 文档:2022.05.27.19.05
- 更新日志:[GitHub](https://github.com/easychen/checkchan-dist/commits/main)

自架云端 Docker 命令( 将`API Key``YouRAPiK1`替换成`任意你想要的安全密码不要带$`):
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2022.05.27.16.22"
"2022.05.27.19.05"
Binary file modified ckc.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion docker.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2022.05.27.16.18"
"2022.05.27.19.01"
4 changes: 2 additions & 2 deletions docker/api/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ for( const item of to_checks )
if( retry_times >= item.retry )
{
// 发送通知
await send_notify( '监测点['+item.title+']多次重试失败', "已暂停执行,请检查登录状态或页面结构变动\r\n\r\n[点此查看]("+item.url+")" , item.sendkey);
await send_notify( '监测点['+item.title+']多次重试失败', "已暂停执行,请检查登录状态或页面结构变动\r\n\r\n[点此查看]("+item.url+")" , item.sendkey, item.send_channel||-1);
}
check_update_field( item.id, 'retry_times', retry_times+1, json_data );

Expand Down Expand Up @@ -182,7 +182,7 @@ for( const item of to_checks )
// const desp = check_content.length > 50 ? (check_html ? to_markdown(check_html) : check_content) : check_content + (item.last_content ? ('←' + item.last_content):"") ;


await send_notify( title, desp , item.sendkey);
await send_notify( title, desp , item.sendkey, item.send_channel || -1);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion docker/api/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ exports.get_cookies = () =>
return json_data.cookies;
}

exports.send_notify = async ( title, desp, sendkey) =>
exports.send_notify = async ( title, desp, sendkey, channel = -1) =>
{
try {
const form = new FormData();
if( channel >= 0 ) form.append( 'channel',parseInt(channel));
form.append( 'title',title );
form.append( 'desp',desp.substring(0,10000) );
const response = await fetch( 'https://sctapi.ftqq.com/'+sendkey+'.send', {
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ <h1>Check酱</h1>
</ol>
<h2>最新版本</h2>
<ul>
<li>插件·Chrome/Edge:<a href="ckc.zip">2022.05.27.16.22</a></li>
<li>自架云端Docker镜像:2022.05.27.16.18</li>
<li>文档:2022.05.27.16.21</li>
<li>插件·Chrome/Edge:<a href="ckc.zip">2022.05.27.19.05</a></li>
<li>自架云端Docker镜像:2022.05.27.19.01</li>
<li>文档:2022.05.27.19.05</li>
<li>更新日志:<a href="https://github.com/easychen/checkchan-dist/commits/main">GitHub</a></li>
</ul>
<p>自架云端 Docker 命令( 将<code class="notranslate">API Key</code><code class="notranslate">YouRAPiK1</code>替换成<code class="notranslate">任意你想要的安全密码不要带$</code>):</p>
Expand Down
6 changes: 3 additions & 3 deletions readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ <h1>Check酱</h1>
</ol>
<h2>最新版本</h2>
<ul>
<li>插件·Chrome/Edge:<a href="ckc.zip">2022.05.27.16.22</a></li>
<li>自架云端Docker镜像:2022.05.27.16.18</li>
<li>文档:2022.05.27.16.21</li>
<li>插件·Chrome/Edge:<a href="ckc.zip">2022.05.27.19.05</a></li>
<li>自架云端Docker镜像:2022.05.27.19.01</li>
<li>文档:2022.05.27.19.05</li>
<li>更新日志:<a href="https://github.com/easychen/checkchan-dist/commits/main">GitHub</a></li>
</ul>
<p>自架云端 Docker 命令( 将<code class="notranslate">API Key</code><code class="notranslate">YouRAPiK1</code>替换成<code class="notranslate">任意你想要的安全密码不要带$</code>):</p>
Expand Down

0 comments on commit 55f65ee

Please sign in to comment.