diff --git a/lib/routes/gov/customs/list.js b/lib/routes/gov/customs/list.js index b6688802c..7c7c04d39 100644 --- a/lib/routes/gov/customs/list.js +++ b/lib/routes/gov/customs/list.js @@ -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; diff --git a/lib/routes/xiaoheihe/discount.js b/lib/routes/xiaoheihe/discount.js index 32e0e4e21..b598e1bcd 100644 --- a/lib/routes/xiaoheihe/discount.js +++ b/lib/routes/xiaoheihe/discount.js @@ -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: `
原价¥${item.heybox_price.original_coin / 1000},现价¥${item.heybox_price.cost_coin / 1000},折扣力度 ${ - item.heybox_price.discount - }%,${item.price.deadline_date}
评分:${item.score}
简介:${item.about_the_game}`, + description: + `
` + + (item.heybox_price ? ` 小黑盒: 原价¥${item.heybox_price.original_coin / 1000},现价¥${item.heybox_price.cost_coin / 1000},折扣力度 ${item.heybox_price.discount}%
` : '') + + `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`, })), };