restore: 恢复 11-06~11-09 本地未提交改动
- libs: 新增 hr_sdk / hotel_report / dingtalk,更新 desktopauto - controlplane-next: SDK 管理模块(controller/entity/migrations)与前端视图 - electron-shell: 插件同步、注册表、runner 调整 - plugins: XQ0035/XQ0041/XQ0042/XQ0045_XQ0046/XQ0048/XQ0076/XQ0078 等版本更新 - tests/tools: 新增 SDK 兼容性检查与打包工具(sdk_pack.py、sdk_compat_check.py)
This commit is contained in:
@@ -86,7 +86,7 @@ def _diagnose_decrypt(page):
|
||||
class BankCommExportPlugin(ScenePlugin):
|
||||
id = 'xq0076'
|
||||
name = '交通银行数据导出'
|
||||
version = '1.2.4'
|
||||
version = '1.2.5'
|
||||
description = ('交通银行商户服务门户(merchantapp.bankcomm.com)商户验券交易流水导出:'
|
||||
'账密自动登录(政策同意 + 跳过扫码全自动),接口查询判有无数据后导出,'
|
||||
'下载 zip 并解压 csv(GBK),全程限流')
|
||||
|
||||
@@ -166,12 +166,28 @@ def apply_window_mode(page):
|
||||
log(f'设置窗口全屏失败(忽略):{e}', 'WARN')
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
_set_topmost(page.process_id)
|
||||
_set_topmost(page.process_id, True)
|
||||
except Exception as e:
|
||||
log(f'设置窗口置顶失败(忽略):{e}', 'WARN')
|
||||
|
||||
|
||||
def _set_topmost(pid):
|
||||
def restore_window_mode(page):
|
||||
"""登录成功后恢复普通窗口并取消置顶 —— 全屏置顶只为登录/政策页时让人看见。
|
||||
|
||||
后续导出要跑几分钟,一直全屏置顶会让用户完全没法用电脑。失败仅告警。
|
||||
"""
|
||||
try:
|
||||
page.set.window.normal()
|
||||
except Exception as e:
|
||||
log(f'恢复窗口大小失败(忽略):{e}', 'WARN')
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
_set_topmost(page.process_id, False)
|
||||
except Exception as e:
|
||||
log(f'取消窗口置顶失败(忽略):{e}', 'WARN')
|
||||
|
||||
|
||||
def _set_topmost(pid, on=True):
|
||||
if not pid:
|
||||
return
|
||||
import ctypes
|
||||
@@ -199,5 +215,6 @@ def _set_topmost(pid):
|
||||
|
||||
user32.SetWindowPos.argtypes = [wintypes.HWND, wintypes.HWND, ctypes.c_int,
|
||||
ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_uint]
|
||||
target = -1 if on else -2 # HWND_TOPMOST / HWND_NOTOPMOST
|
||||
for hwnd in hwnds:
|
||||
user32.SetWindowPos(hwnd, wintypes.HWND(-1), 0, 0, 0, 0, 0x0001 | 0x0002)
|
||||
user32.SetWindowPos(hwnd, wintypes.HWND(target), 0, 0, 0, 0, 0x0001 | 0x0002)
|
||||
|
||||
@@ -405,6 +405,7 @@ def ensure_login(page, username=None, password=None, force=False):
|
||||
config.debug(f'安装鉴权 hook 失败:{e}')
|
||||
if not force and logged_in(page):
|
||||
config.log('浏览器残留登录态仍有效,直接复用')
|
||||
config.restore_window_mode(page) # 已登录,不用再全屏/置顶
|
||||
return {'success': True, 'message': '复用残留登录态', 'relogin': False}
|
||||
|
||||
if not username or not password:
|
||||
@@ -435,6 +436,7 @@ def ensure_login(page, username=None, password=None, force=False):
|
||||
|
||||
if _login_flow(page, agreed=policy_ok):
|
||||
config.log(f'登录成功:{page.url}')
|
||||
config.restore_window_mode(page) # 已登录,不用再全屏/置顶
|
||||
return {'success': True, 'message': '登录成功', 'relogin': True}
|
||||
|
||||
return {'success': False, 'message': '登录未完成(政策页未同意 / 账号密码有误 / 超时)', 'relogin': True}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"schema_version": 1,
|
||||
"id": "xq0076",
|
||||
"name": "交通银行数据导出",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"description": "交通银行商户服务门户(merchantapp.bankcomm.com)商户验券交易流水导出:账密自动登录(隐私政策同意 + 跳过 APP 扫码授权全自动),接口查询判有无数据后提交导出,取 OSS 直链下载 zip 并解压 csv(GBK)。全程走接口不点页面,5 秒级完成,请求全局限流。",
|
||||
"category": "财务",
|
||||
"icon": "",
|
||||
|
||||
Reference in New Issue
Block a user