|
@@ -1,6 +1,7 @@
|
|
|
package com.cooleshow.teacher.ui.course;
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
+import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
@@ -12,10 +13,13 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
|
|
import com.cooleshow.base.common.WebConstants;
|
|
|
import com.cooleshow.base.router.RouterPath;
|
|
|
import com.cooleshow.base.ui.activity.BaseMVPActivity;
|
|
|
+import com.cooleshow.base.utils.ToastUtil;
|
|
|
import com.cooleshow.teacher.R;
|
|
|
import com.cooleshow.teacher.adapter.MineVideoCoursePagerAdapter;
|
|
|
+import com.cooleshow.teacher.constants.TeacherInfoConstants;
|
|
|
import com.cooleshow.teacher.databinding.ActivityMineVideoCourseBinding;
|
|
|
import com.cooleshow.teacher.presenter.course.MineVideoCoursePresenter;
|
|
|
+import com.cooleshow.usercenter.helper.UserHelper;
|
|
|
import com.google.android.material.tabs.TabLayout;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -32,10 +36,16 @@ import io.rong.imkit.utils.StatusBarUtil;
|
|
|
*/
|
|
|
@Route(path = RouterPath.CourseCenter.TEACHER_MINE_VIDEO_COURSE)
|
|
|
public class MineVideoCourseActivity extends BaseMVPActivity<ActivityMineVideoCourseBinding, MineVideoCoursePresenter> implements View.OnClickListener {
|
|
|
+ private boolean teacherIsCert;
|
|
|
+
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
switch (view.getId()) {
|
|
|
case R.id.tv_right_text:
|
|
|
+ if (!teacherIsCert) {
|
|
|
+ ToastUtil.getInstance().showShort("您还没有完成老师认证,认证后才可创建\n视频课哦");
|
|
|
+ return;
|
|
|
+ }
|
|
|
ARouter.getInstance()
|
|
|
.build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
.withString(WebConstants.WEB_URL, WebConstants.TEACHER_VIDEO_CREATE)
|
|
@@ -48,6 +58,8 @@ public class MineVideoCourseActivity extends BaseMVPActivity<ActivityMineVideoCo
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
StatusBarUtil.setStatusBarDarkTheme(this, true);
|
|
|
+ String teacherCertificationStatus = UserHelper.getTeacherCertificationStatus();
|
|
|
+ teacherIsCert = TextUtils.equals(teacherCertificationStatus, TeacherInfoConstants.ENTRY_STATUS_PASS);
|
|
|
}
|
|
|
|
|
|
private TabLayout tabLayout;
|