|
@@ -57,12 +57,9 @@ class InterceptService extends CrudService {
|
|
|
let project = await this.redis.get('project');
|
|
|
if (!project) throw new BusinessError(ErrorCode.SERVICE_FAULT, '未设置中间层项目参数');
|
|
|
project = JSON.parse(project);
|
|
|
- console.log(project);
|
|
|
- console.log(_tenant);
|
|
|
if (!project.includes(_tenant)) throw new BusinessError();
|
|
|
const obj = { ip: clientIp, create_time: moment().format('YYYY-MM-DD HH:mm:ss') };
|
|
|
// 访问量的添加
|
|
|
- console.log('add visit');
|
|
|
let hitsList = await this.redis.get(`${_tenant}/hitsList`);
|
|
|
if (!hitsList) {
|
|
|
hitsList = [{ ...obj, route: url.pathname }];
|
|
@@ -76,7 +73,6 @@ class InterceptService extends CrudService {
|
|
|
}
|
|
|
}
|
|
|
// 用户(ip)访问添加
|
|
|
- console.log('add ip');
|
|
|
let clientList = await this.redis.get(`${_tenant}/clientList`);
|
|
|
if (!clientList) {
|
|
|
clientList = [ obj ];
|