shawenguan 1 năm trước cách đây
mục cha
commit
de2a6ee262
1 tập tin đã thay đổi với 25 bổ sung1 xóa
  1. 25 1
      Scripts/unicom/unicomSignIn.js

+ 25 - 1
Scripts/unicom/unicomSignIn.js

@@ -1,5 +1,6 @@
 /*
 中国联通每日签到
+https://img.client.10010.com/SigininApp/index.html#/
 
 [Script]
 
@@ -65,12 +66,35 @@ async function Main() {
 }
 
 function checkHandleRequest() {
+    const url = $request.url;
+    const path = $request.path;
+    magicJS.logger.info(`请求url=${url}#${$request.method}`);
+    magicJS.logger.info(`请求body=${magicJS.getRequestBody()}`);
+    if ($request && $request.method != 'OPTIONS') {
+        switch (path) {
+            case '/sixPalaceGridTurntableLottery/signin/daySign':
+                handleDaySign();
+                break;
+            default:
+                if (path.indexOf('/SigininApp/index.html') > -1) {
+                    hanldeSignPage();
+                    break;
+                }
+        }
+    }
 }
 
 function updateHeaders() {
     gCommonHeaders[`Cookie`] = magicJS.data.read(UnicomConstKey.Cookie, '');
 }
 
+function hanldeSignPage() {
+
+}
+
+function handleDaySign() {
+
+}
 
 async function tryDaySign() {
     let result = await doDaySign();
@@ -94,7 +118,7 @@ async function doDaySign() {
         headers: headers,
         body: `shareCl=&shareCode=`,
     };
-    let result = await magicJS.http.get(options).then(response => {
+    let result = await magicJS.http.post(options).then(response => {
         try {
             let rspData = response.body;
             magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);