Browse Source

bug 修改

邓琴文 3 years ago
parent
commit
ef70e33506

+ 48 - 52
student/src/main/res/layout/fragment_home_layout.xml

@@ -112,13 +112,60 @@
 
                 </LinearLayout>
 
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/bg_announcement"
+                    android:layout_width="match_parent"
+                    android:layout_height="44dp"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginEnd="14dp"
+                    android:background="@drawable/bg_white_10dp"
+                    android:elevation="2dp"
+                    android:orientation="horizontal"
+                    android:visibility="gone">
+
+                    <ImageView
+                        android:id="@+id/iv_bell"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="10dp"
+                        android:src="@drawable/icon_home_bell"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_notice_content"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_marginStart="2dp"
+                        android:gravity="center"
+                        android:includeFontPadding="false"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_14"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toRightOf="@+id/iv_bell"
+                        app:layout_constraintTop_toTopOf="parent"
+                        tools:text="网络教室升级公告" />
+
+                    <ImageView
+                        android:id="@+id/im_notice_list"
+                        android:layout_width="@dimen/dp_38"
+                        android:layout_height="@dimen/dp_38"
+                        android:layout_marginRight="@dimen/dp_1"
+                        android:padding="@dimen/dp_10"
+                        android:src="@drawable/icon_calendar_next_month"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
 
                 <androidx.constraintlayout.widget.ConstraintLayout
                     android:id="@+id/cl_live"
                     android:layout_width="match_parent"
                     android:layout_height="@dimen/dp_60"
                     android:layout_marginLeft="@dimen/dp_14"
-                    android:layout_marginTop="@dimen/dp_17"
+                    android:layout_marginTop="@dimen/dp_10"
                     android:layout_marginRight="@dimen/dp_14"
                     android:background="@drawable/bg_white_30dp"
                     android:visibility="gone">
@@ -194,57 +241,6 @@
                         app:layout_constraintTop_toTopOf="parent" />
                 </androidx.constraintlayout.widget.ConstraintLayout>
 
-
-                <androidx.constraintlayout.widget.ConstraintLayout
-                    android:visibility="gone"
-                    android:id="@+id/bg_announcement"
-                    android:layout_width="match_parent"
-                    android:layout_height="44dp"
-                    android:layout_marginStart="14dp"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginEnd="14dp"
-                    android:background="@drawable/bg_white_10dp"
-                    android:elevation="2dp"
-                    android:orientation="horizontal"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toBottomOf="@+id/cl_live">
-
-                    <ImageView
-                        android:id="@+id/iv_bell"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginLeft="10dp"
-                        android:src="@drawable/icon_home_bell"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
-
-                    <TextView
-                        android:id="@+id/tv_notice_content"
-                        android:layout_width="wrap_content"
-                        android:layout_height="match_parent"
-                        android:layout_marginStart="2dp"
-                        android:gravity="center"
-                        android:includeFontPadding="false"
-                        android:textColor="@color/color_1a1a1a"
-                        android:textSize="@dimen/sp_14"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toRightOf="@+id/iv_bell"
-                        app:layout_constraintTop_toTopOf="parent"
-                        tools:text="网络教室升级公告" />
-
-                    <ImageView
-                        android:id="@+id/im_notice_list"
-                        android:layout_width="@dimen/dp_38"
-                        android:layout_height="@dimen/dp_38"
-                        android:layout_marginRight="@dimen/dp_1"
-                        android:padding="@dimen/dp_10"
-                        android:src="@drawable/icon_calendar_next_month"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintTop_toTopOf="parent" />
-                </androidx.constraintlayout.widget.ConstraintLayout>
-
                 <androidx.constraintlayout.widget.ConstraintLayout
                     android:id="@+id/cl_hot_album"
                     android:layout_width="match_parent"

+ 2 - 1
teacher/src/main/java/com/cooleshow/teacher/adapter/MineLiveCourseAdapter.java

@@ -10,6 +10,7 @@ import com.chad.library.adapter.base.module.BaseLoadMoreModule;
 import com.chad.library.adapter.base.module.LoadMoreModule;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
 import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.MineLiveCourseListBean;
 
@@ -44,7 +45,7 @@ public class MineLiveCourseAdapter extends BaseQuickAdapter<MineLiveCourseListBe
         TextView tv_student_count=helper.getView(R.id.tv_student_count);
         tv_student_count.setText(item.studentCount+"人已购买");
         TextView tv_date=helper.getView(R.id.tv_date);
-        tv_date.setText(item.courseStartTime);
+        tv_date.setText(TimeUtils.date2String(TimeUtils.string2Date(item.courseStartTime),"yyyy-MM-dd HH:mm"));
         TextView tv_price=helper.getView(R.id.tv_price);
         tv_price.setText("¥"+item.coursePrice+"/"+item.courseNum+"课时");
         helper.setText(R.id.subject_name,item.subjectName);

+ 4 - 1
teacher/src/main/java/com/cooleshow/teacher/adapter/MineVideoCourseAdapter.java

@@ -32,12 +32,15 @@ public class MineVideoCourseAdapter extends BaseQuickAdapter<VideoCourseListBean
 
     @Override
     protected void convert(BaseViewHolder helper, VideoCourseListBean.RowsBean item) {
+        if(item == null){
+            return;
+        }
+        helper.setText(R.id.course_name,item.lessonSubjectName);
         ImageView im_pic = helper.getView(R.id.im_pic);
         GlideUtils.INSTANCE.loadImage(getContext(), item.lessonCoverUrl, im_pic);
         TextView tv_title=helper.getView(R.id.tv_title);
         tv_title.setText(item.lessonName);
         ImageView im_header=helper.getView(R.id.im_header);
-
         TextView  tv_teacher_name=helper.getView(R.id.tv_teacher_name);
         tv_teacher_name.setText(item.username);
 //        GlideUtils.INSTANCE.loadImage(getContext(), item.avatar, im_header,R.drawable.icon_teacher_default_head);

+ 0 - 2
teacher/src/main/java/com/cooleshow/teacher/presenter/homePage/SparringCoursePagePresenter.java

@@ -28,9 +28,7 @@ public class SparringCoursePagePresenter extends BasePresenter<SparringCoursePag
         TeacherPracticeCourseEntry entry = new TeacherPracticeCourseEntry();
         entry.page = page;
         entry.rows = Constants.DEFAULT_DATA_SIZE;
-        entry.classDate= currentData;
         entry.classMonth= currentData;
-        entry.endDate= currentData;
         addSubscribe(create(APIService.class).getSparringCourses(entry), new BaseObserver<SparringCourseListBean>(getView()) {
             @Override
             protected void onSuccess(SparringCourseListBean data) {

+ 0 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeFragment.kt

@@ -52,7 +52,6 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         mViewBinding.cardMineIncome.setOnClickListener(this)
         mViewBinding.ivChat.setOnClickListener(this)
         mViewBinding.bgAnnouncement.setOnClickListener(this)
-        mViewBinding.imNoticeList.setOnClickListener(this)
         mViewBinding.cardKotofusa.setOnClickListener(this)
     }
 

+ 2 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/score/MineScoreActivity.java

@@ -3,6 +3,7 @@ package com.cooleshow.teacher.ui.score;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.view.View;
 
 import androidx.annotation.NonNull;
@@ -62,7 +63,7 @@ public class MineScoreActivity extends BaseMVPActivity<ActivityMineScoreBinding,
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.tv_right:
-                if(musicianAuthStatus != TeacherInfoConstants.MUSICIAN_STATUS_PASS){
+                if(!TextUtils.equals(musicianAuthStatus, TeacherInfoConstants.MUSICIAN_STATUS_PASS)){
                     ToastUtil.getInstance().show(this,"您还没有上传曲谱");
                     return;
                 }

+ 14 - 0
teacher/src/main/res/layout/layout_mine_video_course_item.xml

@@ -23,6 +23,20 @@
             app:layout_constraintTop_toTopOf="parent"
             app:qmui_corner_radius="10dp" />
 
+         <TextView
+             android:id="@+id/course_name"
+             android:textColor="@color/white"
+             android:textSize="@dimen/sp_9"
+             android:gravity="center"
+             android:layout_marginLeft="@dimen/dp_5"
+             android:layout_marginTop="@dimen/dp_7"
+             android:background="@drawable/gray_1_radius_bg"
+             app:layout_constraintLeft_toLeftOf="@+id/im_pic"
+             app:layout_constraintTop_toTopOf="@+id/im_pic"
+             android:paddingRight="@dimen/dp_4"
+             android:paddingLeft="@dimen/dp_4"
+             android:layout_width="wrap_content"
+             android:layout_height="@dimen/dp_13"/>
         <TextView
             android:id="@+id/tv_title"
             android:layout_width="wrap_content"