diff --git a/docs/bbs.md b/docs/bbs.md index 226563bdcc..7406a0f757 100644 --- a/docs/bbs.md +++ b/docs/bbs.md @@ -261,3 +261,37 @@ pageClass: routes ### 回帖 + +## a 岛匿名版 + +### 串 + + + +| 综合版 1 | 围炉 | 欢乐恶搞 | 速报 2 | 推理 | 跑团 | 技术宅 | 料理 | 猫版 | 音乐 | 考试 | 社畜 | +| -------- | ---- | -------- | ------ | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | +| 4 | 120 | 20 | 121 | 11 | 111 | 30 | 32 | 40 | 35 | 56 | 110 | + +| 科学 | 文学 | 创意 | 姐妹 1 | 数码 | 女装 | 日记 | 圈内 | 都市怪谈 | 买买买 | 动画 | 漫画 | 美漫 | 国漫 | 小说 | +| ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | -------- | ------ | ---- | ---- | ---- | ---- | ---- | +| 15 | 103 | 17 | 98 | 75 | 97 | 89 | 96 | 81 | 106 | 14 | 12 | 90 | 99 | 19 | + +| 轻小说 | GALGAME | 东方 Project | 舰娘 | 虚拟偶像 | VOCALOID | 游戏 | DNF | SE | 手游 | +| ------ | ------- | ------------ | ---- | -------- | -------- | ---- | --- | --- | ---- | +| 87 | 64 | 5 | 93 | 101 | 6 | 2 | 72 | 124 | 3 | + +| Steam | 索尼 | LOL | DOTA | 口袋妖怪 | 战争雷霆 | WOT | Minecraft | 怪物猎人 | 3A 游戏 | +| ----- | ---- | --- | ---- | -------- | -------- | --- | --------- | -------- | ------- | +| 107 | 24 | 22 | 70 | 38 | 86 | 51 | 10 | 28 | 108 | + +| 彩虹六号 | 暴雪游戏 | 卡牌桌游 | MUG | AC 大逃杀 | 任天堂 | AKB | SNH48 | COSPLAY | 声优 | +| -------- | -------- | -------- | --- | --------- | ------ | --- | ----- | ------- | ---- | +| 119 | 23 | 45 | 34 | 29 | 25 | 16 | 100 | 13 | 55 | + +| 模型 | 影视 | 军武 | 体育 | 值班室 | 城墙 | 技术支持 | 询问 3 | 宠物 | 摄影 2 | +| ---- | ---- | ---- | ---- | ------ | ---- | -------- | ------ | ---- | ------ | +| 39 | 31 | 37 | 33 | 18 | 112 | 117 | 114 | 118 | 115 | + +| 主播 | 育儿 | 围炉 | 旅行 | 特摄 | +| ---- | ---- | ---- | ---- | ---- | +| 116 | 113 | 120 | 125 | 9 | diff --git a/lib/router.js b/lib/router.js index 8c6df50a01..516ac56a6c 100644 --- a/lib/router.js +++ b/lib/router.js @@ -2517,4 +2517,7 @@ router.get('/hbut/cs/:type', require('./routes/universities/hbut/cs')); // acwifi router.get('/acwifi', require('./routes/acwifi')); +// a岛匿名版 +router.get('/adnmb/:pid/:page', require('./routes/adnmb/index')); + module.exports = router; diff --git a/lib/routes/adnmb/index.js b/lib/routes/adnmb/index.js new file mode 100644 index 0000000000..07a9c4b643 --- /dev/null +++ b/lib/routes/adnmb/index.js @@ -0,0 +1,45 @@ +// a岛匿名版 +const got = require('@/utils/got'); +module.exports = async (ctx) => { + const pid = ctx.params.pid; + const page = ctx.params.page; + const url = `https://adnmb2.com/Api/showf?id=${pid}&page=${page}`; + const response = await got({ + method: 'get', + url: url, + }); + const data = response.data; + + const items = []; + data.forEach((item) => { + const newItems = { title: item.content, pubDate: '${item.now}', link: `https://adnmb2.com/t/${item.id}` }; + const img = item.img !== '' ? '' : ''; + let replys = ''; + item.replys.forEach((reply) => { + const replyImg = reply.img !== '' ? '' : ''; + replys += `

${reply.title} ${reply.name} ${reply.now} ID:${reply.userid} No.${reply.id}


+ ${reply.content} + ${replyImg} +
+ `; + }); + newItems.description = `

${item.title} ${item.name} ${item.now} ID:${item.userid} No.${item.id}


+ ${item.content} + ${img} +
+ ${replys} + `; + items.push(newItems); + }); + + ctx.state.data = { + // 源标题 + title: `a岛匿名版`, + // 源链接 + link: `https://adnmb2.com/Forum`, + // 源说明 + description: `A岛是一个前台匿名后台实名的论坛`, + // 遍历此前获取的数据 + item: items, + }; +};