younger_times
2023-07-12 5a590aaf3fd9ed5f9cfd2d54e72c904ce4918e7f
WanPai/Network/Services.swift
@@ -23,8 +23,8 @@
    class func homeInfo()->Observable<BaseResponse<HomeStoreModel>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/account/api/appUser/queryJoinPlayPai")
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude)
            .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)
    }
@@ -94,8 +94,8 @@
    class func queryCourseList(typeId:Int? = nil,distanceSort:SortType? = nil,salesRanking:SortType? = nil,search:String? = nil,storeId:Int? = nil)->Observable<BaseResponse<[CourseItemModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/course/queryCourseList")
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude)
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
            .append(key: "coursePackageTypeId", value: typeId)
            .append(key: "distanceSort", value: distanceSort?.rawValue)
            .append(key: "salesRanking", value: salesRanking?.rawValue)
@@ -113,8 +113,8 @@
    class func queryStoreList()->Observable<BaseResponse<[NormalSimpleModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/other/base/store/queryStoreLists")
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude)
            .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)
    }
@@ -122,10 +122,20 @@
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/course/api/course/queryCourseInfo")
            .append(key: "id", value: id)
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude)
            .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 queryAvaiableCopons(id:Int,price:Double)->Observable<BaseResponse<[CouponInfoModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "/activity/api/coupon/queryAvailableCouponList")
            .append(key: "coursePackageId", value: id)
            .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
            .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
            .append(key: "price", value: "\(price)")
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }
}
    // MARK: -- 其他