mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-12 16:20:27 +08:00
增加: 小程序商店 (#1131)
This commit is contained in:
@@ -733,6 +733,8 @@ GitHub 官方也提供了一些 RSS:
|
||||
|
||||
</route>
|
||||
|
||||
<route name="小程序商店-最新" author="xyqfer" example="/miniapp/store/newest" path="/miniapp/store/newest"/>
|
||||
|
||||
### 技术头条
|
||||
|
||||
<route name="最新分享" author="xyqfer" example="/blogread/newest" path="/blogread/newest"/>
|
||||
|
||||
@@ -691,6 +691,7 @@ router.get('/dwnews/rank/:type/:range', require('./routes/dwnews/rank'));
|
||||
|
||||
// 知晓程序
|
||||
router.get('/miniapp/article/:category', require('./routes/miniapp/article'));
|
||||
router.get('/miniapp/store/newest', require('./routes/miniapp/store/newest'));
|
||||
|
||||
// 后续
|
||||
router.get('/houxu/:type/:id', require('./routes/houxu/houxu'));
|
||||
|
||||
36
routes/miniapp/store/newest.js
Normal file
36
routes/miniapp/store/newest.js
Normal file
@@ -0,0 +1,36 @@
|
||||
const axios = require('../../../utils/axios');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'https://minapp.com/api/v5/trochili/miniapp/?tag=&offset=0&limit=21',
|
||||
});
|
||||
|
||||
const data = response.data.objects;
|
||||
|
||||
ctx.state.data = {
|
||||
title: '小程序商店-知晓程序',
|
||||
link: 'https://minapp.com/miniapp/',
|
||||
description: '知晓程序,让你更知微信小程序。我们提供微信小程序开发资讯,解读微信小程序开发文档,制作微信小程序开发教程。此外,我们还有国内第一家微信小程序商店/应用市场/应用商店。点击入驻,立刻畅游微信小程序的海洋。',
|
||||
item: data.map((item) => {
|
||||
const screenshots = item.screenshot.reduce((screenshots, item) => {
|
||||
screenshots += `<img referrerpolicy="no-referrer" src="${item.image}"><br>`;
|
||||
return screenshots;
|
||||
}, '');
|
||||
|
||||
return {
|
||||
title: `${item.name}-${item.description}`,
|
||||
link: `https://minapp.com/miniapp/${item.id}/`,
|
||||
description: `
|
||||
<strong>${item.name}</strong><br>
|
||||
${item.description}<br><br>
|
||||
<img referrerpolicy="no-referrer" src="${item.qrcode.image}"><br><br>
|
||||
<strong>截图:</strong><br>
|
||||
${screenshots}
|
||||
`,
|
||||
pubDate: new Date(item.created_at * 1000).toUTCString(),
|
||||
author: item.created_by,
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user