删除多余注释

This commit is contained in:
yulixing 2019-07-29 16:26:16 +08:00
parent b9c94823d7
commit 30e79564eb

View File

@ -29,8 +29,6 @@ router.get('/report', async (req, res, next) => {
const date = query.date const date = query.date
const isNew = parseInt(query.isNew) const isNew = parseInt(query.isNew)
console.log(query)
try { try {
const categoryRes = await axios({ const categoryRes = await axios({
url: gameReportApiUrl, url: gameReportApiUrl,
@ -45,8 +43,6 @@ router.get('/report', async (req, res, next) => {
}, },
}) })
console.log(categoryRes.data)
if (categoryRes.data.errcode === 0) { if (categoryRes.data.errcode === 0) {
const categoryInfo = categoryRes.data.result const categoryInfo = categoryRes.data.result
const category = [] const category = []
@ -56,9 +52,6 @@ router.get('/report', async (req, res, next) => {
} }
} }
console.log('category', category)
console.log('categoryInfo', categoryInfo)
if (category.length === 0) { if (category.length === 0) {
res.send({ res.send({
errcode: 404, errcode: 404,
@ -75,7 +68,6 @@ router.get('/report', async (req, res, next) => {
) )
}) })
console.log(getDataArr)
const dataArr = await Promise.all(getDataArr) const dataArr = await Promise.all(getDataArr)
const allData = Object.assign(...dataArr) const allData = Object.assign(...dataArr)
@ -109,21 +101,11 @@ router.get('/report', async (req, res, next) => {
return return
} }
} catch (err) { } catch (err) {
console.log(err)
next(err) next(err)
} }
}) })
function getCategoryData(cateName, date, is_new, game_id, platform_id) { function getCategoryData(cateName, date, is_new, game_id, platform_id) {
console.log(
JSON.stringify({
gameid: game_id,
channel: platform_id,
times: date,
is_new: is_new,
category: cateName,
})
)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const dataRes = await axios({ const dataRes = await axios({
url: gameReportApiUrl, url: gameReportApiUrl,