fix
无故事王国
2024-03-04 54c6ef0be42d9f2e49a344fd69f231cb6df43797
WanPai/Network/Services.swift
@@ -1101,7 +1101,7 @@
            /// 获取参赛人员列表
            class func queryParticipantList(isAuth:Int? = nil)->Observable<BaseResponse<[ActivityDetailPartModel]>>{
                        var params = ParamsAppender.build(url: All_Url)
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "competition/api/participant/queryParticipantList")
                        if isAuth == 1{
                                    params.append(key: "isPre", value: isAuth)
@@ -1258,8 +1258,122 @@
                                    .append(key: "sort", value: sort)
                                    .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
                                    .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
            /// 裁判获取社区世界杯赛点列表【2.0】
            class func getWorldCupStore()->Observable<BaseResponse<[NormalSimpleModel]>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getWorldCupStore")
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
            /// 获取世界杯详情
            class func getWorldCupDetail(id:Int)->Observable<BaseResponse<WorldCupDetailModel>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getWorldCupInfo")
                                    .append(key: "id", value: id)
                                    .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
                                    .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
                        return NetworkRequest.request(params: params, method: .post, progress: true)
            }
            class func worldCupPayment(id:Int,ids:String,payType:PayType,uid:Int?)->Observable<BaseResponse<PaymentModel>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/paymentWorldCup")
                                    .append(key: "id", value: id)
                                    .append(key: "ids", value: ids)
                                    .append(key: "payType", value: payType.rawValue)
                                    .append(key: "uid", value: uid)
                        return NetworkRequest.request(params: params, method: .post, progress: true)
            }
            /// 世界杯报名前校验支付方式
            class func worldCupPaymentCheck(id:Int,ids:String,uid:Int?)->Observable<BaseResponse<WorldCupPayStateModel>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/checkPaymentMethod")
                                    .append(key: "id", value: id)
                                    .append(key: "ids", value: ids)
                                    .append(key: "uid", value: uid)
                        return NetworkRequest.request(params: params, method: .post, progress: true)
            }
            class func worldCupJudgeList(content:String? = nil,storeId:Int? = nil)->Observable<BaseResponse<[WorldCupJudgeModel]>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getWorldCupListCoach")
                                    .append(key: "content", value: content)
                                    .append(key: "storeId", value: storeId)
                                    .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
                                    .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
                        return NetworkRequest.request(params: params, method: .post, progress: true)
            }
            //获取已报名的参赛人员【2.0】
            class func getParticipant()->Observable<BaseResponse<[ActivityDetailPartModel]>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getParticipant")
                        return NetworkRequest.request(params: params, method: .post, progress: true)
            }
            //获取报名的世界杯列表【2.0】
            class func getMyWorldCupList(id:Int,isStudent:Int,pageNo:Int,pageSize:Int = 20,appUserId:Int? = nil,state:SignupType? = nil)->Observable<BaseResponse<[WorldCupSourceModel]>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getMyWorldCupList")
                                    .append(key: "id", value: id)
                                    .append(key: "isStudent", value: isStudent)
                                    .append(key: "pageNo", value: pageNo)
                                    .append(key: "pageSize", value: pageSize)
                                    .append(key: "appUserId", value: appUserId)
                                    .append(key: "state", value: state?.rawValue)
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
            class func getEntrantRank(id:Int,isStudent:Int)->Observable<BaseResponse<WorldCupRankModel>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getEntrantRank")
                                    .append(key: "id", value: id)
                                    .append(key: "isStudent", value: isStudent)
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
            /// 获取报名的世界杯列表【2.0】
            /// - Parameters:
            ///   - state: 状态(1=未开始,2=进行中)
            class func getMyWorldCupList(id:Int,isStudent:Int,pageNo:Int,pageSize:Int = 20,state:Int)->Observable<BaseResponse<[WorldCupListModel]>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getMyWorldCupList")
                                    .append(key: "id", value: id)
                                    .append(key: "isStudent", value: isStudent)
                                    .append(key: "pageNo", value: pageNo)
                                    .append(key: "pageSize", value: pageSize)
                                    .append(key: "state", value: state)
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
            /// 获取已报名世界杯详情【2.0】
            class func getMyWorldCupInfo(id:Int)->Observable<BaseResponse<WorldCupDetailModel>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getMyWorldCupInfo")
                                    .append(key: "id", value: id)
                                    .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
                                    .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
                        return NetworkRequest.request(params: params, method: .post, progress: true)
            }
            /// 获取比赛记录【2.0】
            class func getWorldCupMatchRecord(id:Int,isStudent:Int,pageNo:Int,pageSize:Int = 20)->Observable<BaseResponse<BaseResponseList<WorldCupMatchRecordDataModel>>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getWorldCupMatchRecord")
                                    .append(key: "id", value: id)
                                    .append(key: "isStudent", value: isStudent)
                                    .append(key: "pageNo", value: pageNo)
                                    .append(key: "pageSize", value: pageSize)
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
}
extension Services{