|
@@ -42,6 +42,9 @@ public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePa
|
|
|
private boolean hasNext = true;
|
|
|
// private String currentFilterDate;
|
|
|
|
|
|
+ //是否有直播权限 0 否 1 是
|
|
|
+ private int liveFlag;
|
|
|
+
|
|
|
@Override
|
|
|
protected void initView(View rootView) {
|
|
|
mViewBinding.tvCreateLiveCourse.setOnClickListener(this);
|
|
@@ -94,10 +97,17 @@ public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePa
|
|
|
public void onClick(View view) {
|
|
|
switch (view.getId()) {
|
|
|
case R.id.tv_create_live_course:
|
|
|
- ARouter.getInstance()
|
|
|
- .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
- .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_CREATE)
|
|
|
- .navigation();
|
|
|
+ if (liveFlag == 0) {
|
|
|
+ ARouter.getInstance()
|
|
|
+ .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
+ .withString(WebConstants.WEB_URL, WebConstants.TEACHER_OPEN_LIVE)
|
|
|
+ .navigation();
|
|
|
+ } else {
|
|
|
+ ARouter.getInstance()
|
|
|
+ .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
+ .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_CREATE)
|
|
|
+ .navigation();
|
|
|
+ }
|
|
|
break;
|
|
|
case R.id.tv_open:
|
|
|
if (mViewBinding.tvOpen.getText().toString().equals("去认证")) {
|
|
@@ -210,6 +220,6 @@ public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePa
|
|
|
mViewBinding.tvOpen.setVisibility(View.VISIBLE);
|
|
|
mViewBinding.tvOpen.setText("去认证");
|
|
|
}
|
|
|
-
|
|
|
+ liveFlag = teacherUserInfo.liveFlag;
|
|
|
}
|
|
|
}
|