|
|
@@ -371,15 +371,29 @@ function getExpertPlanMaxBetAmount() {
|
|
|
return Number(amount);
|
|
|
}
|
|
|
|
|
|
+function getAnalysisRecordCount() {
|
|
|
+ let amount = magicJS.data.read('168_PksAnalysisMinRecordCount', null);
|
|
|
+ if (amount == null) {
|
|
|
+ return 100;
|
|
|
+ }
|
|
|
+ return Number(amount);
|
|
|
+}
|
|
|
+
|
|
|
async function tryAnalysis() {
|
|
|
let nowDate = formatNow();
|
|
|
let historyList = await getPksHistoryList(gLotteryCode, nowDate);
|
|
|
if (!historyList) {
|
|
|
return;
|
|
|
}
|
|
|
- if (historyList.length < 100) {
|
|
|
- let preHistoryList = await getPksHistoryList(gLotteryCode, formatPreviousDate(1));
|
|
|
- historyList = historyList.concat(preHistoryList);
|
|
|
+ let minRecordCOunt = getAnalysisRecordCount();
|
|
|
+ if (historyList.length < minRecordCOunt) {
|
|
|
+ for (let i = 0; i < 10; i++) {
|
|
|
+ let preHistoryList = await getPksHistoryList(gLotteryCode, formatPreviousDate(i + 1));
|
|
|
+ historyList = historyList.concat(preHistoryList);
|
|
|
+ if (historyList.length >= minRecordCOunt) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
let count = historyList.length;
|
|
|
let allNumDict = [];
|