Files
RSSHub/lib/v2/showstart/event.js
T
lchtao26 3c8755810c feat(route): add 秀动网 (#12489) (#13866)
* feat(route): add 秀动网 (#12489)

* docs(maintainer): amend route path

* update(route/showstart): remove 'keyword' param in '/event' path, add tags to xml title

* refactor(route/showstart): extract service method

* update(showstart/route): add '/search' path

* update(route/showstart): add title for '/search' path, clean code

* Update website/docs/routes/shopping.mdx

* Update lib/v2/showstart/radar.js

* Update lib/v2/showstart/radar.js

* update(route/showstart): add request utils

* update(showstart): use web api

* update(showstart): add event tags

* update(showstart): change pageSize

* fix: add a note to crpsign calculation

---------
2023-11-24 02:04:06 +08:00

19 lines
620 B
JavaScript

const { TITLE, HOST } = require('./const');
const { fetchActivityList, fetchDictionary } = require('./service');
module.exports = async (ctx) => {
const cityCode = parseInt(ctx.params.cityCode);
const showStyle = parseInt(ctx.params.showStyle);
const { items } = await fetchActivityList({
cityCode,
showStyle,
});
const { cityName, showName } = await fetchDictionary(cityCode, showStyle);
const tags = [cityName, showName].filter((item) => Boolean(item)).join(' - ');
ctx.state.data = {
title: `${TITLE} - ${tags}`,
link: HOST,
item: items,
};
};