shawenguan 1 éve
szülő
commit
983e062238
2 módosított fájl, 12 hozzáadás és 2 törlés
  1. 0 2
      Scripts/hbcpre/hbcpreCompound.js
  2. 12 0
      Scripts/hbcpre/hbcpreHelper.js

+ 0 - 2
Scripts/hbcpre/hbcpreCompound.js

@@ -55,8 +55,6 @@ async function tryCompound() {
 
 }
 
-
-
 function transformKeys(keyStr) {
     let n = 3;
     if (arguments.length > 1 && void 0 !== arguments[1]) {

+ 12 - 0
Scripts/hbcpre/hbcpreHelper.js

@@ -155,6 +155,7 @@ function checkHandleRequest() {
                 break;
             case '/api/award/run':
                 // 限时抽奖-抽奖 post= {num:1 || 5,type:1,activity_id:6}
+                handleAwardRun();
                 break;
             default:
                 if (path.indexOf('/api/collection/indexdetail') > -1) {
@@ -591,6 +592,17 @@ function handleAwardIndex(){
     magicJS.data.write(HbcpreConstKey.drawActivityData, rspData.data);
 }
 
+function handleAwardRun(){
+    let reqData = getRequestPlainData();
+    if (!reqData) {
+        return;
+    }
+    let activityId = magicJS.data.read(HbcpreConstKey.drawActivityId, null);
+    if(activityId == reqData.activity_id){
+        magicJS.data.write(HbcpreConstKey.drawActivityRunCount, reqData.num);
+    }
+}
+
 function transformKeys(keyStr) {
     let n = 3;
     if (arguments.length > 1 && void 0 !== arguments[1]) {