待补平差检查和上传逻辑
This commit is contained in:
Binary file not shown.
@@ -123,8 +123,21 @@ class LoginPage:
|
||||
|
||||
accounts = apis.get_accounts_from_server("68ef0e02b0138d25e2ac9918")
|
||||
matches = [acc for acc in accounts if acc.get("username") == existing_username]
|
||||
password = None
|
||||
account_id = False
|
||||
if matches:
|
||||
password = matches[0].get("password")
|
||||
|
||||
# ✅ 关键:把 account_id 存入全局变量
|
||||
account_id = matches[0].get("account_id", False)
|
||||
# 只有 account_id 存在时才存全局
|
||||
if account_id is not False:
|
||||
global_variable.GLOBAL_ACCOUNT_ID = account_id
|
||||
logging.info(f"匹配到账号信息:username={existing_username}, account_id={account_id}")
|
||||
else:
|
||||
logging.warning(f"账号 {existing_username} 未返回 account_id,已设为 False")
|
||||
|
||||
|
||||
|
||||
password_field.send_keys(password)
|
||||
|
||||
|
||||
@@ -120,8 +120,8 @@ class MeasureTabbarPage:
|
||||
# 向上滑动
|
||||
# 记录滑动前的项目,用于判断是否滑动到顶
|
||||
before_scroll_items = self.get_current_items()
|
||||
start_y = list_container.location['y'] + list_container.size['height'] * 0.05
|
||||
end_y = list_container.location['y'] + list_container.size['height'] * 0.95
|
||||
start_y = list_container.location['y'] + list_container.size['height'] * 0.2
|
||||
end_y = list_container.location['y'] + list_container.size['height'] * 0.8
|
||||
|
||||
# 执行滑动
|
||||
self.driver.swipe(start_x, start_y, start_x, end_y, 1000)
|
||||
|
||||
@@ -192,8 +192,8 @@ class ScreenshotPage:
|
||||
# 向上滑动
|
||||
# 记录滑动前的项目,用于判断是否滑动到顶
|
||||
before_scroll_items = self.get_current_items()
|
||||
start_y = list_container.location['y'] + list_container.size['height'] * 0.05
|
||||
end_y = list_container.location['y'] + list_container.size['height'] * 0.95
|
||||
start_y = list_container.location['y'] + list_container.size['height'] * 0.2
|
||||
end_y = list_container.location['y'] + list_container.size['height'] * 0.8
|
||||
self.logger.info("向上滑动列表")
|
||||
|
||||
# 执行滑动
|
||||
|
||||
@@ -1086,6 +1086,8 @@ class SectionMileageConfigPage:
|
||||
if not self.click_start_measure_btn():
|
||||
return False
|
||||
|
||||
|
||||
|
||||
# if not self.check_station_page.run():
|
||||
# self.logger.error("检查站页面运行失败")
|
||||
# return False
|
||||
|
||||
Reference in New Issue
Block a user