add 浙江省土地使用权网上交易系统 (#8677)

This commit is contained in:
Fatpandac 2022-01-23 02:59:45 +08:00 committed by GitHub
parent 385e3d2854
commit 0e93e8e268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 95 additions and 0 deletions

View File

@ -334,6 +334,18 @@ pageClass: routes
</Route>
## 浙江省土地使用权网上交易系统
### 公告信息
<Route author="Fatpandac" example="/zjgtjy/all" path="zjgtjy/:type" :paramsDesc="['分类名']">
| 全部公告 | 挂牌公告 | 拍卖公告 | 补充公告 |
| :------: | :------: | :------: | :------: |
| all | gpgg | pmgg | bcgg |
</Route>
## 中国工业和信息化部
### 政策解读

46
lib/v2/zjgtjy/index.js Normal file
View File

@ -0,0 +1,46 @@
const got = require('@/utils/got');
module.exports = async (ctx) => {
const type = ctx.params.type === 'all' ? '' : ctx.params.type.toUpperCase();
const host = `https://td.zjgtjy.cn:8553/devops/noticeInfo/queryNoticeInfoList?pageSize=10&pageNumber=1&noticeType=${type}&sort=DESC`;
const response = await got({
method: 'get',
url: host,
}).json();
const data = response.data;
const items = await Promise.all(
data.map(async (item) => {
const pageUrl = `https://td.zjgtjy.cn:8553/devops/noticeInfo/queryNoticeLandContentDetails?noticeId=${item.GGID}&transactionMode=${item.JYFS}`;
const pageLink = `https://td.zjgtjy.cn/view/trade/announcement/detail?id=${item.GGID}&category=${item.ZYLB}&type=${item.JYFS}`;
const desc = await ctx.cache.tryGet(pageUrl, async () => {
let desc = await got({
method: 'get',
url: pageUrl,
}).json();
desc = desc.queryNoticeContent.GGNR;
desc = desc
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&quot;/g, '"');
return desc;
});
return {
title: item.GGMC,
description: desc,
link: pageLink,
pubDate: item.GGFBSJ,
};
})
);
ctx.state.data = {
title: '浙江土地使用权挂牌公告',
link: host,
item: items,
};
};

View File

@ -0,0 +1,3 @@
module.exports = {
'/:type?': ['Fatpandac'],
};

31
lib/v2/zjgtjy/radar.js Normal file
View File

@ -0,0 +1,31 @@
module.exports = {
'zjgtjy.cn': {
_name: '浙江省土地使用权网上交易系统',
'.': [
{
title: '全部更新',
docs: 'https://docs.rsshub.app/government.html',
source: '/',
target: '/zjgtjy/all',
},
{
title: '挂牌公告',
docs: 'https://docs.rsshub.app/government.html',
source: '/',
target: '/zjgtjy/gpgg',
},
{
title: '拍卖公告',
docs: 'https://docs.rsshub.app/government.html',
source: '/',
target: '/zjgtjy/pmgg',
},
{
title: '补充公告',
docs: 'https://docs.rsshub.app/government.html',
source: '/',
target: '/zjgtjy/bcgg',
},
],
},
};

3
lib/v2/zjgtjy/router.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = function (router) {
router.get('/:type?', require('./index'));
};