diff --git a/src/client/client.service.ts b/src/client/client.service.ts index c7780df..e96175b 100644 --- a/src/client/client.service.ts +++ b/src/client/client.service.ts @@ -250,7 +250,7 @@ export class ClientService { totalResult.forEach((value, key) => { const dayNumList = []; // 循环生成最近七天日期 - for (let i = 0; i < 7; i++) { + for (let i = 6; i >= 0; i--) { const date = moment().subtract(i, 'days').format('YYYY-MM-DD'); const num = Math.floor(Math.random() * 30) + 1; dayNumList.push({ @@ -265,7 +265,7 @@ export class ClientService { icon: value.icon, id: value.id, liveNum: value.sum, - dayNumList: map.get(value.id).reverse() + dayNumList: map.get(value.id) }) } else { data.mpList.push({ @@ -273,7 +273,7 @@ export class ClientService { icon: value.icon, id: value.id, liveNum: value.sum, - dayNumList: dayNumList.reverse() + dayNumList: dayNumList }) } }) diff --git a/src/utils/config.ts b/src/utils/config.ts index 8eff632..725747a 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -7,7 +7,6 @@ const fs = require('fs'); // 获取项目运行环境 export const getEnv = () => { - // console.log(process.env); return process.env.RUNNING_ENV || 'prod'; }; @@ -22,15 +21,6 @@ export const getConfig = () => { const yamlPath = path.join(process.cwd(), `./${environment}.yaml`); const file = fs.readFileSync(yamlPath, 'utf8'); let config = parse(file); - // if (process?.argv[2]?.length) { - // config = { ...config, HOST: process.argv[2] } - // } - // if (process?.argv[3]?.length) { - // config = { ...config, USER: process.argv[3] } - // } - // if (process?.argv[4]?.length) { - // config = { ...config, PASSWORD: process.argv[4] } - // } // 融合注入参数 config = Object.assign(config, process.env); configAll = { ...config, isExist: true } @@ -55,7 +45,5 @@ export const getMysql = () => { // synchronize: false, // logging: true, } - console.log(mysql); - return mysql }