Browse Source

上传q音代码逻辑

weicu
liwei1dao 1 year ago
parent
commit
374499d88e
  1. 31
      local_plugins/qq_music/ios/qq_music/Sources/qq_music/QPlayAutoManager.swift

31
local_plugins/qq_music/ios/qq_music/Sources/qq_music/QPlayAutoManager.swift

@ -358,7 +358,7 @@ import QPlayAutoSDK
return
}
// if isLoginOK {
if isLoginOK {
// 已登录,检查连接状态
if isConnected {
// 已连接,直接执行操作
@ -380,20 +380,21 @@ import QPlayAutoSDK
}
}
}
// } else {
// // 未登录,先登录
// print("QPlayAutoManager: 未登录,尝试登录...")
// performLogin { [weak self] success in
// guard let self = self else { return }
// if success {
// print("QPlayAutoManager: 登录成功,执行操作")
// operation()
// } else {
// print("QPlayAutoManager: 登录失败,无法执行操作")
// onFailure?(.loginFailed)
// }
// }
// }
} else {
// 未登录,先登录
print("QPlayAutoManager: 未登录,尝试登录...")
performLogin { [weak self] success in
guard let self = self else { return }
if success {
print("QPlayAutoManager: 登录成功,执行操作")
operation()
} else {
print("QPlayAutoManager: 登录失败,无法执行操作")
onFailure?(.loginFailed)
stop()
}
}
}
}
private func performLogin(completion: @escaping (Bool) -> Void) {

Loading…
Cancel
Save