From cddd0c2b27826635091e2a20aa6f78d43a9f8e26 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 31 Jul 2025 16:53:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=201.=20=E8=A7=A3=E5=86=B3=E8=BF=9E?= =?UTF-8?q?=E7=BB=AD=E4=B8=8B=E5=8D=95=E6=97=B6=E7=A1=AE=E8=AE=A4=E6=8C=89?= =?UTF-8?q?=E6=89=AD=E7=82=B9=E4=B8=8D=E4=B8=8A=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?,=202.=20=E6=9B=B4=E6=96=B0=E6=8C=81=E4=BB=93=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=89=8D=E5=88=B7=E6=96=B0=E4=B8=80=E4=B8=8B,=20=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easytrader/clienttrader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easytrader/clienttrader.py b/easytrader/clienttrader.py index 95b29928..6895b40c 100644 --- a/easytrader/clienttrader.py +++ b/easytrader/clienttrader.py @@ -144,18 +144,21 @@ def _get_balance_from_statics(self): @property def position(self): self._switch_left_menus(["查询[F4]", "资金股票"]) + self.refresh() return self._get_grid_data(self._config.COMMON_GRID_CONTROL_ID) @property def today_entrusts(self): self._switch_left_menus(["查询[F4]", "当日委托"]) + self.refresh() return self._get_grid_data(self._config.COMMON_GRID_CONTROL_ID) @property def today_trades(self): self._switch_left_menus(["查询[F4]", "当日成交"]) + self.refresh() return self._get_grid_data(self._config.COMMON_GRID_CONTROL_ID) @@ -430,7 +433,7 @@ def _submit_trade(self): time.sleep(0.2) self._main.child_window( control_id=self._config.TRADE_SUBMIT_CONTROL_ID, class_name="Button" - ).click() + ).type_keys('{ENTER}') @perf_clock def __get_top_window_pop_dialog(self): From 2db0dff7941024e196a8862b81ef345a99a41378 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 9 Dec 2025 19:32:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=AA=97=E5=8F=A3=E6=97=B6=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E4=B8=8D=E9=AA=8C=E8=AF=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easytrader/grid_strategies.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easytrader/grid_strategies.py b/easytrader/grid_strategies.py index ae66e295..defb1830 100644 --- a/easytrader/grid_strategies.py +++ b/easytrader/grid_strategies.py @@ -141,7 +141,9 @@ def _get_clipboard_data(self) -> str: if not found: self._trader.app.top_window().Button2.click() # 点击取消 else: - Copy._need_captcha_reg = False + pass + # 不要将 Copy._need_captcha_reg 置为 False, 因为它是类方法, 一旦置为 False, 后续操作都不再进行验证码识别 + # Copy._need_captcha_reg = False count = 5 while count > 0: try: