| | |
| | | topMenuAdapter.setOnItemClickListener { view, position -> |
| | | startActivity<TypeCourserActivity>("types" to topMenu,"index" to position) |
| | | } |
| | | banner.setOnBannerListener { data, position -> |
| | | val banner = bannerImg[position] |
| | | jumpCourse(banner.courseId) |
| | | } |
| | | adapter.setOnItemClickListener { view, position -> |
| | | jumpCourse(list[position].id) |
| | | } |
| | | } |
| | | |
| | | private fun jumpCourse(id:String){ |
| | | if (id.isNullOrEmpty()) |
| | | return |
| | | showDialog() |
| | | HttpManager.getPayCourseInfoById(id).requestByF(this,success = { _, data-> |
| | | dismissDialog() |
| | | data?.goDetail(requireContext()) |
| | | }){_,_-> |
| | | dismissDialog() |
| | | } |
| | | } |
| | | |
| | | private fun getBanner(){ |