fix(route): 联合早报 (#9001)

This commit is contained in:
Ethan Shen 2022-02-06 19:00:32 +08:00 committed by GitHub
parent ecbd064dbf
commit 57ec52bfa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -2,8 +2,8 @@ const { parseList } = require('./util');
const baseUrl = 'https://www.zaobao.com';
module.exports = async (ctx) => {
const type = ctx.params.type || 'realtime';
const section = ctx.params.section || 'china';
const type = ctx.params.type ?? 'realtime';
const section = ctx.params.section ?? 'china';
const sectionLink = `/${type}/${section}`;
const { title, resultList } = await parseList(ctx, sectionLink);

View File

@ -1,6 +1,6 @@
module.exports = {
'/interactive-graphics': ['shunf4'],
'/realtime/:section?': ['shunf4'],
'/znews/:section?': ['shunf4'],
'/:type/:section': ['shunf4'],
'/interactive-graphics': ['shunf4'],
};

View File

@ -2,7 +2,7 @@ const { parseList } = require('./util');
const baseUrl = 'https://www.zaobao.com';
module.exports = async (ctx) => {
const section = ctx.params.section || 'china';
const section = ctx.params.section ?? 'china';
let name = '中港台';
let sectionLink = '/realtime/china';

View File

@ -1,6 +1,6 @@
module.exports = function (router) {
router.get('/interactive-graphics', require('./interactive'));
router.get('/realtime/:section?', require('./realtime'));
router.get('/znews/:section?', require('./znews'));
router.get('/:type/:section', require('./index'));
router.get('/interactive-graphics', require('./interactive'));
router.get('/:type?/:section?', require('./index'));
};

View File

@ -13,5 +13,5 @@
{{ /each }}
{{ if articleBody }}
{{ articleBody }}
{{@ articleBody }}
{{ /if }}