parent
8b10f38ea0
commit
7d96b038b3
|
|
@ -3,7 +3,6 @@ const { parseDate } = require('@/utils/parse-date');
|
|||
|
||||
module.exports = async (ctx) => {
|
||||
const query = ctx.params.query ?? ''; // beginDate=2018-08-18&endDate=2020-09-01&productId=600696
|
||||
const host = 'https://www.sse.com.cn';
|
||||
const queries = query.split('&').reduce((acc, cur) => {
|
||||
const [key, value] = cur.split('=');
|
||||
acc[key] = value;
|
||||
|
|
@ -30,11 +29,13 @@ module.exports = async (ctx) => {
|
|||
},
|
||||
});
|
||||
|
||||
const pdfHost = 'https://static.sse.com.cn';
|
||||
|
||||
const items = response.data.result.map((item) => ({
|
||||
title: item.TITLE,
|
||||
description: `${host}${item.URL}`,
|
||||
description: `${pdfHost}${item.URL}`,
|
||||
pubDate: parseDate(item.ADDDATE),
|
||||
link: `${host}${item.URL}`,
|
||||
link: `${pdfHost}${item.URL}`,
|
||||
author: item.SECURITY_NAME,
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue