shawenguan 1 год назад
Родитель
Сommit
45b8d9c5e9
1 измененных файлов с 15 добавлено и 0 удалено
  1. 15 0
      Scripts/unicom/unicomHelper.js

+ 15 - 0
Scripts/unicom/unicomHelper.js

@@ -111,6 +111,8 @@ function checkHandleRequest() {
                     handleGrabCoupon();
                 } else if (path.indexOf('/mobileserviceimportant/home/queryUserInfoSeven') > -1) {
                     handleQueryUserInfoSeven();
+                } else if (path.indexOf('AppMonthly/appMonth/flowManagement/') > -1) {
+                    handleFlowManagement();
                 }
                 break;
         }
@@ -373,6 +375,19 @@ function handleAppMonthBoh() {
     // drainage=更多优惠 mobilePhoneSeconds=手机数码秒杀
 }
 
+function handleFlowManagement() {
+    let rspData = magicJS.getResponseBody();
+    if (!rspData) {
+        return;
+    }
+    let regex = /\(\{timeNum:-?\d+,timeType:"AM"\}\)/g;
+    let newValue = '({timeNum:120,timeType:"AM"})';
+    let outputString = rspData.replace(regex, newValue);
+    regex = /\(\{timeNum:-?\d+,timeType:"PM"\}\)/g;
+    newValue = '({timeNum:120,timeType:"PM"})';
+    outputString = outputString.replace(regex, newValue);
+}
+
 function handleGrabCoupon() {
     let rspData = getResponsePlainData();
     if (!rspData) {