mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 11:40:51 +08:00
修改读取帖子上限为10
This commit is contained in:
parent
a5c27d883a
commit
7efc6e19f0
@ -50,7 +50,7 @@ export async function sign(e) {
|
|||||||
let resultMessage="";
|
let resultMessage="";
|
||||||
let msg = e.msg.replace(/#|签到|井|米游社|mys|社区/g, "");
|
let msg = e.msg.replace(/#|签到|井|米游社|mys|社区/g, "");
|
||||||
let ForumData = await getDataList(msg);
|
let ForumData = await getDataList(msg);
|
||||||
e.reply(`开始尝试${msg}签到预计2-3分钟~`)
|
e.reply(`开始尝试${msg}签到预计${msg=='全部'?"2-3":"1-3"}分钟~`)
|
||||||
for (let forum of ForumData) {
|
for (let forum of ForumData) {
|
||||||
resultMessage += `**${forum.name}**\n`
|
resultMessage += `**${forum.name}**\n`
|
||||||
try {
|
try {
|
||||||
@ -91,7 +91,7 @@ export async function mysSign(e) {
|
|||||||
// Execute task
|
// Execute task
|
||||||
let msg = e.msg.replace(/#|签到|井|米游社|mys|社区/g, "");
|
let msg = e.msg.replace(/#|签到|井|米游社|mys|社区/g, "");
|
||||||
let ForumData = await getDataList(msg);
|
let ForumData = await getDataList(msg);
|
||||||
e.reply(`开始尝试${msg}社区签到预计2-3分钟~`)
|
e.reply(`开始尝试${msg}社区签到预计${msg=='全部'?"10-20":"1-3"}分钟~`)
|
||||||
for (let forum of ForumData) {
|
for (let forum of ForumData) {
|
||||||
resultMessage += `\n**${forum.name}**\n`
|
resultMessage += `\n**${forum.name}**\n`
|
||||||
try {
|
try {
|
||||||
|
@ -36,7 +36,7 @@ export default class MihoYoApi {
|
|||||||
|
|
||||||
async forumPostList(forumId) {
|
async forumPostList(forumId) {
|
||||||
const url =
|
const url =
|
||||||
`https://api-takumi.mihoyo.com/post/api/getForumPostList?forum_id=${forumId}&is_good=false&is_hot=false&page_size=20&sort_type=1`;
|
`https://api-takumi.mihoyo.com/post/api/getForumPostList?forum_id=${forumId}&is_good=false&is_hot=false&page_size=10&sort_type=1`;
|
||||||
|
|
||||||
let res = await superagent.get(url).set(this._getHeader()).timeout(10000);
|
let res = await superagent.get(url).set(this._getHeader()).timeout(10000);
|
||||||
let resObj = JSON.parse(res.text);
|
let resObj = JSON.parse(res.text);
|
||||||
|
Loading…
Reference in New Issue
Block a user