Bläddra i källkod

建行生活签到脚本

shawenguan 2 år sedan
förälder
incheckning
6e349d702f
4 ändrade filer med 487 tillägg och 21 borttagningar
  1. 47 21
      BoxJsSub/release.json
  2. BIN
      Icons/jhsh.png
  3. 417 0
      Scripts/jhsh/jhsh_checkIn.js
  4. 23 0
      Scripts/jhsh/jhsh_modifyTime.js

+ 47 - 21
BoxJsSub/release.json

@@ -143,7 +143,7 @@
                     "id": "lkTelecomMobile",
                     "name": "手机号",
                     "val": "",
-                    "type": "textarea",
+                    "type": "text",
                     "autoGrow": true,
                     "desc": "手机号"
                 },
@@ -151,7 +151,7 @@
                     "id": "lkTelecomPassword",
                     "name": "密码",
                     "val": "",
-                    "type": "textarea",
+                    "type": "text",
                     "autoGrow": true,
                     "desc": "密码"
                 },
@@ -166,38 +166,64 @@
             ]
         },
         {
-            "id": "lkThwjHelper",
-            "name": "头号玩家助手",
-            "author": "@jojo",
-            "repo": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts",
-            "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/thwj/thwjHelper.js",
+            "id": "jhsh",
+            "name": "建行生活",
+            "author": "@FoKit",
+            "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/jhsh/jhsh_checkIn.js",
+            "descs_html": [""],
             "icons": [
-                "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Icons/thwj.png",
-                "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Icons/thwj.png"
-            ],
-            "scripts": [],
-            "keys": [
-                "lkThwjUserListKey",
-                "lkThwjCommonCookieKey"
+                "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Icons/jhsh.png",
+                "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Icons/jhsh.png"
             ],
+            "keys": ["JHSH_GIFT", "JHSH_BODY", "JHSH_LOGIN_INFO", "JHSH_VERSION"],
             "settings": [
                 {
-                    "id": "lkThwjCommonCookieKey",
-                    "name": "浏览器Cookie",
+                    "id": "JHSH_GIFT",
+                    "name": "奖励类型",
+                    "val": "2",
+                    "type": "radios",
+                    "desc": "选择连续签到奖励类型",
+                    "items": [
+                        {
+                            "key": "1",
+                            "label": "打车券"
+                        },
+                        {
+                            "key": "2",
+                            "label": "外卖券"
+                        },
+                        {
+                            "key": "3",
+                            "label": "骑行券"
+                        }
+                    ]
+                },
+                {
+                    "id": "JHSH_BODY",
+                    "name": "签到数据",
                     "val": "",
                     "type": "textarea",
                     "autoGrow": true,
-                    "desc": "浏览器Cookie"
+                    "rows": 1,
+                    "desc": ""
                 },
                 {
-                    "id": "lkThwjUserListKey",
-                    "name": "用户账号密码信息",
+                    "id": "JHSH_LOGIN_INFO",
+                    "name": "登录数据",
                     "val": "",
                     "type": "textarea",
                     "autoGrow": true,
-                    "desc": "用户账号密码信息"
+                    "rows": 1,
+                    "desc": ""
+                },
+                {
+                    "id": "JHSH_VERSION",
+                    "name": "版本号",
+                    "val": "",
+                    "type": "text",
+                    "desc": ""
                 }
             ]
-        }
+        },
     ]
 }

BIN
Icons/jhsh.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 417 - 0
Scripts/jhsh/jhsh_checkIn.js


+ 23 - 0
Scripts/jhsh/jhsh_modifyTime.js

@@ -0,0 +1,23 @@
+let time = '';
+let json = JSON.parse($response.body);
+
+if (json ? .data ? .SYSTEM_TIME) {
+    if (json ? .data ? .MSPS_ENTITY ? .EFFECT_PERIOD_START) {
+        time = json.data.MSPS_ENTITY.EFFECT_PERIOD_START.replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/, '$1-$2-$3 $4:$5:$6');
+    } else if (json ? .data ? .ACT_START_DTM) {
+        time = json.data.ACT_START_DTM;
+    } else if (json ? .data ? .KHHK_ENTITY ? .DcCp_Avy_StTm) {
+        time = json ? .data ? .SYSTEM_TIME.replace(/(\d{2}):(\d{2}):(\d{2})$/, json.data.KHHK_ENTITY.DcCp_Avy_StTm.replace(/^(\d{2})(\d{2})(\d{2})$/, '$1:$2:$3'));
+    }
+
+    if (time) {
+        if (Date.now() < Date.parse(time)) {
+            json['data']['SYSTEM_TIME'] = time;
+        }
+        console.log(`SYSTEM_TIME: ${json['data']['SYSTEM_TIME']}`);
+    }
+} else {
+    console.log($response.body);
+}
+
+$done({ body: JSON.stringify(json) });

Vissa filer visades inte eftersom för många filer har ändrats