| | |
| | | } |
| | | |
| | | /// 支付 |
| | | class func useBenefitPayment(chargeId:Int,payType:PayType)->Observable<BaseResponse<SimpleModel>>{ |
| | | class func useBenefitPayment(amount:Double,payType:PayType)->Observable<BaseResponse<PaymentModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/useBenefit/payment") |
| | | .append(key: "chargeId", value: chargeId) |
| | | .append(key: "amount", value: amount) |
| | | .append(key: "payType", value: payType.rawValue) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | |
| | | /// 充值说明 |
| | | class func rechargeDescription()->Observable<BaseResponse<String>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/other/base/stored/rechargeDescription") |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | |
| | | } |
| | | } |
| | | |
| | | // MARK: -- 课程相关 |
| | |
| | | .interface(url: "/account/api/startCource/recordDetails") |
| | | .append(key: "stuId", value: stuId) |
| | | .append(key: "lessionId", value: lessionId) |
| | | .append(key: "startTime", value: startTime) |
| | | .append(key: "time", value: startTime) |
| | | .append(key: "type", value: type) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | /// 更新课后视频学习状态 |
| | | static func updateVideoStatus(coursePackageId:Int,videoId:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/course/api/startCource/updateVideoStatus") |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | /// 更新课后视频学习状态 |
| | | static func receiveAward(id:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/activity/api/benefitsVideo/receiveAward") |
| | | .append(key: "id", value: id) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | /// 上课主页-预约操作 |
| | | static func startCourceRreverse(courseId:Int,time:String,stuId:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/course/api/startCource/reverse") |
| | | .append(key: "courseId", value: courseId) |
| | | .append(key: "time", value: time) |
| | | .append(key: "stuId", value: stuId) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | |
| | | /// 学员勋章详情 |
| | | static func courseStuMedal(stuId:Int)->Observable<BaseResponse<[StudentMedalInfoModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/startCource/stuMedal") |
| | | .append(key: "stuId", value: stuId) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | } |
| | | |
| | | // MARK: -- 探索玩湃 |
| | |
| | | static func exploreHome()->Observable<BaseResponse<[StartClouseExploreModel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/exploreWP/indexOfEx") |
| | | .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string) |
| | | .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string) |
| | | .append(key: "latitude", value: locationTool.currentLocation?.coordinate.latitude.string) |
| | | .append(key: "longitude", value: locationTool.currentLocation?.coordinate.longitude.string) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | |
| | | static func UseBenefitDetail(goodsId:Int,goodsType:ExchangeType)->Observable<BaseResponse<ExchangeGoodsModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/useBenefit/goodsDetails") |
| | | .append(key: "goodsId", value: goodsId) |
| | | .append(key: "goodId", value: goodsId) |
| | | .append(key: "goodsType", value: goodsType.rawValue) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | |
| | | |
| | | |
| | | /// 兑换商品 |
| | | static func exchangeOperation(exchangeType:ExchangePaymentType,goodsId:Int,goodsType:ExchangeType,num:Int,payType:PayType?,stuIds:String)->Observable<BaseResponse<PaymentModel>>{ |
| | | static func exchangeOperation(exchangeType:ExchangePaymentType,goodsId:Int,goodsType:ExchangeType,num:Int,payType:PayType?,stuIds:String,storeId:Int?)->Observable<BaseResponse<PaymentModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/useBenefit/productRedemptionOperation") |
| | | .append(key: "exchangeType", value: exchangeType.rawValue) |
| | |
| | | .append(key: "nums", value: num) |
| | | .append(key: "payType", value: payType?.rawValue) |
| | | .append(key: "stuIds", value: stuIds) |
| | | .append(key: "storeId", value: storeId) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | /// 商城中心 |
| | | class func mallList(goodsType:ExchangeType?,rank:Sort2Type?,search:String?)->Observable<BaseResponse<[MarketMdoel]>>{ |
| | | class func mallList(page:Int,goodsType:ExchangeType?,rank:Sort2Type?,search:String?)->Observable<BaseResponse<[MarketMdoel]>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/account/api/useBenefit/integralMallList") |
| | | .append(key: "goodsType", value: goodsType?.rawValue) |
| | | .append(key: "rank", value: rank?.rawValue) |
| | | .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string) |
| | | .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string) |
| | | .append(key: "pageNum", value: page) |
| | | .append(key: "pageSize", value: 20) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "competition/api/competition/paymentCompetition") |
| | | .append(key: "id", value: id) |
| | | .append(key: "userIds", value: userIds) |
| | | .append(key: "ids", value: userIds) |
| | | .append(key: "payType", value: payType.rawValue) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |