parent
020fea8dd0
commit
d33b4ab0e3
|
|
@ -643,6 +643,12 @@ type 为 all 时,category 参数不支持 cost 和 free
|
|||
|
||||
<Route author="kt286" example="/tprtc/news" path="/tprtc/news"/>
|
||||
|
||||
## 无讼案例
|
||||
|
||||
### 案例
|
||||
|
||||
<Route author="alienmao" example="/itslaw/judgements/regulation+1121495748+13+中华人民共和国公司法(2018)第二十一条" path="/itslaw/judgements/:conditions" :paramsDesc="['筛选条件,见示例']"/>
|
||||
|
||||
## 新冠肺炎疫情新闻动态
|
||||
|
||||
### 国家卫健委 - 疫情通报
|
||||
|
|
|
|||
|
|
@ -3168,6 +3168,9 @@ router.get('/mingjian', require('./routes/mingjian/index'));
|
|||
// hentaimama
|
||||
router.get('/hentaimama/videos', require('./routes/hentaimama/videos'));
|
||||
|
||||
// 无讼
|
||||
router.get('/itslaw/judgements/:conditions', require('./routes/itslaw/judgements'));
|
||||
|
||||
// 文学城
|
||||
router.get('/wenxuecity/blog/:id', require('./routes/wenxuecity/blog'));
|
||||
router.get('/wenxuecity/bbs/:cat/:elite?', require('./routes/wenxuecity/bbs'));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const conditions = ctx.params.conditions || ''; // regulation+1121495748+13+中华人民共和国公司法(2018)第二十一条
|
||||
const pageUrl = 'http://www.itslaw.com/';
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: `https://www.itslaw.com/api/judgements?sortType=2&category=CASE&startIndex=0&countPerPage=20&conditions=${encodeURIComponent(conditions)}"`,
|
||||
headers: {
|
||||
Referer: 'https://www.itslaw.com',
|
||||
},
|
||||
});
|
||||
|
||||
const items = response.data.data.searchResult.judgements.map((item) => {
|
||||
const initialization = `{"category":"CASE","id":"${item.id}","anchor":null,"detailKeyWords":[""]}`;
|
||||
const single = {
|
||||
title: item.title,
|
||||
description: item.courtOpinion,
|
||||
pubDate: new Date(item.publishDate).toUTCString(),
|
||||
link: `https://www.itslaw.com/detail?initialization=${encodeURIComponent(initialization)}`,
|
||||
};
|
||||
return single;
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: `无讼案例 - ${conditions}`,
|
||||
link: pageUrl,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue