Skip to content

Commit 8a01fca

Browse files
committed
#6 升级 Server 酱新版推送通道
1 parent 9089b8a commit 8a01fca

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

Config.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@
88
'SERVER_CHAN' => [
99
'这里填你的超星账号 1' => [
1010
'state' => true,//是否启用 Server酱 通知,true: 启用 false: 不启用
11-
'SCKEY' => '',//在 http://sc.ftqq.com/?c=code 获取
11+
12+
//填入该值,表示你使用的是新版推送通道。旧版推送通道将于 2021年4月 下线
13+
//SendKey 获取地址:https://sct.ftqq.com/sendkey
14+
'SendKey' => '',
1215
],
1316
'这里填你的超星账号 2' => [
1417
'state' => true,//是否启用 Server酱 通知,true: 启用 false: 不启用
15-
'SCKEY' => '',//在 http://sc.ftqq.com/?c=code 获取
18+
19+
//填入该值,表示你使用的是新版推送通道。旧版推送通道将于 2021年4月 下线
20+
// SendKey 获取地址:https://sct.ftqq.com/sendkey
21+
'SendKey' => '',
1622
],
1723
//... 多账号部署
1824
],

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ PHP 版超星学习用自动签到,支持多用户签到,二次开发便捷
1212
支持普通签到,手势签到,~~二维码签到~~,位置签到,~~拍照签到~~
1313

1414
# 🎨 更新日志
15+
<details open>
16+
<summary>2021/03/21</summary>
17+
18+
- <a href="https://github.com/PrintNow/ChaoxingSign/issues/6">#6</a> 升级为新版 Server 酱推送通道,原因:微信发布公告将在2021年4月底下线模板消息,故旧版推送通道将于 2021年4月 下线
19+
> 获取本源码后,请配置 `Config.php` 的相关配置
20+
</details>
21+
1522
<details open>
1623
<summary>2020/06/13</summary>
1724

@@ -20,7 +27,7 @@ PHP 版超星学习用自动签到,支持多用户签到,二次开发便捷
2027
- 添加 获取课程列表失败,重试2次以判断是API错误
2128
</details>
2229

23-
<details open>
30+
<details>
2431
<summary>2020/05/27</summary>
2532

2633
- 修复 <a href="https://github.com/PrintNow/ChaoxingSign/issues/1">#1</a>

lib/Functions.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ function sc_send($text = '', $desp = '', $key = '')
5555
);
5656
$context = stream_context_create($opts);
5757

58-
$result = json_decode(@file_get_contents('https://sc.ftqq.com/' . $key . '.send', false, $context), true);
59-
return $result;
58+
return json_decode(@file_get_contents('https://sctapi.ftqq.com/' . $key . '.send', false, $context), true);
6059
}
6160

6261
/**

main.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
$req = sc_send(
167167
"超星自动签到成功",
168168
str_replace("\n", "\n\n", $msgTmp),//因为 Server酱 两个换行才是换行
169-
$config['SERVER_CHAN'][$account]['SCKEY']
169+
$config['SERVER_CHAN'][$account]['SendKey']
170170
);
171171

172172
if(!isset($req['errmsg'])){

0 commit comments

Comments
 (0)