sdk: ip限制

This commit is contained in:
luying
2021-11-09 20:01:36 +08:00
parent 89b583d0f1
commit d77ee9dfc9
5 changed files with 220 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
// 支付回调白名单
import {readFileAndParse, parseNumberList, parseGoodStr} from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
export interface DicWhiteIp {
// 渠道
readonly channel: string;
// ip
readonly ip: number;
}
export const dicWhiteIp: string[] = [];
export function loadWhiteIp() {
dicWhiteIp.splice(0, dicWhiteIp.length);
let arr = readFileAndParse(FILENAME.DIC_WHITE_IP);
arr.forEach(o => {
dicWhiteIp.push(o.ip);
});
arr = undefined;
}