fix: /gov/customs/list/fagui and /xiaoheihe/discount (#4487)
This commit is contained in:
parent
f536851d57
commit
a3141917b9
|
|
@ -15,7 +15,7 @@ module.exports = async (ctx) => {
|
|||
break;
|
||||
case 'fagui':
|
||||
channelName = '海关法规';
|
||||
link = `http://www.customs.gov.cn/customs/302249/302266/08654b53-1.html`;
|
||||
link = `http://www.customs.gov.cn/customs/302249/302266/index.html`;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -3,18 +3,19 @@ const got = require('@/utils/got');
|
|||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://api.xiaoheihe.cn/game/web/all_recommend/games/?show_type=discount&limit=20&offset=0&os_type=web&version=999.0.0',
|
||||
url: 'https://api.xiaoheihe.cn/game/get_game_list_v3?sort_type=discount&limit=20&os_type=web',
|
||||
});
|
||||
const data = response.data.result.list;
|
||||
const data = response.data.result.games;
|
||||
|
||||
ctx.state.data = {
|
||||
title: '小黑盒 Steam 热门折扣',
|
||||
link: 'https://xiaoheihe.cn/games/index',
|
||||
item: data.map((item) => ({
|
||||
title: (item.price.discount === item.price.lowest_discount ? '[史低] ' : '') + item.name + (item.name_en ? ' / ' + item.name_en : ''),
|
||||
description: `<img src="https://steamcdn-a.akamaihd.net/steam/apps/${item.appid}/header.jpg"> <br> 原价¥${item.heybox_price.original_coin / 1000},现价¥${item.heybox_price.cost_coin / 1000},折扣力度 ${
|
||||
item.heybox_price.discount
|
||||
}%,${item.price.deadline_date} <br> 评分:${item.score} <br> 简介:${item.about_the_game}`,
|
||||
description:
|
||||
`<img src="https://steamcdn-a.akamaihd.net/steam/apps/${item.appid}/header.jpg"> <br>` +
|
||||
(item.heybox_price ? ` 小黑盒: 原价¥${item.heybox_price.original_coin / 1000},现价¥${item.heybox_price.cost_coin / 1000},折扣力度 ${item.heybox_price.discount}% <br> ` : '') +
|
||||
`steam: 原价¥${item.price.initial},现价¥${item.price.current},折扣力度 ${item.price.discount}% ${item.price.deadline_date}`,
|
||||
link: `https://store.steampowered.com/app/${item.appid}/?l=zh&cc=cn`,
|
||||
})),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue