shawenguan 1 năm trước cách đây
mục cha
commit
6d70151416
1 tập tin đã thay đổi với 12 bổ sung9 xóa
  1. 12 9
      Scripts/unicom/unicomRechargeDisc.js

+ 12 - 9
Scripts/unicom/unicomRechargeDisc.js

@@ -160,8 +160,7 @@ function updateHeaders() {
 }
 
 async function tryGrab() {
-    let taskQueryData = getRechargeDiscReqDataDict();
-    magicJS.logger.info(JSON.stringify(taskQueryData));
+    await doGrabByNormal();
 }
 
 async function doGrabByNormal() {
@@ -181,13 +180,17 @@ async function doGrabByNormal() {
             taskLstDict[taskId] = task;
         }
         let urlMap = await getTaskUrlMapData(activityId);
-        if (urlMap) {
-            for (let id in urlMap) {
-                const task = taskLstDict[id];
-                const url = urlMap[id];
-                let result = await grabDiscCoupon(url);
-            }
-        }
+        magicJS.logger.info(`${activityId} ${JSON.stringify(urlMap)}`);
+        // if (urlMap) {
+        //     for (let id in urlMap) {
+        //         const task = taskLstDict[id];
+        //         const url = urlMap[id];
+        //         let result = await grabDiscCoupon(url);
+        //     }
+        // }
+    }
+    if (tipsText.length > 0) {
+        magicJS.notification.appendNotifyInfo(`领取结果如下:\n${tipsText}`);
     }
 }