shawenguan 1 năm trước cách đây
mục cha
commit
5b43ea7164
1 tập tin đã thay đổi với 9 bổ sung11 xóa
  1. 9 11
      Scripts/mangguo/nenMoScript.js

+ 9 - 11
Scripts/mangguo/nenMoScript.js

@@ -263,7 +263,9 @@ async function tryExecuteAfkTask() {
             monitorTip = `当前${configData.occNodeNum}个账号正在监控中`;
         }
         magicJS.logger.info(monitorTip);
-        magicJS.notification.appendNotifyInfo(monitorTip);
+        if (configData.occNodeNum < configData.xmNodeNum) {
+            magicJS.notification.appendNotifyInfo(monitorTip);
+        }
     } else {
         monitorTip = `当前未开启监控`;
         magicJS.logger.info(monitorTip);
@@ -513,18 +515,15 @@ async function startTask(ids) {
     return result;
 }
 
-async function saveGroupAccountChild(groupId, idArray) {
-    const url = `https://mo.10coo.com/saveGroupAccountChild`;
-    let reqData = {
-        groupId: groupId,
-        xmAccountIds: idArray.join(','),
-    };
+
+async function stopTask() {
+    const url = `https://mo.10coo.com/stop`;
     let options = {
         url: url,
         headers: gCommonHeaders,
-        body: magicJS.objToQueryStr(reqData),
+        body: ``,
     };
-    let result = await magicJS.http.post(options).then(response => {
+    let result = await magicJS.http.get(options).then(response => {
         try {
             let rspData = response.body;
             magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
@@ -533,11 +532,10 @@ async function saveGroupAccountChild(groupId, idArray) {
             magicJS.logger.error(e);
         }
     }).catch(err => {
-        const msg = `提交动态调整设置异常\n${JSON.stringify(err)}`;
+        const msg = `请求停止任务异常\n${JSON.stringify(err)}`;
         magicJS.logger.error(msg);
     });
     return result;
-
 }