From 20057bb3bccc6cfc89fb902e7e86c029d37a5ce7 Mon Sep 17 00:00:00 2001 From: blackmatrix7 <27717518+blackmatrix7@users.noreply.github.com> Date: Mon, 19 Apr 2021 11:32:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DFa=E7=B1=B3=E5=AE=B6=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=AD=BE=E5=88=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- script/famijia/famijia_checkin.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 12d2342be..bb1f6c827 100644 --- a/README.md +++ b/README.md @@ -92,5 +92,5 @@ https://github.com/blackmatrix7/ios_rule_script/tree/master/rewrite 以下排名不分先后 -[@BaileyZyp](https://github.com/BaileyZyp) [@Mazeorz](https://github.com/Mazeorz) [@LuzMasonj](https://github.com/LuzMasonj) [@ypannnn](https://github.com/ypannnn) [@echizenryoma](https://github.com/echizenryoma) [@zirawell](https://github.com/zirawell) [@urzz](https://github.com/urzz) [@ASD-max](https://github.com/ASD-max) +[@BaileyZyp](https://github.com/BaileyZyp) [@Mazeorz](https://github.com/Mazeorz) [@LuzMasonj](https://github.com/LuzMasonj) [@chouchoui](https://github.com/chouchoui) [@ypannnn](https://github.com/ypannnn) [@echizenryoma](https://github.com/echizenryoma) [@zirawell](https://github.com/zirawell) [@urzz](https://github.com/urzz) [@ASD-max](https://github.com/ASD-max) diff --git a/script/famijia/famijia_checkin.js b/script/famijia/famijia_checkin.js index 324e1b0d9..ac4e5ec1e 100644 --- a/script/famijia/famijia_checkin.js +++ b/script/famijia/famijia_checkin.js @@ -2,7 +2,7 @@ const scriptName = "Fa米家"; const getCookieRegex = /^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/member\/(signin\/usersign|sign\/current)/; const startAdRegex = /^https?:\/\/fmapp\.chinafamilymart\.com\.cn\/api\/app\/market\/start\/ad/; const famijiaCookieKey = "famijia_checkin_cookie"; -const famijiaDeviceIdKey = "famijia_device_id_cookie"; +const famijiaDeviceIdKey = "famijia_device_id"; const famijiaBlackBoxKey = "famijia_black_box"; let magicJS = MagicJS(scriptName, "INFO"); magicJS.unifiedPushUrl = magicJS.read("famijia_unified_push_url") || magicJS.read("magicjs_unified_push_url"); @@ -14,15 +14,16 @@ function CheckInNewVerrsion(cookie, deviceId, blackBox) { headers: { "Accept": "*/*", "Accept-Encoding": "br;q=1.0, gzip;q=0.9, deflate;q=0.8", - "Accept-Language": "zh-Hans-CN;q=1.0", + "Accept-Language": "zh-Hans-CN;q=1.0, en-CN;q=0.9", "Connection": "keep-alive", "Content-Type": "application/json", "Host": "fmapp.chinafamilymart.com.cn", "User-Agent": "Fa", "blackBox": blackBox, "deviceId": deviceId, - "fmVersion": "2.1.1", + "fmVersion": "2.2.3", "loginChannel": "app", + "os": "ios", "token": cookie, }, body: {}, @@ -37,7 +38,7 @@ function CheckInNewVerrsion(cookie, deviceId, blackBox) { let obj = typeof data === "string" ? JSON.parse(data) : data; if (obj.code === "200") { resolve([obj.data, ""]); - } else if (obj.code === "3004000") { + } else if (obj.message) { resolve([null, obj.message]); } else { magicJS.logError(`签到失败,响应异常:${data}`);