| | |
| | | tempArray.append(TempModel(id: blue.id, participantType: blue.participantType, type: "blue").toJSON()!) |
| | | } |
| | | |
| | | CommonAlertView.show(title: "提示", content: "确认开启当前比赛吗?") {[weak self] status in |
| | | CommonAlertView.show(title: "提示", content: "确认开启当前比赛吗?",cancelStr: "关闭") {[weak self] status in |
| | | guard let weakSelf = self else { return } |
| | | if status{ |
| | | Services.startWorldCup(code: devCode, people: tempArray.jq_toJson1(), worldCupId: weakSelf.model.id).subscribe(onNext: {data in |
| | | if let _ = data.data{ |
| | | weakSelf.btn_handle.isEnabled = false |
| | | alert(msg: "比赛已开始") |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { |
| | | weakSelf.navigationController?.popViewController() |
| | | } |
| | | alert(msg: "比赛开始") |
| | | weakSelf.redTeamItems.removeAll() |
| | | weakSelf.blueTeamItems.removeAll() |
| | | weakSelf.updateUserView() |
| | | } |
| | | }).disposed(by: weakSelf.disposeBag) |
| | | } |