untitled 1.66 KB

        // 多人呼叫不能选自己和非独立子账户
        if isMultCall() {
            let member = members?[indexPath.row]
            if member?.uuid == AccountManager.default.getUUid() {
                let alert = UIAlertController(title: nil, message: "不能邀请自己视频", preferredStyle: .alert)
                alert.addAction(UIAlertAction(title: "我知道了", style: .default, handler: nil))
                
                topviewController()?.present(alert, animated: true, completion: nil)
                removeSelf()
                return
            } else if !(member?.isAccount ?? false) {
                let alert = UIAlertController(title: nil, message: "该成员需要开通独立登录的功能才能一起视频", preferredStyle: .alert)
                alert.addAction(UIAlertAction(title: "去开通", style: .default, handler: { (_) in
                    let aVC = HHAddMemberVC.create()
                    aVC.addState = .supplyMulty
                    aVC.model = member
                    topviewController()?.navigationController?.pushViewController(aVC, animated: true)
                }))
                alert.addAction(UIAlertAction(title: "取消", style: .default, handler: nil))
                topviewController()?.present(alert, animated: true, completion: nil)
                removeSelf()
                return
            }
            
            let callInfo = HHCallerInfo()
            callInfo.uuid = member?.uuid
            callInfo.photourl = member?.photourl
            callInfo.name = member?.name
            HHMSDK.default.startTeamCall(.adult, callee: callInfo)
            removeSelf()
            return
        }