|
@@ -56,12 +56,15 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
|
|
|
mViewBinding.tvEquipmentTesting.setOnClickListener(this);
|
|
|
mViewBinding.llCourseNumCompleted.setOnClickListener(this);
|
|
|
mViewBinding.llCourseNumNotStart.setOnClickListener(this);
|
|
|
+ mViewBinding.ivGoodsOrder.setOnClickListener(this);
|
|
|
+ mViewBinding.tvGoodsOrder.setOnClickListener(this);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void initData() {
|
|
|
|
|
|
}
|
|
|
+
|
|
|
//是否有直播权限 0 否 1 是
|
|
|
private int liveFlag;
|
|
|
|
|
@@ -71,15 +74,15 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
|
|
|
}
|
|
|
liveFlag = teacherUserInfo.liveFlag;
|
|
|
//头像
|
|
|
- GlideUtils.INSTANCE.loadImage(requireContext(), teacherUserInfo.heardUrl, mViewBinding.ivAvatar,R.drawable.icon_teacher_default_head);
|
|
|
+ GlideUtils.INSTANCE.loadImage(requireContext(), teacherUserInfo.heardUrl, mViewBinding.ivAvatar, R.drawable.icon_teacher_default_head);
|
|
|
//昵称
|
|
|
mViewBinding.tvNickname.setText(UserHelper.getTeacherName(teacherUserInfo.username, teacherUserInfo.userId));
|
|
|
//星级
|
|
|
- if (teacherUserInfo.starGrade>0){
|
|
|
+ if (teacherUserInfo.starGrade > 0) {
|
|
|
mViewBinding.ratingBar.setVisibility(View.VISIBLE);
|
|
|
mViewBinding.ratingBar.setRating(teacherUserInfo.starGrade);
|
|
|
mViewBinding.tvNoScore.setVisibility(View.GONE);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
mViewBinding.ratingBar.setVisibility(View.GONE);
|
|
|
mViewBinding.tvNoScore.setVisibility(View.VISIBLE);
|
|
|
}
|
|
@@ -120,10 +123,10 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
|
|
|
} else if (TextUtils.equals(teacherUserInfo.musicianAuthStatus, TeacherInfoConstants.MUSICIAN_STATUS_DOING)) {
|
|
|
mViewBinding.ivTeacherMusicPersonTag.setVisibility(View.GONE);
|
|
|
mViewBinding.tvMusicStatusTip.setText("审核中");
|
|
|
- }else if (TextUtils.equals(teacherUserInfo.musicianAuthStatus, TeacherInfoConstants.MUSICIAN_STATUS_UNPAALY)) {
|
|
|
+ } else if (TextUtils.equals(teacherUserInfo.musicianAuthStatus, TeacherInfoConstants.MUSICIAN_STATUS_UNPAALY)) {
|
|
|
mViewBinding.ivTeacherMusicPersonTag.setVisibility(View.GONE);
|
|
|
mViewBinding.tvMusicStatusTip.setText("未认证");
|
|
|
- }else if (TextUtils.equals(teacherUserInfo.musicianAuthStatus, TeacherInfoConstants.MUSICIAN_STATUS_UNPASS)) {
|
|
|
+ } else if (TextUtils.equals(teacherUserInfo.musicianAuthStatus, TeacherInfoConstants.MUSICIAN_STATUS_UNPASS)) {
|
|
|
mViewBinding.ivTeacherMusicPersonTag.setVisibility(View.GONE);
|
|
|
mViewBinding.tvMusicStatusTip.setText("申请未通过");
|
|
|
}
|
|
@@ -233,12 +236,12 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
|
|
|
break;
|
|
|
case R.id.iv_open_live:
|
|
|
case R.id.tv_open_live:
|
|
|
- if (liveFlag==0){
|
|
|
+ if (liveFlag == 0) {
|
|
|
ARouter.getInstance()
|
|
|
.build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
.withString(WebConstants.WEB_URL, WebConstants.TEACHER_OPEN_LIVE)
|
|
|
.navigation();
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
ARouter.getInstance().build(RouterPath.LiveCenter.TEACHER_MINE_CREATE_COURSE)
|
|
|
.navigation();
|
|
|
}
|
|
@@ -268,12 +271,20 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
|
|
|
ARouter.getInstance().build(RouterPath.CourseCenter.TEACHER_MINE_COURSE)
|
|
|
.navigation();
|
|
|
break;
|
|
|
+ //商品订单
|
|
|
+ case R.id.tv_goods_order:
|
|
|
+ case R.id.iv_goods_order:
|
|
|
+ ARouter.getInstance()
|
|
|
+ .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
+ .withString(WebConstants.WEB_URL, WebConstants.MALL_GOODS_ORDER)
|
|
|
+ .navigation();
|
|
|
+ break;
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void checkPermission(){
|
|
|
+ private void checkPermission() {
|
|
|
new RxPermissions(this)
|
|
|
.request(Manifest.permission.RECORD_AUDIO,
|
|
|
Manifest.permission.WRITE_EXTERNAL_STORAGE)
|