逻辑修改
This commit is contained in:
parent
fcf91f0011
commit
9e3747d579
|
@ -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
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user