fix(route) : 场库 - 修改原网页地址 新增视频分类 (#7048)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
84def4fe5d
commit
79546d4c67
|
|
@ -765,6 +765,28 @@ pageClass: routes
|
|||
|
||||
<Route author="Wenmoux" example="/changku" path="/changku"/>
|
||||
|
||||
### 分类
|
||||
|
||||
<Route author="Wenmoux" example="/changku/cate/12" path="/changku/cate/:cateid" :paramsDesc="['分类id']">
|
||||
|
||||
| 创意 | 励志 | 搞笑 | 广告 | 汽车 | 旅行 |
|
||||
| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||
| 6 | 7 | 8 | 13 | 92 | 11 |
|
||||
|
||||
| 爱情 | 剧情 | 运动 | 动画 | 音乐 | 科幻 |
|
||||
| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||
| 12 | 17 | 10 | 16 | 18 | 23 |
|
||||
|
||||
| 预告 | 记录 | 混剪 | 游戏 | 时尚 | 实验 |
|
||||
| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||
| 43 | 24 | 44 | 104 | 88 | 45 |
|
||||
|
||||
| 生活 |
|
||||
| ---- |
|
||||
| 78 |
|
||||
|
||||
</Route>
|
||||
|
||||
## 低端影视
|
||||
|
||||
### 影视剧集更新
|
||||
|
|
|
|||
|
|
@ -3085,6 +3085,8 @@ router.get('/ems/news', require('./routes/ems/news'));
|
|||
|
||||
// 场库
|
||||
router.get('/changku', require('./routes/changku/index'));
|
||||
router.get('/changku/cate/:postid', require('./routes/changku/index'));
|
||||
|
||||
// SCMP
|
||||
router.get('/scmp/:category_id', require('./routes/scmp/index'));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const got = require('@/utils/got');
|
||||
module.exports = async (ctx) => {
|
||||
const url = `https://app.vmovier.com/apiv3/index/getIndexPosts/lastid/`;
|
||||
const url = ctx.params.postid ? `https://app.vmovier.com/apiv3/post/getPostInCate?p=1&size=10&cateid=${ctx.params.postid}` : `https://app.vmovier.com/apiv3/index/getIndexPosts/lastid/`;
|
||||
const config = {
|
||||
headers: {
|
||||
'user-agent': 'VmovierApp 5.7.7 / Android 10 / WIFI / 1080*2175 / 2.75',
|
||||
|
|
@ -11,8 +11,9 @@ module.exports = async (ctx) => {
|
|||
method: 'get',
|
||||
url: url,
|
||||
});
|
||||
const list = res.data.data.list ? res.data.data.list : res.data.data;
|
||||
const items = await Promise.all(
|
||||
res.data.data.list.map(async (list) => {
|
||||
list.map(async (list) => {
|
||||
const title = list.title;
|
||||
const link = `https://app.vmovier.com/apiv3/post/view?postid=${list.postid}`;
|
||||
const description = await ctx.cache.tryGet(link, async () => {
|
||||
|
|
@ -25,14 +26,14 @@ module.exports = async (ctx) => {
|
|||
title: title,
|
||||
description: description,
|
||||
author: list.creator_username,
|
||||
link: link,
|
||||
link: `https://www.vmovier.com/${list.postid}`,
|
||||
});
|
||||
})
|
||||
);
|
||||
ctx.state.data = {
|
||||
title: `场库-每日精选`,
|
||||
title: `${ctx.params.postid ? list[0].cate[0].catename : '每日精选'}-场库`,
|
||||
link: url,
|
||||
description: '场库-每日精选',
|
||||
description: '场库_高品质短片分享平台',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue