|
|
@@ -1,6 +1,7 @@
|
|
|
package com.yingyangfly.home.evaluation
|
|
|
|
|
|
import android.annotation.SuppressLint
|
|
|
+import android.os.Bundle
|
|
|
import android.view.MotionEvent
|
|
|
import android.view.View
|
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
|
@@ -8,8 +9,10 @@ import com.yingyang.home.R
|
|
|
import com.yingyang.home.databinding.ActivityEvaluationResultBinding
|
|
|
import com.yingyangfly.baselib.ext.getEndAnimation
|
|
|
import com.yingyangfly.baselib.ext.getScaleAnimation
|
|
|
+import com.yingyangfly.baselib.ext.toast
|
|
|
import com.yingyangfly.baselib.mvvm.BaseMVVMActivity
|
|
|
import com.yingyangfly.baselib.router.RouterUrlCommon
|
|
|
+import com.yingyangfly.home.entity.EvaluationResultBean
|
|
|
|
|
|
/**
|
|
|
* 测评结果
|
|
|
@@ -19,6 +22,14 @@ class EvaluationResultActivity :
|
|
|
BaseMVVMActivity<ActivityEvaluationResultBinding, EvaluationResultViewModel>(),
|
|
|
View.OnTouchListener {
|
|
|
|
|
|
+ private var reviewTaskId = ""
|
|
|
+ private var evaluationResultBeans = mutableListOf<EvaluationResultBean>()
|
|
|
+
|
|
|
+ override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
+ reviewTaskId = intent.getStringExtra("url") ?: ""
|
|
|
+ super.onCreate(savedInstanceState)
|
|
|
+ }
|
|
|
+
|
|
|
override fun initViews() {
|
|
|
|
|
|
}
|
|
|
@@ -34,6 +45,22 @@ class EvaluationResultActivity :
|
|
|
|
|
|
}
|
|
|
|
|
|
+ override fun onResume() {
|
|
|
+ super.onResume()
|
|
|
+ loadData()
|
|
|
+ }
|
|
|
+
|
|
|
+ private fun loadData() {
|
|
|
+ viewModel.findReviewResult(reviewTaskId, fail = {
|
|
|
+ it.toast()
|
|
|
+ }, success = {
|
|
|
+ if (it != null) {
|
|
|
+ evaluationResultBeans.clear()
|
|
|
+ evaluationResultBeans.add(it)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
@SuppressLint("ClickableViewAccessibility")
|
|
|
override fun onTouch(v: View, event: MotionEvent): Boolean {
|
|
|
when (event.action) {
|