|
|
@@ -29,11 +29,11 @@ class SwitchAccount(LoginAccount, ExitGame, GameUi, SwitchAccountAssets):
|
|
|
@type frm:
|
|
|
"""
|
|
|
super().__init__(config, device)
|
|
|
- self.toAccountInfo = to
|
|
|
- self.fromAccountInfo = frm
|
|
|
+ self.to_account_info = to
|
|
|
+ self.from_account_info = frm
|
|
|
|
|
|
def switchAccount(self):
|
|
|
- logger.info("start switchAccount %s-%s", self.toAccountInfo.character, self.toAccountInfo.svr)
|
|
|
+ logger.info("start switchAccount %s-%s", self.to_account_info.character, self.to_account_info.svr)
|
|
|
# 判断所处界面
|
|
|
curPage = self.ui_get_current_page()
|
|
|
|
|
|
@@ -44,12 +44,12 @@ class SwitchAccount(LoginAccount, ExitGame, GameUi, SwitchAccountAssets):
|
|
|
self.exitGame()
|
|
|
|
|
|
# 处于登录界面
|
|
|
- if not self.login(self.toAccountInfo):
|
|
|
+ if not self.login(self.to_account_info):
|
|
|
return False
|
|
|
- logger.info("%s login suc", self.toAccountInfo.character)
|
|
|
+ logger.info("%s login suc", self.to_account_info.character)
|
|
|
# 处理位于登录界面各种奇葩弹窗
|
|
|
login_handler = LoginHandler(config=self.config, device=self.device)
|
|
|
- login_handler.set_specific_usr(self.toAccountInfo.svr)
|
|
|
+ login_handler.set_specific_usr(self.to_account_info.svr)
|
|
|
login_handler.app_handle_login()
|
|
|
|
|
|
return True
|
|
|
@@ -58,6 +58,6 @@ class SwitchAccount(LoginAccount, ExitGame, GameUi, SwitchAccountAssets):
|
|
|
if __name__ == '__main__':
|
|
|
config = Config('oas1')
|
|
|
device=Device()
|
|
|
- toAccount=AccountInfo(account="email0@163.com",accountAlias="emailO#emailo",appleOrAndroid=True,character="粘贴",svr="立秋夕烛")
|
|
|
+ toAccount=AccountInfo(account="email0@163.com", account_alias="emailO#emailo", apple_or_android=True, character="粘贴", svr="立秋夕烛")
|
|
|
sa=SwitchAccount(config,device,toAccount)
|
|
|
sa.switchAccount()
|