|
|
|
@ -5,25 +5,36 @@ import com.xty.base.act.BaseVmAct
|
|
|
|
|
import com.xty.base.vm.BaseVm
|
|
|
|
|
import com.zj365.health.adapter.psychological.PsychologicalRecommendAdapter
|
|
|
|
|
import com.zj365.health.databinding.ActPsychologicalResultBinding
|
|
|
|
|
import com.zj365.health.vm.PsychologicalResultVm
|
|
|
|
|
|
|
|
|
|
class PsychologicalResultAct: BaseVmAct<BaseVm>() {
|
|
|
|
|
class PsychologicalResultAct: BaseVmAct<PsychologicalResultVm>() {
|
|
|
|
|
val binding by lazy { ActPsychologicalResultBinding.inflate(layoutInflater) }
|
|
|
|
|
|
|
|
|
|
val mAdapter by lazy { PsychologicalRecommendAdapter() }
|
|
|
|
|
|
|
|
|
|
var answerId:Long = 0
|
|
|
|
|
|
|
|
|
|
override fun initView() {
|
|
|
|
|
super.initView()
|
|
|
|
|
statusBar(binding.title.mView)
|
|
|
|
|
binding.title.mTvTitle.text = "性格测试总结"
|
|
|
|
|
binding.title.mIvBack.setOnClickListener {
|
|
|
|
|
finish()
|
|
|
|
|
}
|
|
|
|
|
answerId = intent.extras!!.getLong("answerId",0)
|
|
|
|
|
|
|
|
|
|
mViewModel.getPsychologicalResult(answerId)
|
|
|
|
|
|
|
|
|
|
binding.recycler.layoutManager = LinearLayoutManager(this)
|
|
|
|
|
binding.recycler.adapter = mAdapter
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun liveObserver() {
|
|
|
|
|
|
|
|
|
|
mViewModel.psychologicalResultData.observe(this){
|
|
|
|
|
binding.title.mTvTitle.text = "${it.data.surveyName}"
|
|
|
|
|
binding.tvSummaryContent.text = "${it.data.conclusionText}"
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun setLayout() = binding.root
|
|
|
|
|