From bf05760348145297b59edb5b9ca69870c98a82af Mon Sep 17 00:00:00 2001 From: yml2213 Date: Thu, 29 Sep 2022 18:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E4=BA=86=E5=BF=AB=E9=80=92=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9F=A5=E8=AF=A2,=E4=B8=8D=E7=94=A8=E6=9D=A5?= =?UTF-8?q?=E5=9B=9E=E7=9C=8B=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gqcq/gqcq.js | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/gqcq/gqcq.js b/gqcq/gqcq.js index 0e117b8..0948518 100644 --- a/gqcq/gqcq.js +++ b/gqcq/gqcq.js @@ -9,8 +9,9 @@ * 6-10 更新模板,修改部分逻辑! * 9-12 修复抽奖,增加签到宝箱开启 * 9-21 增加用户信息输出 - * 9-22 修复开宝箱错误 - * 9-28 修复删除帖子错误 + * 9-22 修复开宝箱错误 + * 9-28 修复删除帖子错误 + * 9-29 增加了快递信息查询,不用来回看了 * * ========= 青龙--配置文件--贴心复制区域 ========= @@ -35,7 +36,7 @@ let ckStr = process.env[alias_name]; let msg, ck; let ck_status = true; //--------------------------------------------------------------------------------------------------------- -let VersionCheck = "1.2.5" +let VersionCheck = "1.2.6" let Change = '修复开宝箱错误' let thank = `\n感谢 群友 的投稿\n` //--------------------------------------------------------------------------------------------------------- @@ -57,6 +58,7 @@ async function start() { await task_list('任务列表'); await unopenlist('宝箱查询'); await Points_Enquiry('积分查询'); + await express_check('快递查询'); } } @@ -153,6 +155,50 @@ async function Points_Enquiry(name) { } +// 快递查询 httpGet https://gsp.gacmotor.com/gateway/app-api/shop/shoporder/exchangelist?current=1&size=20&type=2&queryTimeType=0&vin= +async function express_check(name) { + DoubleLog(`\n开始 ${name}`); + try { + let Options = { + url: `${hostname}/gateway/app-api/shop/shoporder/exchangelist?current=1&size=20&type=2&queryTimeType=0&vin=`, + headers: cq_headers2 + }; + let result = await httpGet(Options, name); + + // console.log(result); + if (result.errorCode == 200) { + DoubleLog(`${name}:您当前有 ${result.data.total} 个快递 📦`); + if (result.data.total > 0) { + let express = result.data.records + for (let index = 0; index < express.length; index++) { + let commodityName = express[index].commodityName + let createDate = express[index].createDate + let orderStatusStr = express[index].orderStatusStr + let logisticsCompany = express[index].logisticsCompany + let trackingNumber = express[index].trackingNumber + if (express[index].orderStatus == 1) { + DoubleLog(`快递信息: \n ${commodityName}: 创建时间:${createDate}, 当前状态:${orderStatusStr}`) + } else if (express[index].orderStatus == 2) { + DoubleLog(`快递信息: \n ${commodityName}: 创建时间:${createDate}, 当前状态:${orderStatusStr}, 快递公司:${logisticsCompany}, 单号: ${trackingNumber}`) + } else if (express[index].orderStatus == 3) { + DoubleLog(`快递信息: \n ${commodityName}: 创建时间:${createDate}, 当前状态:${orderStatusStr}`) + } + } + } else if (result.data.total == 0) { + DoubleLog(`您当前无快递信息`) + } + } else { + DoubleLog(`${name}:失败 ❌ 了呢,原因未知!`); + console.log(result); + return ck_status = false; + } + } catch (error) { + console.log(error); + } +} + + + // 任务列表 async function task_list(name) {