调试京东cookie设置
This commit is contained in:
@@ -250,9 +250,11 @@ class JDTokenPlugin(MessagePluginInterface):
|
||||
|
||||
# 查找是否有相同备注的JD_COOKIE
|
||||
existing_env = None
|
||||
env_id = None
|
||||
for env in envs:
|
||||
if env.get('name') == 'JD_COOKIE' and env.get('remarks') == remark:
|
||||
existing_env = env
|
||||
env_id = env.get('id')
|
||||
break
|
||||
|
||||
result = False
|
||||
@@ -260,7 +262,8 @@ class JDTokenPlugin(MessagePluginInterface):
|
||||
if existing_env:
|
||||
# 更新已存在的环境变量
|
||||
existing_env['value'] = token
|
||||
result = self.ql.updateEnv(existing_env)
|
||||
env_update: dict = {'id': env_id, 'value': token, 'remarks': remark}
|
||||
result = self.ql.updateEnv(env_update)
|
||||
if result:
|
||||
return f"✅ 已成功更新京东账号 [{remark}] 的Token"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user