修改debug模式开关读取地点

This commit is contained in:
luying
2022-05-16 11:43:44 +08:00
parent 51f859f120
commit 7e768a4065
12 changed files with 57 additions and 37 deletions
+8 -1
View File
@@ -1,8 +1,9 @@
import { REDIS_KEY, SDK_37_ADDR, SDK_37_CONST, WJX_KEY } from '../consts';
import { DEBUG_PRICE, REDIS_KEY, SDK_37_ADDR, SDK_37_CONST, WJX_KEY } from '../consts';
import { request37 } from './httpUtil';
import { nowSeconds } from './timeUtil';
import { LoginValidataReturn37, Chat37Params, GetServerListParam } from '../domain/sdk';
import * as crypto from 'crypto'
import { isDebugPay } from './util';
// 通用加密方法
@@ -138,4 +139,10 @@ export function checkWjxSign(activity: string, index: string, sign: string) {
console.log('##### checkWjxSign', str, signResult, sign);
if(signResult != sign) return false;
return true;
}
export function checkParamPrice(orderPrice: number, paramPrice: string) {
if(!isDebugPay() && orderPrice != parseFloat(paramPrice)) return false;
if(isDebugPay() && parseFloat(paramPrice) != DEBUG_PRICE) return false;
return true
}