| | |
| | | } |
| | | |
| | | /// 编辑参赛人员信息 |
| | | class func editParticipant(id:Int,height:Int,weight:Int,phone:String?,isStudent:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | class func editParticipant(id:Int,height:Int,weight:Int,phone:String?,isStudent:Int,headImg:String)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "competition/api/participant/editParticipant") |
| | | .append(key: "id", value: id) |
| | |
| | | .append(key: "weight", value: weight) |
| | | .append(key: "phone", value: phone) |
| | | .append(key: "isStudent", value: isStudent) |
| | | .append(key: "headImg", value: headImg) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | |
| | | .interface(url: "/competition/api/participant/editParticipant") |
| | | .append(key: "id", value: model.id) |
| | | .append(key: "idcard", value: model.idcard) |
| | | .append(key: "headImg",value: model.headImg) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | |
| | | extension Services{ |
| | | static func startNetworkMonitor(){ |
| | | let manager = NetworkReachabilityManager(host: All_Url) |
| | | manager?.startListening(onUpdatePerforming: { status in |
| | | switch status { |
| | | case .notReachable:alertError(msg: "当前网络不可用") |
| | | case .reachable(let type): |
| | | switch type{ |
| | | case .ethernetOrWiFi:alert(msg: "当前为Wi-Fi网络") |
| | | case .cellular:alert(msg: "当前为移动网络") |
| | | } |
| | | default:break |
| | | } |
| | | }) |
| | | // manager?.startListening(onUpdatePerforming: { status in |
| | | // switch status { |
| | | // case .notReachable:alertError(msg: "当前网络不可用") |
| | | // case .reachable(let type): |
| | | // switch type{ |
| | | // case .ethernetOrWiFi:alert(msg: "当前为Wi-Fi网络") |
| | | // case .cellular:alert(msg: "当前为移动网络") |
| | | // } |
| | | // default:break |
| | | // } |
| | | // }) |
| | | } |
| | | } |