ios:审核服判断逻辑

This commit is contained in:
luying
2022-06-23 09:39:46 +08:00
parent 5e5b052aa0
commit f105c79837
9 changed files with 77 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
import { STATUS, } from '@consts';
import { RegionType } from '@db/Region';
import { Service } from 'egg';
// let fs = require("fs");
@@ -34,5 +35,13 @@ export default class Update extends Service {
remoteVersionUrl: `${baseUrl}/version.manifest`
});
}
public async checkReview(curRegion: RegionType, version: string) {
const ctx = this.ctx;
if(!curRegion || !curRegion.reviewVersion || !version) return false;
let reviewVersionFlag = ctx.service.utils.compareVersion(version, curRegion.reviewVersion);
return `${ctx.clientIp}`.startsWith('17.') || reviewVersionFlag > 0;
}
}