| | |
| | | import io.reactivex.Flowable |
| | | |
| | | object HttpManager { |
| | | private const val PAGE_SIZE = 20 |
| | | |
| | | /** |
| | | * 发起请求方法 |
| | |
| | | */ |
| | | fun getH5(type: Int): Flowable<ResultData<String>> { |
| | | return request().getH5(type) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 体检报告 |
| | | */ |
| | | fun queryPhysical(id: String): Flowable<ResultData<Report>> { |
| | | return request().queryPhysical(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | return request().studyRecord() |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课时记录 |
| | | */ |
| | | fun recordDetails( |
| | | stuId: String, |
| | | courseId: String, |
| | | time: String?, |
| | | type: Int? |
| | | ): Flowable<ResultData<ArrayList<CourseRecord>>> { |
| | | return request().recordDetails(stuId, courseId, time, type) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 评语 |
| | | */ |
| | | fun stuComment(id: String): Flowable<ResultData<ArrayList<Evaluation>>> { |
| | | return request().stuComment(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 课时详情 |
| | | */ |
| | | fun lessonDetails(id: String, stuId: String): Flowable<ResultData<MyCourseDetail>> { |
| | | return request().lessonDetails(stuId, id) |
| | | } |
| | | |
| | | /** |
| | | * 设为默认运动营成员 |
| | | */ |
| | | fun editDefault(stuId: String): Flowable<ResultData<Any>> { |
| | | return request().editDefault(stuId) |
| | | } |
| | | |
| | | /** |
| | | * 获取验证码 |
| | |
| | | */ |
| | | fun teamSchedule(day: Int,week: Int,type: Int): Flowable<ResultData<ProgressBean>> { |
| | | return request().teamSchedule(day, type, week) |
| | | } |
| | | |
| | | /** |
| | | * 兑换详情 |
| | | */ |
| | | fun redemptionDetails(id: String): Flowable<ResultData<ExchangeDetail>> { |
| | | return request().redemptionDetails(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | fun exchangeRecord(page: Int): Flowable<ResultData<ExchangeRecordBean>> { |
| | | return request().exchangeRecord(page) |
| | | } |
| | | |
| | | /** |
| | | * 已报运动营详情 |
| | | */ |
| | | fun registeredData(id: String,orderId: String): Flowable<ResultData<JoinedCourse>> { |
| | | return request().registeredData(DollearnApplication.lat,DollearnApplication.lon,id,orderId) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 公告列表 |
| | | */ |
| | | fun noticeList(): Flowable<ResultData<List<Notice>>> { |
| | | return request().noticeList() |
| | | } |
| | | |
| | | /** |
| | | * 公告详情 |
| | | */ |
| | | fun noticeDetail(id: String, type: Int): Flowable<ResultData<Notice>> { |
| | | return request().noticeDetail( |
| | | if (type == 1) Apis.noticeDetail else Apis.exceptionDetail, |
| | | id, |
| | | id |
| | | ) |
| | | } |
| | | } |