罗明文
3 天以前 442124baa483f8d1c4aaca7ff81e15dd3f122363
app/src/main/java/com/dollearn/student/network/HttpManager.kt
@@ -9,7 +9,6 @@
import io.reactivex.Flowable
object HttpManager {
    private const val PAGE_SIZE = 20
    /**
     * 发起请求方法
@@ -23,14 +22,6 @@
     */
    fun getH5(type: Int): Flowable<ResultData<String>> {
        return request().getH5(type)
    }
    /**
     * 体检报告
     */
    fun queryPhysical(id: String): Flowable<ResultData<Report>> {
        return request().queryPhysical(id)
    }
    /**
@@ -55,41 +46,6 @@
        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)
    }
    /**
     * 获取验证码
@@ -170,6 +126,20 @@
    }
    /**
     * 重新开始答题
     */
    fun restart(day: Int,week: Int,type: Int): Flowable<ResultData<Any>> {
        return request().restart(Gson().toJson(ReqRestart(day,type,week)))
    }
    /**
     * 保存当前题目记录
     */
    fun answerQuestion(sortBean: SortBean): Flowable<ResultData<Any>> {
        return request().answerQuestion(Gson().toJson(sortBean))
    }
    /**
     * 完成学习
     */
    fun completeLearning(rate: Int,time: Int,day: Int,week: Int,season: Int,type: Int,teamIds:String): Flowable<ResultData<Int?>> {
@@ -198,17 +168,17 @@
    }
    /**
     * 题目二是否展示文字
     */
    fun getIsOpen(): Flowable<ResultData<Boolean>> {
        return request().getIsOpen()
    }
    /**
     * 回复进度
     */
    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)
    }
    /**
@@ -399,31 +369,5 @@
     */
    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
        )
    }
}