Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from Wenmoux:master #108

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
- [x] [linkai](https://chat.link-ai.tech/home?share=GBoWyH)每日签到
- [x] [泡芙加速器](https://paofujiasu.com/)每日签到+看广告+兑换(抓包vx小程序)
- [x] [海贼王论坛](https://bbs.talkop.com/)每日签到
- [x] [共创世界](https://www.ccw.site/)每日签到
</details>


Expand Down Expand Up @@ -133,6 +134,8 @@ ql repo https://github.com/Wenmoux/checkbox.git "checkbox|install" "old" "module
# other
<details>
<summary>更新日志</summary>

- 2024-01-01 新增[共创世界](https://www.ccw.site/)每日签到
- 2023-11-23 新增[海贼王论坛](https://bbs.talkop.com/)每日签到 by LinYuanovo
- 2023-11-22 新增[泡芙加速器](https://paofujiasu.com/)每日签到+看广告+兑换 by LinYuanovo
- 2023-10-23 新增[linkai](https://chat.link-ai.tech/home?share=GBoWyH)每日签到
Expand Down
4 changes: 4 additions & 0 deletions config.yml.temple
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,7 @@ pfjsq:
hzw:
cookie:
formhash:

# 共创世界
ccw:
token:
60 changes: 60 additions & 0 deletions scripts/ccw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
const axios = require('axios');

let msg = "【共创世界】:\n";
const token = config.ccw.token
const headers = {
'Content-Type': 'application/json',
token
};

async function checkIn() {
const url = 'https://community-web.ccw.site/study-community/check_in_record/insert';
const body = {
"scene": "HOMEPAGE"
};

try {
const response = await axios.post(url, body, { headers });
if (response.data && response.data.code === "200") {
console.log("签到成功");
return "成功";
} else if (response.data && response.data.code === "10736001") {
console.log("用户已签到");
return "用户已签到";
} else {
return "签到失败";
}
} catch (error) {
console.error("签到失败", error);
return "签到失败";
}
}

async function queryBalance() {
const url = 'https://community-web.ccw.site/currency/account/personal';

try {
const response = await axios.post(url, {}, { headers });
if (response.data && response.data.code === "200" && response.data.body) {
console.log("当前积分:", response.data.body.internalCurrencyBalance);
return response.data.body.internalCurrencyBalance.toString();
} else {
return "获取积分失败";
}
} catch (error) {
console.error("查询失败", error);
return "查询失败";
}
}

async function task() {
let checkInMsg = await checkIn();
let balanceMsg = await queryBalance();
msg += `签到:${checkInMsg}\n积分:${balanceMsg}`;
// console.log(msg);
return msg
}

//task(); // 如果你想在文件执行时直接运行 task 函数

module.exports = task; // 允许其他文件导入并使用 task 函数