|
@@ -1,11 +1,13 @@
|
|
|
package com.yingyangfly.evaluation.otherevaluation
|
|
package com.yingyangfly.evaluation.otherevaluation
|
|
|
|
|
|
|
|
|
|
+import com.yingyangfly.baselib.bean.QuestionRecordsListBean
|
|
|
import com.yingyangfly.baselib.mvvm.BaseViewModel
|
|
import com.yingyangfly.baselib.mvvm.BaseViewModel
|
|
|
import com.yingyangfly.baselib.net.XUtils
|
|
import com.yingyangfly.baselib.net.XUtils
|
|
|
import com.yingyangfly.baselib.utils.GsonUtil
|
|
import com.yingyangfly.baselib.utils.GsonUtil
|
|
|
import com.yingyangfly.evaluation.entity.EvaluationTypeBean
|
|
import com.yingyangfly.evaluation.entity.EvaluationTypeBean
|
|
|
import com.yingyangfly.evaluation.entity.ExaminationListBean
|
|
import com.yingyangfly.evaluation.entity.ExaminationListBean
|
|
|
import com.yingyangfly.evaluation.entity.GetExaminationListBean
|
|
import com.yingyangfly.evaluation.entity.GetExaminationListBean
|
|
|
|
|
+import com.yingyangfly.evaluation.entity.GetQuestionListBean
|
|
|
import com.yingyangfly.evaluation.net.EVALUATION_API
|
|
import com.yingyangfly.evaluation.net.EVALUATION_API
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -47,4 +49,23 @@ class OtherEvaluationViewModel : BaseViewModel() {
|
|
|
success, fail
|
|
success, fail
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取试题库列表
|
|
|
|
|
+ */
|
|
|
|
|
+ fun getQuestionList(
|
|
|
|
|
+ id: String,
|
|
|
|
|
+ fail: ((msg: String) -> Unit)? = null,
|
|
|
|
|
+ success: ((success: QuestionRecordsListBean?) -> Unit)? = null,
|
|
|
|
|
+ ) = launchFlow(true) {
|
|
|
|
|
+ val requestBean = GetQuestionListBean().apply {
|
|
|
|
|
+ limit = "99999"
|
|
|
|
|
+ page = 1
|
|
|
|
|
+ examinationId = id
|
|
|
|
|
+ }
|
|
|
|
|
+ val body = XUtils.createJson(GsonUtil.GsonString(requestBean))
|
|
|
|
|
+ EVALUATION_API.getQuestionList(body)
|
|
|
|
|
+ }.runUI(
|
|
|
|
|
+ success, fail
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
}
|
|
}
|