Robert
5 天以前 bfe324e547c704b79b98ce5785686bd83def1daf
WanPai/Network/Services.swift
@@ -14,8 +14,8 @@
#if DEBUG
//let All_Url = "http://192.168.110.80:56666" //正式地址
//let All_Url = "http://vbef9arg13uu.guyubao.com"
let All_Url = "http://8.137.22.229:56666" //正式地址
let Game_Url = "https://try.daowepark.com"
let All_Url = "http://221.182.45.100:1234" //正式地址
let Game_Url = "http://221.182.45.100:1234"
//let Socket_Url = "192.168.110.22"
#else
let All_Url = "http://8.137.22.229:56666" //正式地址
@@ -537,6 +537,8 @@
                                    .interface(url: "/account/api/startCource/listOfStu")
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
            /// 切换学员
            static func startCourseSwitch(id:Int)->Observable<BaseResponse<SimpleModel>>{
@@ -1274,6 +1276,34 @@
                                    .interface(url: "/communityWorldCup/api/worldCup/getWorldCupStore")
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
    class func getWorldCupListFromRank(id:Int,isStudent:Int)->Observable<BaseResponse<[GetWorldCupListFromRank]>>{
                    let params = ParamsAppender.build(url: All_Url)
            .append(key: "id", value: id)
            .append(key: "isStudent", value: isStudent)
            .append(key: "pageNo", value: 1)
            .append(key: "pageSize", value: 100)
                                    .interface(url: "/communityWorldCup/api/worldCup/getWorldCupListFromRank")
                    return NetworkRequest.request(params: params, method: .post, progress: false)
    }
    class func endWorldCup(blueScore:String,custom:String,redScore:String)->Observable<BaseResponse<NoDataModel>>{
                    let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/endWorldCup")
                                    .append(key: "blueScore", value: blueScore)
                                    .append(key: "custom", value: custom)
                                    .append(key: "redScore", value: redScore)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
    static func getWorldCupCodeListID(worldCupId: Int) -> Observable<BaseResponse<[WorldCupCodeModel]>> {
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/communityWorldCup/api/worldCup/getWorldCupCodeListId")
            .append(key: "worldCupId", value: worldCupId)
        return NetworkRequest.request(params: params, method: .post, progress: true)
    }
            /// 获取世界杯详情
            class func getWorldCupDetail(id:Int)->Observable<BaseResponse<WorldCupDetailModel>>{
@@ -1381,7 +1411,7 @@
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }
            class func getWorldCupRank(id:Int,isStudent:Int,radius:Int,sort:Int,year:Int? = nil)->Observable<BaseResponse<[WorldCupMatchRankModel]>>{
    class func getWorldCupRank(id:Int,isStudent:Int,radius:Int,sort:Int,year:Int? = nil,worldCupId:Int? = nil,time:String? = nil)->Observable<BaseResponse<[WorldCupMatchRankModel]>>{
                        let params = ParamsAppender.build(url: All_Url)
                                    .interface(url: "/communityWorldCup/api/worldCup/getWorldCupRank")
                                    .append(key: "id", value: id)
@@ -1389,6 +1419,8 @@
                                    .append(key: "radius", value: radius)
                                    .append(key: "sort", value: sort)
                                    .append(key: "year", value: year)
                                                .append(key: "worldCupId", value: worldCupId)
                                                .append(key: "time", value: time)
                        return NetworkRequest.request(params: params, method: .post, progress: false)
            }