shawenguan 1 年之前
父節點
當前提交
6d70151416
共有 1 個文件被更改,包括 12 次插入9 次删除
  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}`);
     }
 }