shawenguan 2 лет назад
Родитель
Сommit
4cf9436edf
3 измененных файлов с 104 добавлено и 241 удалено
  1. 5 5
      BoxJsSub/JoJo_BoxJs.json
  2. 99 99
      Scripts/gandartHelper.js
  3. 0 137
      Scripts/gandartHelperV2.js

+ 5 - 5
BoxJsSub/JoJo_BoxJs.json

@@ -10,8 +10,8 @@
             "id": "jojo.gandart",
             "name": "光予助手",
             "author": "@jojo",
-            "repo": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelperV2.js",
-            "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelperV2.js",
+            "repo": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelper.js",
+            "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelper.js",
             "icons": [
                 "https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/10086.png",
                 "https://raw.githubusercontent.com/Orz-3/mini/master/Color/10086.png"
@@ -19,15 +19,15 @@
             "scripts": [
                 {
                     "name": "监控购买",
-                    "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelperV2.js"
+                    "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelper.js"
                 },
                 {
                     "name": "极速合成",
-                    "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelperV2.js"
+                    "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelper.js"
                 },
                 {
                     "name": "极速置换",
-                    "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelperV2.js"
+                    "script": "https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/gandartHelper.js"
                 }
             ],
             "keys": [

+ 99 - 99
Scripts/gandartHelper.js

@@ -26,112 +26,112 @@ const gardartLimitPriceKey = '@gandart.limitPrice';
 
 let gandartToken = lk.getVal(gandartTokenKey, '');
 
-if(!lk.isExecComm) {
-    if (lk.isRequest()) {
-        getInfo();
-        lk.done();
-    } else {
-        all();
-    }
-}
+// if(!lk.isExecComm) {
+//     if (lk.isRequest()) {
+//         getInfo();
+//         lk.done();
+//     } else {
+//         all();
+//     }
+// }
 
-function getInfo() {
-    const url = $request.url;
-    if ($request && $request.method != 'OPTIONS') {
-        if(url.match(/\/base\/auth\/verifyCodeLogin/)){
-            lk.log(`开始获取Token`);
-            let data = lk.getResponseBody();
-            try {
-                data = JSON.parse(data);
-                if (data["success"]) {
-                    let jwktoken = data["obj"]["token"];
-                    lk.setVal(gandartTokenKey, jwktoken);
-                    lk.appendNotifyInfo('🎉成功获取光予token,可以关闭相应脚本');
-                } else {
-                    lk.execFail();
-                    lk.appendNotifyInfo('❌获取光予token失败,请稍后再试');
-                }
-            } catch (e) {
-                lk.execFail();
-                lk.appendNotifyInfo('❌获取光予token失败');
-            }
-            lk.msg('');
-            return;
-        }
-        if(url.match(/\/markeet\/api\/v3\/resaleManage\/tradingMarket/)){
-            lk.log(`开始获取Token`);
-            if ($request.headers['token']) {
-                let jwktoken = $request.headers['token'];
-                lk.setVal(gandartTokenKey, jwktoken);
-                lk.appendNotifyInfo('🎉成功获取光予token,可以关闭相应脚本');
-            }
-            lk.msg('');
-            return;
-        }
+// function getInfo() {
+//     const url = $request.url;
+//     if ($request && $request.method != 'OPTIONS') {
+//         if(url.match(/\/base\/auth\/verifyCodeLogin/)){
+//             lk.log(`开始获取Token`);
+//             let data = lk.getResponseBody();
+//             try {
+//                 data = JSON.parse(data);
+//                 if (data["success"]) {
+//                     let jwktoken = data["obj"]["token"];
+//                     lk.setVal(gandartTokenKey, jwktoken);
+//                     lk.appendNotifyInfo('🎉成功获取光予token,可以关闭相应脚本');
+//                 } else {
+//                     lk.execFail();
+//                     lk.appendNotifyInfo('❌获取光予token失败,请稍后再试');
+//                 }
+//             } catch (e) {
+//                 lk.execFail();
+//                 lk.appendNotifyInfo('❌获取光予token失败');
+//             }
+//             lk.msg('');
+//             return;
+//         }
+//         if(url.match(/\/markeet\/api\/v3\/resaleManage\/tradingMarket/)){
+//             lk.log(`开始获取Token`);
+//             if ($request.headers['token']) {
+//                 let jwktoken = $request.headers['token'];
+//                 lk.setVal(gandartTokenKey, jwktoken);
+//                 lk.appendNotifyInfo('🎉成功获取光予token,可以关闭相应脚本');
+//             }
+//             lk.msg('');
+//             return;
+//         }
 
-        if(url.match(/\/markeet\/api\/v2\/resaleManage\/resale\/collectionDetailsByCastingId/)){
-            lk.log(`开始获取产品信息`);
-            let data = lk.getResponseBody();
-            try {
-                data = JSON.parse(data);
-                if (data["success"]) {
-                    let obj = data["obj"];
-                    lk.setVal(gardartCollectionNameKey, obj["collectionName"]);
-                    lk.setVal(gardartCastingIdKey, obj["castingId"]);
-                    lk.appendNotifyInfo('🎉成功获取产品信息');
-                } else {
-                    lk.execFail();
-                    lk.appendNotifyInfo('❌获取产品信息失败,请稍后再试');
-                }
-            } catch (e) {
-                lk.execFail();
-                lk.appendNotifyInfo('❌获取产品信息失败');
-            }
-            lk.msg('');
-            return;
-        }
-    }
-}
+//         if(url.match(/\/markeet\/api\/v2\/resaleManage\/resale\/collectionDetailsByCastingId/)){
+//             lk.log(`开始获取产品信息`);
+//             let data = lk.getResponseBody();
+//             try {
+//                 data = JSON.parse(data);
+//                 if (data["success"]) {
+//                     let obj = data["obj"];
+//                     lk.setVal(gardartCollectionNameKey, obj["collectionName"]);
+//                     lk.setVal(gardartCastingIdKey, obj["castingId"]);
+//                     lk.appendNotifyInfo('🎉成功获取产品信息');
+//                 } else {
+//                     lk.execFail();
+//                     lk.appendNotifyInfo('❌获取产品信息失败,请稍后再试');
+//                 }
+//             } catch (e) {
+//                 lk.execFail();
+//                 lk.appendNotifyInfo('❌获取产品信息失败');
+//             }
+//             lk.msg('');
+//             return;
+//         }
+//     }
+// }
 
-async function all() {
-    let hasNeedSendNotify = true;
-    if (gandartToken == '') {
-        lk.execFail();
-        lk.appendNotifyInfo(`⚠️请先打开光予登录获取token`);
-    } else {
-        await checkBuy();
-    }
-    if (hasNeedSendNotify) {
-        lk.msg(``);
-    }
-    lk.done();
-}
+// async function all() {
+//     let hasNeedSendNotify = true;
+//     if (gandartToken == '') {
+//         lk.execFail();
+//         lk.appendNotifyInfo(`⚠️请先打开光予登录获取token`);
+//     } else {
+//         await checkBuy();
+//     }
+//     if (hasNeedSendNotify) {
+//         lk.msg(``);
+//     }
+//     lk.done();
+// }
 
-function checkBuy() {
+// function checkBuy() {
 
-}
+// }
 
 
-function getSign() {
-    const now = new Date().getTime();
-    const s1 = now - 20000;
-    const s2 = now;
-    const s3 = now + 20000;
-    const s4 = now + 40000;
-    const sssfffeee = 'e9'; //localStorage.getItem('sssfffeee');
-    const aggaaa = '9'; //localStorage.getItem('aggaaa');
-    const yyhhhasdww = '0a';
-    let arr = [sssfffeee, yyhhhasdww, aggaaa, '29', 'e','c', 3];
-    let crypto = Crypto();
-    let s5= crypto.md5(s3+arr.join(''));
-    return {
-        's1': s1,
-        's2': s2,
-        's3': s3,
-        's4': s4,
-        's5': s5
-    };
-}
+// function getSign() {
+//     const now = new Date().getTime();
+//     const s1 = now - 20000;
+//     const s2 = now;
+//     const s3 = now + 20000;
+//     const s4 = now + 40000;
+//     const sssfffeee = 'e9'; //localStorage.getItem('sssfffeee');
+//     const aggaaa = '9'; //localStorage.getItem('aggaaa');
+//     const yyhhhasdww = '0a';
+//     let arr = [sssfffeee, yyhhhasdww, aggaaa, '29', 'e','c', 3];
+//     let crypto = Crypto();
+//     let s5= crypto.md5(s3+arr.join(''));
+//     return {
+//         's1': s1,
+//         's2': s2,
+//         's3': s3,
+//         's4': s4,
+//         's5': s5
+//     };
+// }
 
 // https://github.com/lowking/Scripts/blob/master/util/ToolKit.min.js
 //ToolKit-start

Разница между файлами не показана из-за своего большого размера
+ 0 - 137
Scripts/gandartHelperV2.js


Некоторые файлы не были показаны из-за большого количества измененных файлов