Skip to content

Commit 2ea7a5a

Browse files
authored
Merge branch 'Wenmoux:master' into master
2 parents 1eed6b6 + 1fb00f2 commit 2ea7a5a

File tree

5 files changed

+442
-31
lines changed

5 files changed

+442
-31
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
- [x] [linkai](https://chat.link-ai.tech/home?share=GBoWyH)每日签到
9494
- [x] [泡芙加速器](https://paofujiasu.com/)每日签到+看广告+兑换(抓包vx小程序)
9595
- [x] [海贼王论坛](https://bbs.talkop.com/)每日签到
96+
- [x] [共创世界](https://www.ccw.site/)每日签到
9697
</details>
9798

9899

@@ -133,6 +134,9 @@ ql repo https://github.com/Wenmoux/checkbox.git "checkbox|install" "old" "module
133134
# other
134135
<details>
135136
<summary>更新日志</summary>
137+
138+
- 2024-1-19 更新修复魅族社区每日任务
139+
- 2024-01-01 新增[共创世界](https://www.ccw.site/)每日签到
136140
- 2023-11-23 新增[海贼王论坛](https://bbs.talkop.com/)每日签到 by LinYuanovo
137141
- 2023-11-22 新增[泡芙加速器](https://paofujiasu.com/)每日签到+看广告+兑换 by LinYuanovo
138142
- 2023-10-23 新增[linkai](https://chat.link-ai.tech/home?share=GBoWyH)每日签到

config.yml.temple

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,10 @@ togamemod:
224224
cookie:
225225

226226
#魅族社区
227-
meizu:
228-
cookie:
227+
meizu:
228+
remember:
229+
secret:
230+
clientid:
229231

230232
#菜鸟图库
231233
sucai999:
@@ -422,3 +424,7 @@ pfjsq:
422424
hzw:
423425
cookie:
424426
formhash:
427+
428+
# 共创世界
429+
ccw:
430+
token:

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/ccw.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
const axios = require('axios');
2+
3+
let msg = "【共创世界】:\n";
4+
const token = config.ccw.token
5+
const headers = {
6+
'Content-Type': 'application/json',
7+
token
8+
};
9+
10+
async function checkIn() {
11+
const url = 'https://community-web.ccw.site/study-community/check_in_record/insert';
12+
const body = {
13+
"scene": "HOMEPAGE"
14+
};
15+
16+
try {
17+
const response = await axios.post(url, body, { headers });
18+
if (response.data && response.data.code === "200") {
19+
console.log("签到成功");
20+
return "成功";
21+
} else if (response.data && response.data.code === "10736001") {
22+
console.log("用户已签到");
23+
return "用户已签到";
24+
} else {
25+
return "签到失败";
26+
}
27+
} catch (error) {
28+
console.error("签到失败", error);
29+
return "签到失败";
30+
}
31+
}
32+
33+
async function queryBalance() {
34+
const url = 'https://community-web.ccw.site/currency/account/personal';
35+
36+
try {
37+
const response = await axios.post(url, {}, { headers });
38+
if (response.data && response.data.code === "200" && response.data.body) {
39+
console.log("当前积分:", response.data.body.internalCurrencyBalance);
40+
return response.data.body.internalCurrencyBalance.toString();
41+
} else {
42+
return "获取积分失败";
43+
}
44+
} catch (error) {
45+
console.error("查询失败", error);
46+
return "查询失败";
47+
}
48+
}
49+
50+
async function task() {
51+
let checkInMsg = await checkIn();
52+
let balanceMsg = await queryBalance();
53+
msg += `签到:${checkInMsg}\n积分:${balanceMsg}`;
54+
// console.log(msg);
55+
return msg
56+
}
57+
58+
//task(); // 如果你想在文件执行时直接运行 task 函数
59+
60+
module.exports = task; // 允许其他文件导入并使用 task 函数

0 commit comments

Comments
 (0)