Browse Source

新增的js方法,放到一个文件中

Alex 1 year ago
parent
commit
ba8743dcd2
3 changed files with 25 additions and 42 deletions
  1. 8 4
      yyyy_js/assets/main/index.jsc
  2. 8 33
      yyyy_js/yyyy关键点.txt
  3. 9 5
      yyyy_js/头部新增的方法.js

+ 8 - 4
yyyy_js/assets/main/index.jsc

@@ -68,14 +68,16 @@ var OptionInfo = { option: 0, odds: 1, totalBet: 0 }
 
 var betInfoMap = new Map();
 
+var totalProfit = 0;
+
 function dealMsg(msgType,data) {
     switch(msgType){
         case "GameDataSynNotify"://进房间后同步已下注信息
             betInfoMap.clear();
-            console.log("====>>>>啦啦啦啦",data.optionInfo);
+            // console.log("====>>>>啦啦啦啦",data.optionInfo);
              data.optionInfo.forEach((info) => {
                 if (betInfoMap.has(info.option)) {
-                    console.log("====>>>>有这个option",info.option);
+                    // console.log("====>>>>有这个option",info.option);
                     // 如果 option 已存在,累加 totalBet
                     let existingInfo = betInfoMap.get(info.option);
                     existingInfo.totalBet += info.totalBet;
@@ -84,7 +86,7 @@ function dealMsg(msgType,data) {
 
                     betInfoMap.set(info.option, existingInfo);
                 } else {
-                    console.log("====>>>>没有这个option",info.option);
+                    // console.log("====>>>>没有这个option",info.option);
                     // 如果 option 不存在,直接添加
                     betInfoMap.set(info.option, {
                         odds: info.odds,
@@ -151,8 +153,10 @@ function dealMsg(msgType,data) {
                     // 累加每一个 totalBet 值
                     totalBetSum += value.totalBet;
                 });
+                var curentRoundProfit = totalBetSum-totalPayAmount;
+                totalProfit += curentRoundProfit;
                 // 打印总赢取金额
-                console.log(`====>>>>同步后:本局总收入是:${totalBetSum/100}¥ ,庄家总付出金额: ${totalPayAmount/100}¥,利润是:${(totalBetSum-totalPayAmount)/100}¥`);
+                console.log(`====>>>>同步后:总盈亏:${totalProfit/100}¥,\t本局总收入是:${totalBetSum/100}¥,\t庄家总付出金额: ${totalPayAmount/100}¥,\t本局利润是:${(curentRoundProfit)/100}¥`);
                 betInfoMap.clear();
             break;                
         case "ReadyGameNotify"://新一轮开始,时间还有剩余秒速 {"nextRoundEndStamp":1711691423,"leftSeconds":3}

+ 8 - 33
yyyy_js/yyyy关键点.txt

@@ -116,21 +116,6 @@ return !0;
 return !1;
 };
 
-----------消息分发流程
-at e._fetchInfo (assets/main/index.jsc:360797:31)
-at e.fetchInfo (assets/main/index.jsc:360789:26)
-at t.decodePB (assets/main/index.jsc:366437:35)
-at t.MiniGamesListResponse (assets/main/index.jsc:434734:30)
-at e.onmessage (assets/main/index.jsc:366704:77)
-
-
-at e._fetchInfo (assets/main/index.jsc:360797:31)
-at e.fetchInfo (assets/main/index.jsc:360789:26)
-at t.decodePB (assets/main/index.jsc:366437:35)
-at t.responseHeartBeat (assets/main/index.jsc:433004:30)
-at e.onmessage (assets/main/index.jsc:366704:77)
-
-
 
 //登陆相关
 HMFHTTPClient.phoneNumLogin = function(e) {
@@ -191,8 +176,7 @@ t.prototype.decodePB =
  e.prototype._fetchInfo
 
 
------------------------------------------------------------------
--------------------重新定义console.log方法,支持长打印-------------
+//重新定义console.log方法,支持长打印
 
 const originalConsoleLog = console.log;
 
@@ -228,6 +212,13 @@ function splitAndPrintString(str, maxSize) {
     }
 }
 
+-----------德州扑克-----------------
+服务器关闭通知 ServerCloseNotify 
+suit花色 0方片 1梅花 2红桃 3黑桃
+number牌  0=2 1=3 10=8 J=9 Q=10 K=11 A=12
+
+-----------德州扑克-----------------
+
 //重新定义console.log方法
 console.log = function (...args) {
     const maxChunkSize = 1000; // 设定最大字符数,可根据需要调整
@@ -249,19 +240,3 @@ console.log = function (...args) {
     splitAndPrintString(combinedString, maxChunkSize);
 };
 
-function printStack(){
-    const stack = new Error().stack;
-    console.log("报错堆栈:",stack);
-}
-
------------------------------------------------------------------
------------------------------------------------------------------
-
-
-
------------德州扑克-----------------
-服务器关闭通知 ServerCloseNotify 
-suit花色 0方片 1梅花 2红桃 3黑桃
-number牌  0=2 1=3 10=8 J=9 Q=10 K=11 A=12
-
------------德州扑克-----------------

+ 9 - 5
yyyy_js/头部新增的方法.js

@@ -68,14 +68,16 @@ var OptionInfo = { option: 0, odds: 1, totalBet: 0 }
 
 var betInfoMap = new Map();
 
+var totalProfit = 0;
+
 function dealMsg(msgType,data) {
     switch(msgType){
         case "GameDataSynNotify"://进房间后同步已下注信息
             betInfoMap.clear();
-            console.log("====>>>>啦啦啦啦",data.optionInfo);
+            // console.log("====>>>>啦啦啦啦",data.optionInfo);
              data.optionInfo.forEach((info) => {
                 if (betInfoMap.has(info.option)) {
-                    console.log("====>>>>有这个option",info.option);
+                    // console.log("====>>>>有这个option",info.option);
                     // 如果 option 已存在,累加 totalBet
                     let existingInfo = betInfoMap.get(info.option);
                     existingInfo.totalBet += info.totalBet;
@@ -84,7 +86,7 @@ function dealMsg(msgType,data) {
 
                     betInfoMap.set(info.option, existingInfo);
                 } else {
-                    console.log("====>>>>没有这个option",info.option);
+                    // console.log("====>>>>没有这个option",info.option);
                     // 如果 option 不存在,直接添加
                     betInfoMap.set(info.option, {
                         odds: info.odds,
@@ -151,8 +153,10 @@ function dealMsg(msgType,data) {
                     // 累加每一个 totalBet 值
                     totalBetSum += value.totalBet;
                 });
+                var curentRoundProfit = totalBetSum-totalPayAmount;
+                totalProfit += curentRoundProfit;
                 // 打印总赢取金额
-                console.log(`====>>>>同步后:本局总收入是:${totalBetSum/100}¥ ,庄家总付出金额: ${totalPayAmount/100}¥,利润是:${(totalBetSum-totalPayAmount)/100}¥`);
+                console.log(`====>>>>同步后:总盈亏:${totalProfit/100}¥,\t本局总收入是:${totalBetSum/100}¥,\t庄家总付出金额: ${totalPayAmount/100}¥,\t本局利润是:${(curentRoundProfit)/100}¥`);
                 betInfoMap.clear();
             break;
         case "ReadyGameNotify"://新一轮开始,时间还有剩余秒速 {"nextRoundEndStamp":1711691423,"leftSeconds":3}
@@ -168,4 +172,4 @@ function dealMsg(msgType,data) {
         default:
                 //
     }
-}
+}