refactor(tests): 探针脚本凭据改为从根 .env 读取,移除硬编码账号密码

- 新增 tests/_env.py:统一读仓库根 .env(仅标准库,进程内缓存)
- tianque 探针 6 个脚本改读 tq_login_username / tq_login_password,account.json 仅兜底
- workflows/share/erp_login.py 的 __main__ 去掉硬编码 ERP 账号密码(改由 .env 提供)
- docs/需求单/README.md 的负责人手机号做脱敏
This commit is contained in:
2026-11-18 20:22:38 +08:00
parent 8c01bd3eaf
commit b20fc3d099
9 changed files with 196 additions and 88 deletions
+7 -4
View File
@@ -9,6 +9,9 @@ if hasattr(sys.stdout, "reconfigure"):
REPO = r"d:\work\code\37duAutomation"
sys.path.insert(0, os.path.join(REPO, "desktop", "electron-shell", "python"))
sys.path.insert(0, os.path.join(REPO, "tests"))
from _env import get as env_get # noqa: E402
PLUGIN_DIR = os.path.join(REPO, "plugins", "XQ0001-0100", "XQ0079 金色湖畔扫码数据导出")
@@ -30,10 +33,10 @@ spec.loader.exec_module(mod)
plugin = mod.PLUGINS.find("xq0079")
fields = {
"tq_account1": "***REMOVED***",
"tq_password1": "***REMOVED***",
"tq_account2": "",
"tq_password2": "",
"tq_account1": env_get("tq_login_username"),
"tq_password1": env_get("tq_login_password"),
"tq_account2": env_get("tq_login_username_2"),
"tq_password2": env_get("tq_login_password_2"),
"login_mode": "人工登录",
"date_from": "",
"date_to": "",