shawenguan 1 ano atrás
pai
commit
e946cbf5c3
1 arquivos alterados com 9 adições e 8 exclusões
  1. 9 8
      Scripts/quark/quarkHelper.js

+ 9 - 8
Scripts/quark/quarkHelper.js

@@ -27,12 +27,13 @@ async function Main() {
     } else {
         let userCookie =  magicJS.data.read("quark_cookie", null);
         if(userCookie){
-            let userInfo = await getAccountInfo(userCookie);
-            if(userInfo){
-                await signIn(userCookie);
-            } else {
-                magicJS.notification.appendNotifyInfo(`❌Cookie已失效,请到PC上抓取新的Cookie!`);
-            }
+            await signIn(userCookie);
+            // let userInfo = await getAccountInfo(userCookie);
+            // if(userInfo){
+            //     await signIn(userCookie);
+            // } else {
+            //     magicJS.notification.appendNotifyInfo(`❌Cookie已失效,请到PC上抓取新的Cookie!`);
+            // }
         } else {
             magicJS.notification.appendNotifyInfo(`❌缺少Cookie,请到PC上抓取Cookie!`);
         }
@@ -72,9 +73,9 @@ async function getAccountInfo(cookie){
             'Cookie': cookie,
             'Content-Type': 'application/json',
         },
-        body: `${JSON.stringify(reqData)}`,
+        body: ``,
     };
-    return await magicJS.http.post(options).then(response => {
+    return await magicJS.http.get(options).then(response => {
         try {
             const body = response.body;
             magicJS.logger.log(`${JSON.stringify(body)}`);