fix(route): 联合早报 (#9001)
This commit is contained in:
parent
ecbd064dbf
commit
57ec52bfa7
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = {
|
||||
'/interactive-graphics': ['shunf4'],
|
||||
'/realtime/:section?': ['shunf4'],
|
||||
'/znews/:section?': ['shunf4'],
|
||||
'/:type/:section': ['shunf4'],
|
||||
'/interactive-graphics': ['shunf4'],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@
|
|||
{{ /each }}
|
||||
|
||||
{{ if articleBody }}
|
||||
{{ articleBody }}
|
||||
{{@ articleBody }}
|
||||
{{ /if }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue