无故事王国
2024-03-14 a478b668ca1a5d4f6d2d9b1075d292cbbef90de5
WanPai/Network/Services.swift
@@ -1112,7 +1112,7 @@
            }
            /// 编辑参赛人员信息
            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)
@@ -1120,6 +1120,7 @@
                                    .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)
            }
@@ -1144,6 +1145,7 @@
                                    .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)
            }
@@ -1432,16 +1434,16 @@
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
//                                    }
//                        })
            }
}