From 0bb5acf6cece57d6ffa3a31783edc52cc360018f Mon Sep 17 00:00:00 2001 From: aka-rin <29725543+aka-rin@users.noreply.github.com> Date: Mon, 27 May 2019 11:12:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=8F=E9=BB=91=E7=9B=92=E7=83=AD?= =?UTF-8?q?=E9=97=A8=E6=8A=98=E6=89=A3=20(#2237)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/xiaoheihe/discount.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/routes/xiaoheihe/discount.js b/lib/routes/xiaoheihe/discount.js index 12a4fe5c0..144d76c4c 100644 --- a/lib/routes/xiaoheihe/discount.js +++ b/lib/routes/xiaoheihe/discount.js @@ -3,18 +3,18 @@ const axios = require('@/utils/axios'); module.exports = async (ctx) => { const response = await axios({ method: 'get', - url: `https://api.xiaoheihe.cn/game/all_recommend/games/?show_type=discount&offset=0&limit=30&heybox_id=12777814&imei=867252032615972&os_type=Android&os_version=9&version=1.1.55&_time=1551803757&hkey=6977cde54ab859fbb98757d3e6b953d9`, + url: 'https://api.xiaoheihe.cn/game/web/all_recommend/games/?show_type=discount&limit=20&offset=0&os_type=web&version=999.0.0', }); const data = response.data.result.list; ctx.state.data = { - title: `小黑盒游戏打折情况`, - link: `https://xiaoheihe.cn/games/index`, + title: '小黑盒 Steam 热门折扣', + link: 'https://xiaoheihe.cn/games/index', item: data.map((item) => ({ - title: item.game_name, - description: `原价¥${item.heybox_price.original_coin / 1000}元,现价¥${item.heybox_price.cost_coin / 1000}元,折扣力度${item.heybox_price.discount}%OFF`, - pubDate: ('' + item.price.deadline_date).replace(' 截止', ''), - link: item.game_img, + 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}`, + link: `https://store.steampowered.com/app/${item.appid}/?l=zh&cc=cn`, })), }; };