diff --git a/admin/dashboard/server.py b/admin/dashboard/server.py index fa35ab9..64850f6 100644 --- a/admin/dashboard/server.py +++ b/admin/dashboard/server.py @@ -195,7 +195,11 @@ class DashboardServer: # 获取当前登录的微信ID # 从新的resp格式中获取用户信息 - user_data = {} + user_data = { + "wxid": self.robot.wxid, + "nickName": self.robot.nickname, + "mobile": self.robot.phone + } if not user_data: return {"success": False, "message": "未获取到用户数据"} diff --git a/plugins/jd_sign_token/main.py b/plugins/jd_sign_token/main.py index 1a49ff3..7cd5fdc 100644 --- a/plugins/jd_sign_token/main.py +++ b/plugins/jd_sign_token/main.py @@ -37,7 +37,7 @@ class QL: url = f"{self.address}/open/auth/token?client_id={self.id}&client_secret={self.secret}" try: # 添加超时参数 - rjson = requests.get(url, timeout=10).json() + rjson = requests.get(url, timeout=(5, 15)).json() if (rjson['code'] == 200): self.auth = f"{rjson['data']['token_type']} {rjson['data']['token']}" else: @@ -54,7 +54,7 @@ class QL: headers = {"Authorization": self.auth} try: # 添加超时参数 - rjson = requests.get(url, headers=headers, timeout=10).json() + rjson = requests.get(url, headers=headers, timeout=(5, 15)).json() if (rjson['code'] == 200): return rjson['data'] else: @@ -90,7 +90,7 @@ class QL: headers = {"Authorization": self.auth, "content-type": "application/json"} try: # 添加超时参数 - rjson = requests.post(url, headers=headers, data=jsonDumps(envs), timeout=10).json() + rjson = requests.post(url, headers=headers, data=jsonDumps(envs), timeout=(5, 15)).json() if (rjson['code'] == 200): self.log(f"新建环境变量成功:{len(envs)}") return True @@ -109,7 +109,7 @@ class QL: headers = {"Authorization": self.auth, "content-type": "application/json"} try: # 添加超时参数 - rjson = requests.put(url, headers=headers, data=jsonDumps(env), timeout=10).json() + rjson = requests.put(url, headers=headers, data=jsonDumps(env), timeout=(5, 15)).json() if (rjson['code'] == 200): self.log(f"更新环境变量成功") return True