| | |
| | | import JQTools |
| | | |
| | | #if DEBUG |
| | | let All_Url = "http://192.168.110.237:9000" |
| | | //let All_Url = "http://1.95.15.237:9000" |
| | | //let All_Url = "http://192.168.110.237:9000" |
| | | let All_Url = "http://1.95.15.237:9000" |
| | | #else |
| | | let All_Url = "http://1.95.15.237:9000" |
| | | #endif |
| | |
| | | return NetworkRequest.request(params: params, method: .get, progress: true) |
| | | } |
| | | |
| | | class func completeStory(storyId:Int,integral:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | class func completeStory(storyId:Int,accuracy:Int,studyTime:Int,type:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | params.interface(url: "/study/base/study/completeStory") |
| | | params.append(key: "storyId", value: storyId) |
| | | params.append(key: "integral", value: integral) |
| | | params.append(key: "accuracy", value: accuracy) |
| | | params.append(key: "studyTime", value: studyTime) |
| | | params.append(key: "type", value: type) |
| | | return NetworkRequest.request(params: params, method: .get, progress: true) |
| | | } |
| | | |
| | |
| | | return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding.default, progress: true) |
| | | } |
| | | |
| | | class func exitLearning(type:Int,week:Int,day:Int,teamIds:[String],topicIds:[String],answerNumber:Int,correctNumber:Int,studyTime:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | class func exitLearning(type:Int,week:Int,day:Int,teamIds:[String],topicIds:[String],answerNumber:Int,correctNumber:Int,studyTime:Int,schedule:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | params.interface(url: "/study/base/study/exitLearning") |
| | | .append(key: "week", value: week) |
| | |
| | | .append(key: "answerNumber", value: answerNumber) |
| | | .append(key: "correctNumber", value: correctNumber) |
| | | .append(key: "studyTime", value: studyTime) |
| | | .append(key: "schedule", value: schedule) |
| | | return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding.default, progress: true) |
| | | } |
| | | |
| | |
| | | params.interface(url: "/study/base/study/giveIntegral") |
| | | return NetworkRequest.request(params: params, method: .get, progress: false) |
| | | } |
| | | |
| | | class func confirmStudy(id:Int)->Observable<BaseResponse<SimpleModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | params.interface(url: "/goods/base/goods/confirmStudy") |
| | | .append(key: "id", value: id) |
| | | return NetworkRequest.request(params: params, method: .get, progress: false) |
| | | } |
| | | |
| | | class func shareInfo()->Observable<BaseResponse<ShareInfoModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | params.interface(url: "/study/base/user/shareInfo") |
| | | return NetworkRequest.request(params: params, method: .get, progress: false) |
| | | } |
| | | } |
| | | |
| | | extension Services{ |