|
@@ -30,6 +30,9 @@ import java.util.*
|
|
*/
|
|
*/
|
|
class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>(),
|
|
class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>(),
|
|
HomeContract.HomeView, View.OnClickListener {
|
|
HomeContract.HomeView, View.OnClickListener {
|
|
|
|
+
|
|
|
|
+ private var noticeId: Long = 0
|
|
|
|
+
|
|
override fun getLayoutView(): FragmentHomeLayoutBinding {
|
|
override fun getLayoutView(): FragmentHomeLayoutBinding {
|
|
return FragmentHomeLayoutBinding.inflate(layoutInflater)
|
|
return FragmentHomeLayoutBinding.inflate(layoutInflater)
|
|
}
|
|
}
|
|
@@ -48,7 +51,7 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
|
|
mViewBinding.cardAfterClassHomework.setOnClickListener(this)
|
|
mViewBinding.cardAfterClassHomework.setOnClickListener(this)
|
|
mViewBinding.cardMineIncome.setOnClickListener(this)
|
|
mViewBinding.cardMineIncome.setOnClickListener(this)
|
|
mViewBinding.ivChat.setOnClickListener(this)
|
|
mViewBinding.ivChat.setOnClickListener(this)
|
|
- mViewBinding.tvNoticeContent.setOnClickListener(this)
|
|
|
|
|
|
+ mViewBinding.bgAnnouncement.setOnClickListener(this)
|
|
mViewBinding.imNoticeList.setOnClickListener(this)
|
|
mViewBinding.imNoticeList.setOnClickListener(this)
|
|
mViewBinding.cardKotofusa.setOnClickListener(this)
|
|
mViewBinding.cardKotofusa.setOnClickListener(this)
|
|
}
|
|
}
|
|
@@ -185,20 +188,20 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
|
|
ARouter.getInstance().build(RouterPath.MessageCenter.TEACHER_MESSAGE_MESSAGEBOX)
|
|
ARouter.getInstance().build(RouterPath.MessageCenter.TEACHER_MESSAGE_MESSAGEBOX)
|
|
.navigation()
|
|
.navigation()
|
|
}
|
|
}
|
|
- R.id.tv_notice_content -> {
|
|
|
|
|
|
+ R.id.bg_announcement -> {
|
|
//点击单条公告
|
|
//点击单条公告
|
|
ARouter.getInstance()
|
|
ARouter.getInstance()
|
|
.build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
.build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
.withString(WebConstants.WEB_URL, WebConstants.HELP_CENTER_DETAIL + noticeId)
|
|
.withString(WebConstants.WEB_URL, WebConstants.HELP_CENTER_DETAIL + noticeId)
|
|
.navigation()
|
|
.navigation()
|
|
}
|
|
}
|
|
- R.id.im_notice_list -> {
|
|
|
|
- //公告列表
|
|
|
|
- ARouter.getInstance()
|
|
|
|
- .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
|
- .withString(WebConstants.WEB_URL, WebConstants.HELP_CENTER_CATALOGTYPE_2)
|
|
|
|
- .navigation()
|
|
|
|
- }
|
|
|
|
|
|
+// R.id.im_notice_list -> {
|
|
|
|
+// //公告列表
|
|
|
|
+// ARouter.getInstance()
|
|
|
|
+// .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
|
+// .withString(WebConstants.WEB_URL, WebConstants.HELP_CENTER_CATALOGTYPE_2)
|
|
|
|
+// .navigation()
|
|
|
|
+// }
|
|
R.id.card_Kotofusa -> {
|
|
R.id.card_Kotofusa -> {
|
|
//云库琴房
|
|
//云库琴房
|
|
ARouter.getInstance()
|
|
ARouter.getInstance()
|
|
@@ -308,12 +311,15 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
- private var noticeId: Long = 0
|
|
|
|
|
|
+
|
|
override fun helpCenterContentListSuccess(data: HelpCenterContentBean?) {
|
|
override fun helpCenterContentListSuccess(data: HelpCenterContentBean?) {
|
|
|
|
|
|
if (data?.rows != null && data.rows.size > 0) {
|
|
if (data?.rows != null && data.rows.size > 0) {
|
|
|
|
+ mViewBinding.bgAnnouncement.setVisible(true)
|
|
mViewBinding.tvNoticeContent.text = data.rows[0].title
|
|
mViewBinding.tvNoticeContent.text = data.rows[0].title
|
|
noticeId = data.rows[0].id
|
|
noticeId = data.rows[0].id
|
|
|
|
+ } else {
|
|
|
|
+ mViewBinding.bgAnnouncement.setVisible(false)
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -370,13 +376,16 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
|
|
when (bean?.courseType) {
|
|
when (bean?.courseType) {
|
|
CourseConstants.LIVE_COURSE -> ARouter.getInstance()
|
|
CourseConstants.LIVE_COURSE -> ARouter.getInstance()
|
|
.build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
.build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
- .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + bean.courseGroupId)
|
|
|
|
|
|
+ .withString(
|
|
|
|
+ WebConstants.WEB_URL,
|
|
|
|
+ WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + bean.courseGroupId + "&classId=" + bean.courseId
|
|
|
|
+ )
|
|
.navigation()
|
|
.navigation()
|
|
CourseConstants.OTHER_COURSE -> //陪练课
|
|
CourseConstants.OTHER_COURSE -> //陪练课
|
|
ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
|
|
ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
|
|
.withString(CourseConstants.COURSE_ID, bean.courseId.toString())
|
|
.withString(CourseConstants.COURSE_ID, bean.courseId.toString())
|
|
.withString(CourseConstants.COURSE_GROUP_ID, bean.courseGroupId.toString())
|
|
.withString(CourseConstants.COURSE_GROUP_ID, bean.courseGroupId.toString())
|
|
- .withString(CourseConstants.STUDENT_ID,bean.studentId.toString())
|
|
|
|
|
|
+ .withString(CourseConstants.STUDENT_ID, bean.studentId.toString())
|
|
.navigation()
|
|
.navigation()
|
|
CourseConstants.PIANO_ROOM_COURSE ->
|
|
CourseConstants.PIANO_ROOM_COURSE ->
|
|
//琴房课 跳转详情页
|
|
//琴房课 跳转详情页
|