From 86bc643e9140b7dcba02683fd93f034d712e6a01 Mon Sep 17 00:00:00 2001 From: shitao <133397418@qq.com> Date: Sat, 13 Jan 2024 09:32:23 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E5=8A=9F=E8=83=BD(dailycheckin/ima?= =?UTF-8?q?otai):=20=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84=E9=A2=84=E7=95=99?= =?UTF-8?q?=E8=A7=84=E5=88=99=E5=AD=97=E6=AE=B5reserve=5Frule=20?= =?UTF-8?q?=F0=9F=94=A7=20=E9=85=8D=E7=BD=AE(docker):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?config.template.json=E6=94=AF=E6=8C=81=E6=96=B0=E7=9A=84reserve?= =?UTF-8?q?=5Frule=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dailycheckin/imaotai/main.py | 7 +++++-- docker/config.template.json | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dailycheckin/imaotai/main.py b/dailycheckin/imaotai/main.py index e440642..71d0963 100755 --- a/dailycheckin/imaotai/main.py +++ b/dailycheckin/imaotai/main.py @@ -209,6 +209,7 @@ userId: 2 source_data: dict, lat: str = "29.83826", lng: str = "102.182324", + reserve_rule: int = 0, ): day_time = int(time.mktime(datetime.date.today().timetuple())) * 1000 session_id = self.headers["current_session_id"] @@ -221,9 +222,9 @@ userId: 2 ) shops = responses.json()["data"]["shops"] - if self.RESERVE_RULE == 0: + if reserve_rule == 0: return self.distance_shop(item_code, shops, source_data, lat, lng) - if self.RESERVE_RULE == 1: + if reserve_rule == 1: return self.max_shop(city, item_code, p_c_map, province, shops) def act_params(self, shop_id: str, item_id: str): @@ -282,6 +283,7 @@ userId: 2 userId = self.check_item.get("userid") lat = self.check_item.get("lat") lng = self.check_item.get("lng") + reserve_rule = self.check_item.get("reserve_rule", 0) msg = [ { "name": "手机号", @@ -305,6 +307,7 @@ userId: 2 source_data=source_data, lat=lat, lng=lng, + reserve_rule=reserve_rule, ) if max_shop_id == "0": continue diff --git a/docker/config.template.json b/docker/config.template.json index f29c0f9..1b45482 100644 --- a/docker/config.template.json +++ b/docker/config.template.json @@ -77,7 +77,9 @@ "mobile": "18888xxxxxx", "province": "上海市", "token": "eyJxxxxxx", - "userid": "1xxxxxx4" + "userid": "1xxxxxx4", + "reserve_rule": 0 + }, { "city": "多账号 城市", @@ -86,7 +88,8 @@ "mobile": "多账号 手机号", "province": "多账号 省份", "token": "多账号 token", - "userid": "多账号 用户 id" + "userid": "多账号 用户 id", + "reserve_rule": 0 } ], "IQIYI": [