Forráskód Böngészése

增加学生端我的课程页面

Pq 3 hónapja
szülő
commit
ead0804759
52 módosított fájl, 3961 hozzáadás és 1126 törlés
  1. 6 0
      student/src/main/java/com/cooleshow/student/adapter/LiveCourseAppointAdapter.java
  2. 22 5
      student/src/main/java/com/cooleshow/student/adapter/LiveCourseListAdapter.java
  3. 53 0
      student/src/main/java/com/cooleshow/student/adapter/PianoCourseGroupAdapter.java
  4. 55 0
      student/src/main/java/com/cooleshow/student/adapter/VIPCourseAdapter.java
  5. 1 1
      student/src/main/java/com/cooleshow/student/adapter/VideoCourseAppointAdapter.java
  6. 27 28
      student/src/main/java/com/cooleshow/student/adapter/VideoCourseListAdapter.java
  7. 9 0
      student/src/main/java/com/cooleshow/student/api/APIService.java
  8. 52 0
      student/src/main/java/com/cooleshow/student/bean/LiveCourseListBean.java
  9. 22 8
      student/src/main/java/com/cooleshow/student/bean/QuerySubjectBean.java
  10. 24 0
      student/src/main/java/com/cooleshow/student/bean/SelectMyGroupBean.java
  11. 192 0
      student/src/main/java/com/cooleshow/student/bean/VIPCourseGroupListBean.java
  12. 9 0
      student/src/main/java/com/cooleshow/student/bean/VideoCourseListBean.java
  13. 21 0
      student/src/main/java/com/cooleshow/student/contract/InterestCourseGroupContract.java
  14. 0 1
      student/src/main/java/com/cooleshow/student/contract/LiveCourseContract.java
  15. 1 1
      student/src/main/java/com/cooleshow/student/contract/MinePracticeCourseContract.java
  16. 21 0
      student/src/main/java/com/cooleshow/student/contract/PianoCourseGroupContract.java
  17. 1 1
      student/src/main/java/com/cooleshow/student/contract/PianoRoomCourseContract.java
  18. 0 1
      student/src/main/java/com/cooleshow/student/contract/VideoCourseContract.java
  19. 21 0
      student/src/main/java/com/cooleshow/student/contract/VipCourseGroupContract.java
  20. 58 0
      student/src/main/java/com/cooleshow/student/presenter/course/InterestCourseGroupPresenter.java
  21. 4 5
      student/src/main/java/com/cooleshow/student/presenter/course/LiveCoursePresenter.java
  22. 4 2
      student/src/main/java/com/cooleshow/student/presenter/course/MinePracticeCoursePresenter.java
  23. 58 0
      student/src/main/java/com/cooleshow/student/presenter/course/PianoCourseGroupPresenter.java
  24. 4 2
      student/src/main/java/com/cooleshow/student/presenter/course/PianoRoomCoursePresenter.java
  25. 5 3
      student/src/main/java/com/cooleshow/student/presenter/course/VideoCoursePresenter.java
  26. 58 0
      student/src/main/java/com/cooleshow/student/presenter/course/VipCourseGroupPresenter.java
  27. 249 0
      student/src/main/java/com/cooleshow/student/ui/course/InterestCourseGroupFragment.java
  28. 387 387
      student/src/main/java/com/cooleshow/student/ui/course/LiveCourseFragment.java
  29. 287 0
      student/src/main/java/com/cooleshow/student/ui/course/LiveCourseGroupFragment.java
  30. 88 18
      student/src/main/java/com/cooleshow/student/ui/course/MineCourseActivity.java
  31. 4 4
      student/src/main/java/com/cooleshow/student/ui/course/MinePracticeCourseFragment.java
  32. 249 0
      student/src/main/java/com/cooleshow/student/ui/course/PianoCourseGroupFragment.java
  33. 3 3
      student/src/main/java/com/cooleshow/student/ui/course/PianoRoomCourseFragment.java
  34. 249 0
      student/src/main/java/com/cooleshow/student/ui/course/VIPCourseGroupFragment.java
  35. 300 300
      student/src/main/java/com/cooleshow/student/ui/course/VideoCourseFragment.java
  36. 262 0
      student/src/main/java/com/cooleshow/student/ui/course/VideoCourseGroupFragment.java
  37. BIN
      student/src/main/res/drawable-xhdpi/icon_piano_room_course.png
  38. BIN
      student/src/main/res/drawable-xhdpi/icon_question_mark.png
  39. BIN
      student/src/main/res/drawable-xxhdpi/icon_piano_room_course.png
  40. BIN
      student/src/main/res/drawable-xxhdpi/icon_question_mark.png
  41. 48 30
      student/src/main/res/layout/activity_mine_course.xml
  42. 112 0
      student/src/main/res/layout/fg_interest_course_layout.xml
  43. 112 0
      student/src/main/res/layout/fg_piano_course_group_layout.xml
  44. 112 0
      student/src/main/res/layout/fg_vip_course_layout.xml
  45. 75 83
      student/src/main/res/layout/fragment_live_course_layout.xml
  46. 80 42
      student/src/main/res/layout/fragment_video_course_layout.xml
  47. 42 4
      student/src/main/res/layout/item_live_course_appoint_layout.xml
  48. 149 103
      student/src/main/res/layout/item_live_course_list_layout.xml
  49. 155 0
      student/src/main/res/layout/item_piano_course_group_layout.xml
  50. 97 94
      student/src/main/res/layout/item_video_course_list_layout.xml
  51. 154 0
      student/src/main/res/layout/item_vip_course_layout.xml
  52. 19 0
      student/src/main/res/layout/view_mine_course_tab_layout.xml

+ 6 - 0
student/src/main/java/com/cooleshow/student/adapter/LiveCourseAppointAdapter.java

@@ -43,5 +43,11 @@ public class LiveCourseAppointAdapter extends BaseQuickAdapter<LiveCourseAppoint
         TextView tv_price_unit = holder.getView(R.id.tv_price_unit);
         tv_price.setText(UiUtils.getLiveCoursePriceText(data.getCoursePrice(), data.getCourseNum()));
         tv_price_unit.setText(String.format("/%d课时", data.getCourseNum()));
+
+        //老师头像昵称
+        ImageView iv_avatar=holder.getView(R.id.iv_avatar);
+        GlideUtils.INSTANCE.loadImage(getContext(),data.getAvatar(),iv_avatar,R.drawable.icon_teacher_default_head);
+        TextView tv_teacher_name = holder.getView(R.id.tv_teacher_name);
+        tv_teacher_name.setText(data.getTeacherName());
     }
 }

+ 22 - 5
student/src/main/java/com/cooleshow/student/adapter/LiveCourseListAdapter.java

@@ -24,8 +24,8 @@ import java.util.Date;
  */
 public class LiveCourseListAdapter extends BaseQuickAdapter<LiveCourseListBean.RowsBean, BaseViewHolder> implements LoadMoreModule {
 
-    public LiveCourseListAdapter(int layoutResId) {
-        super(layoutResId);
+    public LiveCourseListAdapter() {
+        super(R.layout.item_live_course_list_layout);
         addChildClickViewIds(R.id.iv_chat);
     }
 
@@ -44,11 +44,17 @@ public class LiveCourseListAdapter extends BaseQuickAdapter<LiveCourseListBean.R
         //购买人数
         holder.setText(R.id.tv_buy_num, data.payCount + "人");
         //头像
-        ImageView iv_avatar = holder.getView(R.id.iv_bg);
-        GlideUtils.INSTANCE.loadImage(getContext(), data.cover, iv_avatar, com.cooleshow.base.R.drawable.bg_video_placeholder);
+        ImageView iv_bg = holder.getView(R.id.iv_bg);
+        GlideUtils.INSTANCE.loadImage(getContext(), data.cover, iv_bg, com.cooleshow.base.R.drawable.bg_video_placeholder);
+        //老师名称
+        String courseIntroduce = data.getCourseIntroduce();
+        if (TextUtils.isEmpty(courseIntroduce)) {
+            courseIntroduce = "暂无介绍";
+        }
+        holder.setText(R.id.tv_des, courseIntroduce);
 
-        TextView tvCourseStatusBt = holder.getView(R.id.tv_course_status);
 
+        TextView tvCourseStatusBt = holder.getView(R.id.tv_course_status);
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, data.status)) {
             //未开始
             holder.setText(R.id.tv_course_status, "未开始");
@@ -66,6 +72,17 @@ public class LiveCourseListAdapter extends BaseQuickAdapter<LiveCourseListBean.R
             holder.setText(R.id.tv_course_status, "已结束");
             tvCourseStatusBt.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
         }
+
+        //已上课时
+        holder.setText(R.id.tv_course_completed_value, data.getCompleteCourseNum());
+        //总课时
+        holder.setText(R.id.tv_course_total_value, data.getCourseNum());
+
+        //老师头像昵称
+        ImageView iv_avatar=holder.getView(R.id.iv_avatar);
+        GlideUtils.INSTANCE.loadImage(getContext(),data.getAvatar(),iv_avatar,R.drawable.icon_teacher_default_head);
+        TextView tv_teacher_name = holder.getView(R.id.tv_teacher_name);
+        tv_teacher_name.setText(data.getTeacherName());
     }
 
     @NonNull

+ 53 - 0
student/src/main/java/com/cooleshow/student/adapter/PianoCourseGroupAdapter.java

@@ -0,0 +1,53 @@
+package com.cooleshow.student.adapter;
+
+import android.text.TextUtils;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.constanst.CourseGroupStatusType;
+import com.cooleshow.student.R;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+
+import androidx.annotation.NonNull;
+
+/**
+ * Author by pq, Date on 2024/11/20.
+ */
+public class PianoCourseGroupAdapter extends BaseQuickAdapter<VIPCourseGroupListBean.RowsBean, BaseViewHolder> {
+    public PianoCourseGroupAdapter() {
+        super(R.layout.item_piano_course_group_layout);
+    }
+
+    @Override
+    protected void convert(@NonNull BaseViewHolder holder, VIPCourseGroupListBean.RowsBean bean) {
+        ImageView iv_avatar = holder.getView(R.id.iv_avatar);
+
+        holder.setText(R.id.tv_title, bean.getCourseGroupName());
+        holder.setText(R.id.tv_name, bean.getStudentName());
+        holder.setText(R.id.tv_course_completed_value, bean.getCompleteCourseNum());
+        holder.setText(R.id.tv_course_total_value, bean.getCourseNum());
+        holder.setText(R.id.tv_course_name, bean.getSubjectName());
+
+        TextView tv_status = holder.getView(R.id.tv_status);
+        String status = bean.getStatus();
+        if (TextUtils.equals(status, CourseGroupStatusType.ING.getId())) {
+            //进行中
+            tv_status.setText(CourseGroupStatusType.ING.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+        } else if (TextUtils.equals(status, CourseGroupStatusType.NOT_START.getId())) {
+            //未开始
+            tv_status.setText(CourseGroupStatusType.NOT_START.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
+        } else if (TextUtils.equals(status, CourseGroupStatusType.COMPLETE.getId())) {
+            //已结课
+            tv_status.setText(CourseGroupStatusType.COMPLETE.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
+        } else if (TextUtils.equals(status, CourseGroupStatusType.CANCEL.getId())) {
+            //已取消
+            tv_status.setText(CourseGroupStatusType.CANCEL.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
+        }
+    }
+}

+ 55 - 0
student/src/main/java/com/cooleshow/student/adapter/VIPCourseAdapter.java

@@ -0,0 +1,55 @@
+package com.cooleshow.student.adapter;
+
+import android.text.TextUtils;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.constanst.CourseGroupStatusType;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.student.R;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+
+import androidx.annotation.NonNull;
+
+/**
+ * Author by pq, Date on 2024/11/20.
+ */
+public class VIPCourseAdapter extends BaseQuickAdapter<VIPCourseGroupListBean.RowsBean, BaseViewHolder> {
+    public VIPCourseAdapter() {
+        super(R.layout.item_vip_course_layout);
+    }
+
+    @Override
+    protected void convert(@NonNull BaseViewHolder holder, VIPCourseGroupListBean.RowsBean bean) {
+        ImageView iv_avatar = holder.getView(R.id.iv_avatar);
+        GlideUtils.INSTANCE.loadImage(getContext(), bean.getStudentAvatar(), iv_avatar, R.drawable.icon_teacher_default_head);
+
+        holder.setText(R.id.tv_title, bean.getCourseGroupName());
+        holder.setText(R.id.tv_name, bean.getStudentName());
+        holder.setText(R.id.tv_course_completed_value, bean.getCompleteCourseNum());
+        holder.setText(R.id.tv_course_total_value, bean.getCourseNum());
+        holder.setText(R.id.tv_course_name, bean.getSubjectName());
+
+        TextView tv_status = holder.getView(R.id.tv_status);
+        String status = bean.getStatus();
+        if (TextUtils.equals(status, CourseGroupStatusType.ING.getId())) {
+            //进行中
+            tv_status.setText(CourseGroupStatusType.ING.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+        } else if (TextUtils.equals(status, CourseGroupStatusType.NOT_START.getId())) {
+            //未开始
+            tv_status.setText(CourseGroupStatusType.NOT_START.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
+        } else if (TextUtils.equals(status, CourseGroupStatusType.COMPLETE.getId())) {
+            //已结课
+            tv_status.setText(CourseGroupStatusType.COMPLETE.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
+        } else if (TextUtils.equals(status, CourseGroupStatusType.CANCEL.getId())) {
+            //已取消
+            tv_status.setText(CourseGroupStatusType.CANCEL.getValue());
+            tv_status.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
+        }
+    }
+}

+ 1 - 1
student/src/main/java/com/cooleshow/student/adapter/VideoCourseAppointAdapter.java

@@ -63,6 +63,6 @@ public class VideoCourseAppointAdapter extends BaseQuickAdapter<VideoCourseListB
         ImageView iv_avatar=helper.getView(R.id.iv_avatar);
         GlideUtils.INSTANCE.loadImage(getContext(),item.getAvatar(),iv_avatar,R.drawable.icon_teacher_default_head);
         TextView tv_teacher_name = helper.getView(R.id.tv_teacher_name);
-        tv_teacher_name.setText(item.getUserName());
+        tv_teacher_name.setText(item.getTeacherName());
     }
 }

+ 27 - 28
student/src/main/java/com/cooleshow/student/adapter/VideoCourseListAdapter.java

@@ -23,8 +23,8 @@ import com.cooleshow.student.bean.VideoCourseListBean;
  */
 public class VideoCourseListAdapter extends BaseQuickAdapter<SelectMyGroupBean.RowsBean, BaseViewHolder> implements LoadMoreModule {
 
-    public VideoCourseListAdapter(int layoutResId) {
-        super(layoutResId);
+    public VideoCourseListAdapter() {
+        super(R.layout.item_video_course_list_layout);
     }
 
     @Override
@@ -35,38 +35,37 @@ public class VideoCourseListAdapter extends BaseQuickAdapter<SelectMyGroupBean.R
         //title
         holder.setText(R.id.tv_title, data.lessonName);
         //头像
-        ImageView cir_avatar = holder.getView(R.id.cir_avatar);
+        ImageView cir_avatar = holder.getView(R.id.iv_avatar);
         GlideUtils.INSTANCE.loadImage(getContext(), data.avatar, cir_avatar, R.drawable.icon_teacher_default_head);
         //老师名称
-        holder.setText(R.id.tv_author_name, data.userName);
+        holder.setText(R.id.tv_teacher_name, data.userName);
         //声部
         holder.setText(R.id.course_name, data.lessonSubjectName);
 
-        //¥120/4课时
-        TextView tv_price = holder.getView(R.id.tv_price);
-        TextView tv_price_symbol = holder.getView(R.id.tv_price_symbol);
-        boolean isVipType = TextUtils.equals(data.payType, VideoCoursePayType.VIP.getId());
-        if (isVipType) {
-            tv_price.setText("会员");
-            tv_price_symbol.setVisibility(View.GONE);
-            tv_price.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_c76e21));
-        } else {
-            //收费
-            tv_price.setText(UiUtils.getVideoCoursePriceText2(data.lessonPrice));
-            if (UiUtils.isFree(data.lessonPrice)) {
-                tv_price_symbol.setVisibility(View.GONE);
-                tv_price.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_20bea0));
-            } else {
-                tv_price_symbol.setVisibility(View.VISIBLE);
-                tv_price.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff0000));
-            }
-        }
+//        //¥120/4课时
+//        TextView tv_price = holder.getView(R.id.tv_price);
+//        TextView tv_price_symbol = holder.getView(R.id.tv_price_symbol);
+//        boolean isVipType = TextUtils.equals(data.payType, VideoCoursePayType.VIP.getId());
+//        if (isVipType) {
+//            tv_price.setText("会员");
+//            tv_price_symbol.setVisibility(View.GONE);
+//            tv_price.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_c76e21));
+//        } else {
+//            //收费
+//            tv_price.setText(UiUtils.getVideoCoursePriceText2(data.lessonPrice));
+//            if (UiUtils.isFree(data.lessonPrice)) {
+//                tv_price_symbol.setVisibility(View.GONE);
+//                tv_price.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_20bea0));
+//            } else {
+//                tv_price_symbol.setVisibility(View.VISIBLE);
+//                tv_price.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff0000));
+//            }
+//        }
         TextView tv_price_unit = holder.getView(R.id.tv_price_unit);
-        tv_price_unit.setText(String.format("/%d课时", data.lessonCount));
-
-        TextView tv_buy_num = holder.getView(R.id.tv_buy_num);
-        //购买人数
-        tv_buy_num.setText(UiUtils.getBuyNumTip2(data.lessonPrice, data.countStudent));
+        tv_price_unit.setText(String.format("%d课时", data.getLessonCount()));
+        TextView tv_music_num = holder.getView(R.id.tv_music_num);
+        tv_music_num.setText(data.getMusicNum() + "首曲目");
+        tv_music_num.setVisibility(data.getMusicNum() > 0 ? View.VISIBLE : View.GONE);
     }
 
     @NonNull

+ 9 - 0
student/src/main/java/com/cooleshow/student/api/APIService.java

@@ -40,6 +40,7 @@ import com.cooleshow.student.bean.SparringCourseCommentBean;
 import com.cooleshow.student.bean.SparringCourseHomeworkBean;
 import com.cooleshow.student.bean.SystemMessageBean;
 import com.cooleshow.student.bean.TempLiveTeacherListBean;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
 import com.cooleshow.student.bean.VideoCourseListBean;
 import com.cooleshow.student.bean.request.LiveCourseEntry;
 import com.cooleshow.usercenter.bean.SetDetailBean;
@@ -568,4 +569,12 @@ public interface APIService {
      */
     @POST(STUDENT_GROUP + "courseGroup/queryPageCourseGroup")
     Observable<BaseResponse<LiveCourseAppointListBean>> queryPageCourseGroup(@Body LiveCourseEntry body);
+
+    /**
+     *
+     *获取VIP课程组或者趣纠课课程组
+     * @return
+     */
+    @POST(STUDENT_GROUP + "courseGroup/myCourseGroup")
+    Observable<BaseResponse<VIPCourseGroupListBean>> getCourseGroup(@Body RequestBody body);
 }

+ 52 - 0
student/src/main/java/com/cooleshow/student/bean/LiveCourseListBean.java

@@ -31,6 +31,14 @@ public class LiveCourseListBean {
     public List<FooterBean> footer;
     public List<RowsBean> rows;
 
+    public List<RowsBean> getRows() {
+        return rows;
+    }
+
+    public void setRows(List<RowsBean> rows) {
+        this.rows = rows;
+    }
+
     public static class StatInfoBean {
     }
 
@@ -94,5 +102,49 @@ public class LiveCourseListBean {
         public String payCount;
         public String name;
         public String realName;
+        public String courseIntroduce;
+        public String courseNum;
+        public String completeCourseNum;
+        public String teacherName;
+
+        public String getTeacherName() {
+            return teacherName;
+        }
+
+        public void setTeacherName(String teacherName) {
+            this.teacherName = teacherName;
+        }
+
+        public String getAvatar() {
+            return avatar;
+        }
+
+        public void setAvatar(String avatar) {
+            this.avatar = avatar;
+        }
+
+        public String getCourseIntroduce() {
+            return courseIntroduce;
+        }
+
+        public void setCourseIntroduce(String courseIntroduce) {
+            this.courseIntroduce = courseIntroduce;
+        }
+
+        public String getCourseNum() {
+            return courseNum;
+        }
+
+        public void setCourseNum(String courseNum) {
+            this.courseNum = courseNum;
+        }
+
+        public String getCompleteCourseNum() {
+            return completeCourseNum;
+        }
+
+        public void setCompleteCourseNum(String completeCourseNum) {
+            this.completeCourseNum = completeCourseNum;
+        }
     }
 }

+ 22 - 8
student/src/main/java/com/cooleshow/student/bean/QuerySubjectBean.java

@@ -1,6 +1,8 @@
 package com.cooleshow.student.bean;
 
 import com.contrarywind.interfaces.IPickerViewData;
+import com.cooleshow.base.iml.ICommonFilterData;
+import com.cooleshow.base.interfaces.IFilterViewData;
 
 import java.util.List;
 
@@ -10,7 +12,7 @@ import java.util.List;
  * @author Ryan
  * 类说明:
  */
-public class QuerySubjectBean implements IPickerViewData {
+public class QuerySubjectBean implements IPickerViewData, IFilterViewData, ICommonFilterData {
     /*
     	"code": "",
 			"createTime": "",
@@ -41,7 +43,7 @@ public class QuerySubjectBean implements IPickerViewData {
 			"updateTime": ""
      */
 
-    public QuerySubjectBean(String name,int id) {
+    public QuerySubjectBean(String name, String id) {
         this.id = id;
         this.name = name;
     }
@@ -50,24 +52,36 @@ public class QuerySubjectBean implements IPickerViewData {
     public String createTime;
     public boolean delFlag;
     public String desc;
-    public int id;
+    public String id;
     public String img;
     public String name;
-    public int parentSubjectId;
+    public String parentSubjectId;
     public String parentSubjectName;
     public List<QuerySubjectBean> subjects;
     public String updateTime;
 
-    public String getId() {
+    @Override
+    public String getPickerViewText() {
+        return name;
+    }
+
+    @Override
+    public String getDataId() {
         return String.valueOf(id);
     }
 
-    public void setId(int id) {
-        this.id = id;
+    @Override
+    public String getShowName() {
+        return name;
     }
 
     @Override
-    public String getPickerViewText() {
+    public String getText() {
         return name;
     }
+
+    @Override
+    public String getFilterId() {
+        return String.valueOf(id);
+    }
 }

+ 24 - 0
student/src/main/java/com/cooleshow/student/bean/SelectMyGroupBean.java

@@ -18,6 +18,14 @@ public class SelectMyGroupBean {
     public int totalPage;
     public List<RowsBean> rows;
 
+    public List<RowsBean> getRows() {
+        return rows;
+    }
+
+    public void setRows(List<RowsBean> rows) {
+        this.rows = rows;
+    }
+
     public static class RowsBean {
         public String avatar;
         public String countStudent;
@@ -32,9 +40,25 @@ public class SelectMyGroupBean {
         public String realName;
         public int teacherId;
         public String userName;
+        public int musicNum;
 
         public String payType;
 
+        public int getLessonCount() {
+            return lessonCount;
+        }
+
+        public void setLessonCount(int lessonCount) {
+            this.lessonCount = lessonCount;
+        }
+
+        public int getMusicNum() {
+            return musicNum;
+        }
+
+        public void setMusicNum(int musicNum) {
+            this.musicNum = musicNum;
+        }
     }
 
 }

+ 192 - 0
student/src/main/java/com/cooleshow/student/bean/VIPCourseGroupListBean.java

@@ -0,0 +1,192 @@
+package com.cooleshow.student.bean;
+
+import java.util.List;
+
+/**
+ * Author by pq, Date on 2024/11/20.
+ */
+public class VIPCourseGroupListBean {
+
+    /**
+     * footer : [{"completeCourseNum":0,"courseGroupId":0,"courseGroupName":"","courseNum":0,"status":"","studentAvatar":"","studentName":"","subjectId":0,"subjectName":""}]
+     * limit : 0
+     * nextPage : 0
+     * offset : 0
+     * pageNo : 0
+     * prePage : 0
+     * rows : [{"completeCourseNum":0,"courseGroupId":0,"courseGroupName":"","courseNum":0,"status":"","studentAvatar":"","studentName":"","subjectId":0,"subjectName":""}]
+     * statInfo : {}
+     * total : 0
+     * totalPage : 0
+     */
+
+    private int limit;
+    private int nextPage;
+    private int offset;
+    private int pageNo;
+    private int prePage;
+    private int total;
+    private int totalPage;
+    private List<RowsBean> rows;
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+
+    public int getNextPage() {
+        return nextPage;
+    }
+
+    public void setNextPage(int nextPage) {
+        this.nextPage = nextPage;
+    }
+
+    public int getOffset() {
+        return offset;
+    }
+
+    public void setOffset(int offset) {
+        this.offset = offset;
+    }
+
+    public int getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(int pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public int getPrePage() {
+        return prePage;
+    }
+
+    public void setPrePage(int prePage) {
+        this.prePage = prePage;
+    }
+
+    public int getTotal() {
+        return total;
+    }
+
+    public void setTotal(int total) {
+        this.total = total;
+    }
+
+    public int getTotalPage() {
+        return totalPage;
+    }
+
+    public void setTotalPage(int totalPage) {
+        this.totalPage = totalPage;
+    }
+
+    public List<RowsBean> getRows() {
+        return rows;
+    }
+
+    public void setRows(List<RowsBean> rows) {
+        this.rows = rows;
+    }
+
+
+    public static class RowsBean {
+        /**
+         * completeCourseNum : 0
+         * courseGroupId : 0
+         * courseGroupName :
+         * courseNum : 0
+         * status :
+         * studentAvatar :
+         * studentName :
+         * subjectId : 0
+         * subjectName :
+         */
+
+        private String completeCourseNum;
+        private String courseGroupId;
+        private String courseGroupName;
+        private String courseNum;
+        private String status;
+        private String studentAvatar;
+        private String studentName;
+        private String subjectId;
+        private String subjectName;
+
+        public String getCompleteCourseNum() {
+            return completeCourseNum;
+        }
+
+        public void setCompleteCourseNum(String completeCourseNum) {
+            this.completeCourseNum = completeCourseNum;
+        }
+
+        public String getCourseGroupId() {
+            return courseGroupId;
+        }
+
+        public void setCourseGroupId(String courseGroupId) {
+            this.courseGroupId = courseGroupId;
+        }
+
+        public String getCourseGroupName() {
+            return courseGroupName;
+        }
+
+        public void setCourseGroupName(String courseGroupName) {
+            this.courseGroupName = courseGroupName;
+        }
+
+        public String getCourseNum() {
+            return courseNum;
+        }
+
+        public void setCourseNum(String courseNum) {
+            this.courseNum = courseNum;
+        }
+
+        public String getStatus() {
+            return status;
+        }
+
+        public void setStatus(String status) {
+            this.status = status;
+        }
+
+        public String getStudentAvatar() {
+            return studentAvatar;
+        }
+
+        public void setStudentAvatar(String studentAvatar) {
+            this.studentAvatar = studentAvatar;
+        }
+
+        public String getStudentName() {
+            return studentName;
+        }
+
+        public void setStudentName(String studentName) {
+            this.studentName = studentName;
+        }
+
+        public String getSubjectId() {
+            return subjectId;
+        }
+
+        public void setSubjectId(String subjectId) {
+            this.subjectId = subjectId;
+        }
+
+        public String getSubjectName() {
+            return subjectName;
+        }
+
+        public void setSubjectName(String subjectName) {
+            this.subjectName = subjectName;
+        }
+    }
+}

+ 9 - 0
student/src/main/java/com/cooleshow/student/bean/VideoCourseListBean.java

@@ -54,10 +54,19 @@ public class VideoCourseListBean {
         private String realName;
         private String relationType;
         private String teacherId;
+        private String teacherName;
         private String userName;
         private int virtualNumber;
         public int musicNum;
 
+        public String getTeacherName() {
+            return teacherName;
+        }
+
+        public void setTeacherName(String teacherName) {
+            this.teacherName = teacherName;
+        }
+
         public int getAuditVersion() {
             return auditVersion;
         }

+ 21 - 0
student/src/main/java/com/cooleshow/student/contract/InterestCourseGroupContract.java

@@ -0,0 +1,21 @@
+package com.cooleshow.student.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+
+/**
+ * Author by pq, Date on 2022/4/20.
+ */
+public interface InterestCourseGroupContract {
+
+    interface View extends BaseView {
+        void onGetCourseGroupSuccess(int page, VIPCourseGroupListBean data);
+
+        void onGetCourseGroupError(int page);
+
+
+    }
+
+    interface Presenter {
+    }
+}

+ 0 - 1
student/src/main/java/com/cooleshow/student/contract/LiveCourseContract.java

@@ -19,6 +19,5 @@ public interface LiveCourseContract {
     }
 
     interface Presenter {
-        void queryLiveCourse(boolean isShowLoading, String month, String status, int subjectId, int page);
     }
 }

+ 1 - 1
student/src/main/java/com/cooleshow/student/contract/MinePracticeCourseContract.java

@@ -20,6 +20,6 @@ public interface MinePracticeCourseContract {
     }
 
     interface Presenter {
-        void queryPracticeCourse(boolean isShowLoading, String month, String status, int subjectId, int page);
+        void queryPracticeCourse(boolean isShowLoading, String month, String status, String subjectId, int page);
     }
 }

+ 21 - 0
student/src/main/java/com/cooleshow/student/contract/PianoCourseGroupContract.java

@@ -0,0 +1,21 @@
+package com.cooleshow.student.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+
+/**
+ * Author by pq, Date on 2022/4/20.
+ */
+public interface PianoCourseGroupContract {
+
+    interface View extends BaseView {
+        void onGetCourseGroupSuccess(int page, VIPCourseGroupListBean data);
+
+        void onGetCourseGroupError(int page);
+
+
+    }
+
+    interface Presenter {
+    }
+}

+ 1 - 1
student/src/main/java/com/cooleshow/student/contract/PianoRoomCourseContract.java

@@ -14,6 +14,6 @@ public interface PianoRoomCourseContract {
     }
 
     interface Presenter {
-        void queryPianoRoomCourseList(boolean isShowLoading,String month, String status, int subjectId,int page);
+        void queryPianoRoomCourseList(boolean isShowLoading,String month, String status, String subjectId,int page);
     }
 }

+ 0 - 1
student/src/main/java/com/cooleshow/student/contract/VideoCourseContract.java

@@ -20,6 +20,5 @@ public interface VideoCourseContract {
     }
 
     interface Presenter {
-        void queryVideoCourse(boolean isShowLoading, String studentId,int subjectId, int page);
     }
 }

+ 21 - 0
student/src/main/java/com/cooleshow/student/contract/VipCourseGroupContract.java

@@ -0,0 +1,21 @@
+package com.cooleshow.student.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+
+/**
+ * Author by pq, Date on 2022/4/20.
+ */
+public interface VipCourseGroupContract {
+
+    interface View extends BaseView {
+        void onGetCourseGroupSuccess(int page, VIPCourseGroupListBean data);
+
+        void onGetCourseGroupError(int page);
+
+
+    }
+
+    interface Presenter {
+    }
+}

+ 58 - 0
student/src/main/java/com/cooleshow/student/presenter/course/InterestCourseGroupPresenter.java

@@ -0,0 +1,58 @@
+package com.cooleshow.student.presenter.course;
+
+import android.text.TextUtils;
+
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.student.api.APIService;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+import com.cooleshow.student.contract.InterestCourseGroupContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * 陪练课presenter
+ * Author by pq, Date on 2022/4/20.
+ */
+public class InterestCourseGroupPresenter extends BasePresenter<InterestCourseGroupContract.View> implements InterestCourseGroupContract.Presenter {
+
+    public void queryInterestCourseGroup(boolean isShowLoading, String status, String subjectId, String search, int page) {
+        if (isShowLoading && getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            if (!TextUtils.isEmpty(status)) {
+                jsonObject.putOpt("status", status);
+            }
+            if (!TextUtils.isEmpty(subjectId)) {
+                jsonObject.putOpt("subjectId", subjectId);
+            }
+            jsonObject.putOpt("search", search);
+            jsonObject.putOpt("courseType", Constants.INTEREST_COURSE_TAG);
+            jsonObject.putOpt("page", page);
+            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(APIService.class).getCourseGroup(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<VIPCourseGroupListBean>(getView()) {
+            @Override
+            protected void onSuccess(VIPCourseGroupListBean data) {
+                if (getView() != null) {
+                    getView().onGetCourseGroupSuccess(page, data);
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (getView() != null) {
+                    getView().onGetCourseGroupError(page);
+                }
+            }
+        });
+    }
+}

+ 4 - 5
student/src/main/java/com/cooleshow/student/presenter/course/LiveCoursePresenter.java

@@ -24,20 +24,19 @@ import java.util.List;
  */
 public class LiveCoursePresenter extends BasePresenter<LiveCourseContract.LiveCourseView> implements LiveCourseContract.Presenter {
 
-    @Override
-    public void queryLiveCourse(boolean isShowLoading, String month, String status, int subjectId, int page) {
+    public void queryLiveCourse(boolean isShowLoading, String status, String subjectId, String search, int page) {
         if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();
         try {
-            jsonObject.putOpt("classDate", month);
-            if(!TextUtils.isEmpty(status)){
+            if (!TextUtils.isEmpty(status)) {
                 jsonObject.putOpt("courseState", status);
             }
-            if (subjectId != 0) {
+            if (TextUtils.isEmpty(subjectId)) {
                 jsonObject.putOpt("subjectId", subjectId);
             }
+            jsonObject.putOpt("search", search);
             jsonObject.putOpt("page", page);
             jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
             jsonObject.putOpt("studentId", UserHelper.getUserId());

+ 4 - 2
student/src/main/java/com/cooleshow/student/presenter/course/MinePracticeCoursePresenter.java

@@ -1,5 +1,7 @@
 package com.cooleshow.student.presenter.course;
 
+import android.text.TextUtils;
+
 import com.cooleshow.base.constanst.Constants;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
@@ -23,7 +25,7 @@ import java.util.List;
 public class MinePracticeCoursePresenter extends BasePresenter<MinePracticeCourseContract.MinePracticeCourseView> implements MinePracticeCourseContract.Presenter {
 
     @Override
-    public void queryPracticeCourse(boolean isShowLoading, String month, String status, int subjectId, int page) {
+    public void queryPracticeCourse(boolean isShowLoading, String month, String status, String subjectId, int page) {
         if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
@@ -31,7 +33,7 @@ public class MinePracticeCoursePresenter extends BasePresenter<MinePracticeCours
         try {
             jsonObject.putOpt("classMonth", month);
             jsonObject.putOpt("status", status);
-            if (subjectId != 0) {
+            if (!TextUtils.isEmpty(subjectId)) {
                 jsonObject.putOpt("subjectId", subjectId);
             }
             jsonObject.putOpt("page", page);

+ 58 - 0
student/src/main/java/com/cooleshow/student/presenter/course/PianoCourseGroupPresenter.java

@@ -0,0 +1,58 @@
+package com.cooleshow.student.presenter.course;
+
+import android.text.TextUtils;
+
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.student.api.APIService;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+import com.cooleshow.student.contract.PianoCourseGroupContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * 陪练课presenter
+ * Author by pq, Date on 2022/4/20.
+ */
+public class PianoCourseGroupPresenter extends BasePresenter<PianoCourseGroupContract.View> implements PianoCourseGroupContract.Presenter {
+
+    public void queryInterestCourseGroup(boolean isShowLoading, String status, String subjectId, String search, int page) {
+        if (isShowLoading && getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            if (!TextUtils.isEmpty(status)) {
+                jsonObject.putOpt("status", status);
+            }
+            if (!TextUtils.isEmpty(subjectId)) {
+                jsonObject.putOpt("subjectId", subjectId);
+            }
+            jsonObject.putOpt("search", search);
+            jsonObject.putOpt("courseType", Constants.PIANO_COURSE_TAG);
+            jsonObject.putOpt("page", page);
+            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(APIService.class).getCourseGroup(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<VIPCourseGroupListBean>(getView()) {
+            @Override
+            protected void onSuccess(VIPCourseGroupListBean data) {
+                if (getView() != null) {
+                    getView().onGetCourseGroupSuccess(page, data);
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (getView() != null) {
+                    getView().onGetCourseGroupError(page);
+                }
+            }
+        });
+    }
+}

+ 4 - 2
student/src/main/java/com/cooleshow/student/presenter/course/PianoRoomCoursePresenter.java

@@ -1,5 +1,7 @@
 package com.cooleshow.student.presenter.course;
 
+import android.text.TextUtils;
+
 import com.cooleshow.base.constanst.Constants;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
@@ -19,7 +21,7 @@ import org.json.JSONObject;
 public class PianoRoomCoursePresenter extends BasePresenter<PianoRoomCourseContract.PianoRoomCourseView> implements PianoRoomCourseContract.Presenter {
 
     @Override
-    public void queryPianoRoomCourseList(boolean isShowLoading, String month, String status, int subjectId, int page) {
+    public void queryPianoRoomCourseList(boolean isShowLoading, String month, String status, String subjectId, int page) {
         if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
@@ -27,7 +29,7 @@ public class PianoRoomCoursePresenter extends BasePresenter<PianoRoomCourseContr
         try {
             jsonObject.putOpt("classMonth", month);
             jsonObject.putOpt("status", status);
-            if (subjectId != 0) {
+            if (!TextUtils.isEmpty(subjectId)) {
                 jsonObject.putOpt("subjectId", subjectId);
             }
             jsonObject.putOpt("page", page);

+ 5 - 3
student/src/main/java/com/cooleshow/student/presenter/course/VideoCoursePresenter.java

@@ -1,5 +1,7 @@
 package com.cooleshow.student.presenter.course;
 
+import android.text.TextUtils;
+
 import com.cooleshow.base.constanst.Constants;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
@@ -21,16 +23,16 @@ import java.util.List;
  */
 public class VideoCoursePresenter extends BasePresenter<VideoCourseContract.VideoCourseView> implements VideoCourseContract.Presenter {
 
-    @Override
-    public void queryVideoCourse(boolean isShowLoading, String studentId,int subjectId, int page) {
+    public void queryVideoCourse(boolean isShowLoading, String subjectId, String search,int page) {
         if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();
         try {
-            if (subjectId != 0) {
+            if (!TextUtils.isEmpty(subjectId)) {
                 jsonObject.putOpt("subjectId", subjectId);
             }
+            jsonObject.putOpt("search", search);
             jsonObject.putOpt("platform", "android");
             jsonObject.putOpt("version", "1");
             jsonObject.putOpt("page", page);

+ 58 - 0
student/src/main/java/com/cooleshow/student/presenter/course/VipCourseGroupPresenter.java

@@ -0,0 +1,58 @@
+package com.cooleshow.student.presenter.course;
+
+import android.text.TextUtils;
+
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.student.api.APIService;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+import com.cooleshow.student.contract.VipCourseGroupContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * 陪练课presenter
+ * Author by pq, Date on 2022/4/20.
+ */
+public class VipCourseGroupPresenter extends BasePresenter<VipCourseGroupContract.View> implements VipCourseGroupContract.Presenter {
+
+    public void queryVIPCourseGroup(boolean isShowLoading, String status, String subjectId, String search, int page) {
+        if (isShowLoading && getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            if (!TextUtils.isEmpty(status)) {
+                jsonObject.putOpt("status", status);
+            }
+            if (!TextUtils.isEmpty(subjectId)) {
+                jsonObject.putOpt("subjectId", subjectId);
+            }
+            jsonObject.putOpt("search", search);
+            jsonObject.putOpt("courseType", Constants.VIP_COURSE_TAG);
+            jsonObject.putOpt("page", page);
+            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(APIService.class).getCourseGroup(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<VIPCourseGroupListBean>(getView()) {
+            @Override
+            protected void onSuccess(VIPCourseGroupListBean data) {
+                if (getView() != null) {
+                    getView().onGetCourseGroupSuccess(page, data);
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (getView() != null) {
+                    getView().onGetCourseGroupError(page);
+                }
+            }
+        });
+    }
+}

+ 249 - 0
student/src/main/java/com/cooleshow/student/ui/course/InterestCourseGroupFragment.java

@@ -0,0 +1,249 @@
+package com.cooleshow.student.ui.course;
+
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.PopupWindow;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.constanst.CourseGroupStatusType;
+import com.cooleshow.base.interfaces.IFilterViewData;
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.PopupUtil;
+import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.widgets.CourseGroupFilterView;
+import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.VIPCourseAdapter;
+import com.cooleshow.student.bean.QuerySubjectBean;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+import com.cooleshow.student.contract.InterestCourseGroupContract;
+import com.cooleshow.student.databinding.FgInterestCourseLayoutBinding;
+import com.cooleshow.student.presenter.course.InterestCourseGroupPresenter;
+import com.scwang.smart.refresh.footer.ClassicsFooter;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+/**
+ * Author by pq, Date on 2022/5/9.
+ * 我的课程-趣纠课课程组
+ */
+public class InterestCourseGroupFragment extends BaseMVPFragment<FgInterestCourseLayoutBinding, InterestCourseGroupPresenter> implements InterestCourseGroupContract.View, View.OnClickListener {
+    private List<IFilterViewData> subjectBeanList = new ArrayList<>();//声部筛选
+    private VIPCourseAdapter mAdapter;
+    private int currentPage = 1;
+    private boolean hasNext = true;
+    private String status = "";
+    private String currentSubjectId;
+    private String searchCondition;
+    private CourseGroupFilterView mCourseGroupFilterView;
+    private PopupWindow mPopupWindow;
+    private List<IFilterViewData> statusList;//状态筛选
+
+    @Override
+    protected void initView(View rootView) {
+        mViewBinding.refreshLayout.setRefreshFooter(new ClassicsFooter(getContext()));
+        LinearLayoutManager manager = new LinearLayoutManager(getContext());
+        mViewBinding.recyclerViewList.setLayoutManager(manager);
+        mAdapter = new VIPCourseAdapter();
+        EmptyViewLayout mEmptyView = new EmptyViewLayout(getContext());
+        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程");
+        mAdapter.setEmptyView(mEmptyView);
+        mViewBinding.recyclerViewList.setAdapter(mAdapter);
+    }
+
+
+    @Override
+    protected void initData() {
+        CourseGroupStatusType[] values = CourseGroupStatusType.values();
+        List<CourseGroupStatusType> courseGroupStatusTypes = Arrays.asList(values);
+        statusList = new ArrayList<IFilterViewData>(courseGroupStatusTypes);
+
+
+        initListener();
+        getData(true);
+    }
+
+    private void initListener() {
+        mViewBinding.tvFilter.setOnClickListener(this);
+        mViewBinding.tvSearch.setOnClickListener(this);
+        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                currentPage = 1;
+                getData(false);
+            }
+        });
+        mViewBinding.refreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                //上拉加载
+                if (hasNext) {
+                    currentPage++;
+                    getData(false);
+                } else {
+                    mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                }
+            }
+        });
+
+        mAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                //课程详情页
+            }
+        });
+    }
+
+    private void getData(boolean isLoading) {
+        if (currentPage == 1) {
+            mViewBinding.refreshLayout.resetNoMoreData();
+        }
+        presenter.queryInterestCourseGroup(isLoading, status, currentSubjectId, searchCondition, currentPage);
+    }
+
+    @Override
+    protected FgInterestCourseLayoutBinding getLayoutView() {
+        return FgInterestCourseLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected InterestCourseGroupPresenter createPresenter() {
+        return new InterestCourseGroupPresenter();
+    }
+
+    @Override
+    public void onClick(View view) {
+        int id = view.getId();
+        if (id == R.id.tv_filter) {
+            showFilterView();
+            return;
+        }
+
+        if (id == R.id.tv_search) {
+            currentPage = 1;
+            searchCondition = mViewBinding.etTargetName.getText().toString().trim();
+            getData(false);
+            return;
+        }
+    }
+
+
+    private void showFilterView() {
+        if (mCourseGroupFilterView == null) {
+            mCourseGroupFilterView = new CourseGroupFilterView(getContext());
+            mCourseGroupFilterView.setOnEventListener(new CourseGroupFilterView.OnEventListener() {
+                @Override
+                public void onDismiss() {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                }
+
+                @Override
+                public void onQuery(String obj, String obj2) {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                    currentPage = 1;
+                    InterestCourseGroupFragment.this.status = obj;
+                    InterestCourseGroupFragment.this.currentSubjectId = obj2;
+                    getData(true);
+                }
+            });
+        }
+        mCourseGroupFilterView.setData(statusList, subjectBeanList);
+        ViewGroup parent = (ViewGroup) mCourseGroupFilterView.getParent();
+        if (parent != null) {
+            parent.removeView(mCourseGroupFilterView);
+        }
+        mPopupWindow = PopupUtil.showInDropWrapNObg(getContext(), mCourseGroupFilterView, mViewBinding.viewTopLine, new PopupUtil.ShowListener() {
+            @Override
+            public void onShow(View view, PopupWindow popupWindow) {
+                UiUtils.refreshFilterTextStyle(true, mViewBinding.tvFilter);
+            }
+        });
+        mPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                UiUtils.refreshFilterTextStyle(false, mViewBinding.tvFilter);
+            }
+        });
+    }
+
+
+    @Override
+    public void onResume() {
+        super.onResume();
+    }
+
+
+    private void checkHasNext(int dataSize) {
+        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+        mViewBinding.refreshLayout.setNoMoreData(!hasNext);
+    }
+
+    @Override
+    public void onGetCourseGroupSuccess(int page, VIPCourseGroupListBean dataList) {
+        if (isDetached()) {
+            return;
+        }
+        LOG.i("pq", "onGetCourseGroupSuccess:" + dataList);
+        if (dataList != null) {
+            if (page == 1) {
+                //第一页
+                mViewBinding.refreshLayout.finishRefresh();
+                if (mAdapter != null) {
+                    mAdapter.getData().clear();
+                    mAdapter.notifyDataSetChanged();
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.setNewInstance(dataList.getRows());
+                    }
+                }
+            } else {
+                //加载更多
+                if (mAdapter != null) {
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        mViewBinding.refreshLayout.finishLoadMore();
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.addData(dataList.getRows());
+                    } else {
+                        mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onGetCourseGroupError(int page) {
+        if (isDetached()) {
+            return;
+        }
+        if (page == 1) {
+            mViewBinding.refreshLayout.finishRefresh();
+        } else {
+            if (mAdapter != null) {
+                currentPage--;
+                mViewBinding.refreshLayout.finishLoadMore(false);
+            }
+        }
+    }
+
+    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+        subjectBeanList.clear();
+        subjectBeanList.add(new QuerySubjectBean("全部", ""));
+        subjectBeanList.addAll(data);
+    }
+}

+ 387 - 387
student/src/main/java/com/cooleshow/student/ui/course/LiveCourseFragment.java

@@ -1,387 +1,387 @@
-package com.cooleshow.student.ui.course;
-
-import android.annotation.SuppressLint;
-import android.graphics.Color;
-import android.text.TextUtils;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.PopupWindow;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.alibaba.android.arouter.launcher.ARouter;
-import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
-import com.bigkoo.pickerview.builder.TimePickerBuilder;
-import com.bigkoo.pickerview.listener.CustomListener;
-import com.bigkoo.pickerview.listener.OnDismissListener;
-import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
-import com.bigkoo.pickerview.view.OptionsPickerView;
-import com.bigkoo.pickerview.view.TimePickerView;
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.listener.OnItemChildClickListener;
-import com.chad.library.adapter.base.listener.OnItemClickListener;
-import com.chad.library.adapter.base.listener.OnLoadMoreListener;
-import com.cooleshow.base.common.WebConstants;
-import com.cooleshow.base.constanst.Constants;
-import com.cooleshow.base.router.RouterPath;
-import com.cooleshow.base.ui.fragment.BaseMVPFragment;
-import com.cooleshow.base.utils.LogUtils;
-import com.cooleshow.base.utils.PopupUtil;
-import com.cooleshow.base.utils.TimeUtils;
-import com.cooleshow.base.utils.UiUtils;
-import com.cooleshow.base.widgets.EmptyViewLayout;
-
-import com.cooleshow.base.widgets.poplist.PopMenuBean;
-import com.cooleshow.base.widgets.poplist.PopupListWindow;
-import com.cooleshow.chatmodule.utils.helper.ChatHelper;
-import com.cooleshow.student.R;
-import com.cooleshow.student.adapter.CourseStatusFilterAdapter;
-import com.cooleshow.student.adapter.LiveCourseListAdapter;
-import com.cooleshow.student.bean.CourseFilterStatusBean;
-import com.cooleshow.student.bean.LiveCourseListBean;
-import com.cooleshow.student.bean.QuerySubjectBean;
-import com.cooleshow.student.constants.CourseConstants;
-import com.cooleshow.student.contract.LiveCourseContract;
-import com.cooleshow.student.databinding.FragmentLiveCourseLayoutBinding;
-import com.cooleshow.student.presenter.course.LiveCoursePresenter;
-import com.scwang.smart.refresh.layout.api.RefreshLayout;
-import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Author by pq, Date on 2022/4/25.
- */
-public class LiveCourseFragment extends BaseMVPFragment<FragmentLiveCourseLayoutBinding, LiveCoursePresenter> implements LiveCourseContract.LiveCourseView, View.OnClickListener {
-    private String currentCourseFilterStatus = CourseConstants.COURSE_FILTER_ALL;
-    private String currentFilterDate;
-    private Date currentSelectDate;
-    private int currentSubjectId;
-    private int currentPage;
-    private LiveCourseListAdapter mAdapter;
-    private EmptyViewLayout mEmptyView;
-    private TimePickerView pvTime;
-    private ArrayList<CourseFilterStatusBean> mCourseFilterStatusBeans;
-    private List<QuerySubjectBean> subjectBeanList = new ArrayList<>();
-    private boolean hasNext = true;
-    private boolean isFirstLoad = true;
-
-    public static LiveCourseFragment newInstance() {
-        LiveCourseFragment fragment = new LiveCourseFragment();
-        return fragment;
-    }
-
-    @Override
-    protected FragmentLiveCourseLayoutBinding getLayoutView() {
-        return FragmentLiveCourseLayoutBinding.inflate(getLayoutInflater());
-    }
-
-    @Override
-    protected LiveCoursePresenter createPresenter() {
-        return new LiveCoursePresenter();
-    }
-
-    @Override
-    protected void initView(View rootView) {
-        mViewBinding.tvTime.setOnClickListener(this);
-        mViewBinding.tvCourseStatus.setOnClickListener(this);
-        mViewBinding.tvAgency.setOnClickListener(this);
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (isFirstLoad) {
-            isFirstLoad = false;
-            reBuildFilter(null, CourseConstants.COURSE_FILTER_ALL);
-        }
-    }
-
-    @Override
-    public void refreshData() {
-        super.refreshData();
-        reBuildFilter(currentSelectDate, currentCourseFilterStatus);
-        isFirstLoad = false;
-    }
-
-    private void buildDefaultCourseStatusFilterList() {
-        mCourseFilterStatusBeans = new ArrayList<>();
-        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_ALL, "全部状态"));
-        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_HAS_NOT_STARTED, "未开始"));
-        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_IN_PROGRESS, "进行中"));
-        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_COMPLETED, "已结束"));
-    }
-
-    private void reBuildFilter(Date date, String status) {
-        currentSelectDate = date != null ? date : TimeUtils.getNowDate();
-        String targetDateTimeStr = TimeUtils.date2String(currentSelectDate, TimeUtils.getSafeDateFormat("yyyy-MM"));
-        if (TextUtils.equals(targetDateTimeStr, currentFilterDate) && TextUtils.equals(currentCourseFilterStatus, status)) {
-            //防止重复条件触发
-            return;
-        }
-        currentFilterDate = targetDateTimeStr;
-        currentCourseFilterStatus = !TextUtils.isEmpty(status) ? status : CourseConstants.COURSE_FILTER_ALL;
-        currentPage = 1;
-        mViewBinding.tvTime.setText(currentFilterDate);
-        queryCourse(true);
-    }
-
-    @Override
-    protected void initData() {
-        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
-            currentPage = 1;
-            queryCourse(true);
-        });
-
-        mAdapter = new LiveCourseListAdapter(R.layout.item_live_course_list_layout);
-        mAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
-            //上拉加载
-            if (hasNext) {
-                currentPage++;
-                queryCourse(false);
-            } else {
-                mAdapter.getLoadMoreModule().loadMoreEnd();
-            }
-        });
-        mViewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
-        mViewBinding.recyclerView.setAdapter(mAdapter);
-        buildDefaultCourseStatusFilterList();
-        mAdapter.setOnItemClickListener((adapter, view, position) -> {
-            LiveCourseListBean.RowsBean item = (LiveCourseListBean.RowsBean) adapter.getItem(position);
-            ARouter.getInstance()
-                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                    .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, item.courseGoupId, item.courseId))
-                    .navigation();
-        });
-
-        mAdapter.setOnItemChildClickListener(new OnItemChildClickListener() {
-            @Override
-            public void onItemChildClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
-                int id = view.getId();
-                if (id == R.id.iv_chat) {
-                    LiveCourseListBean.RowsBean item = (LiveCourseListBean.RowsBean) adapter.getItem(position);
-                    if (item != null) {
-                        ChatHelper.getInstance().goGroupChat(item.imGroupId, "");
-                    }
-                }
-            }
-        });
-    }
-
-    private void queryCourse(boolean isShowLoading) {
-        //根据默认筛选条件查询
-        LogUtils.i("pq", "currentFilterDate:" + currentFilterDate);
-        LogUtils.i("pq", "currentCourseFilterStatus:" + currentCourseFilterStatus);
-        LogUtils.i("pq", "currentSubjectId:" + currentSubjectId);
-        LogUtils.i("pq", "currentPage:" + currentPage);
-        presenter.queryLiveCourse(isShowLoading, currentFilterDate, currentCourseFilterStatus, currentSubjectId, currentPage);
-    }
-
-    private void checkHasNext(int dataSize) {
-        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
-    }
-
-
-    @SuppressLint("NotifyDataSetChanged")
-    @Override
-    public void onGetLiveCourseSuccess(int page, LiveCourseListBean liveCourseListBean) {
-        if (isDetached()) {
-            return;
-        }
-        if (liveCourseListBean != null) {
-            if (page == 1) {
-                //第一页
-                mViewBinding.refreshLayout.finishRefresh();
-                if (mAdapter != null) {
-                    mAdapter.getData().clear();
-                    mAdapter.notifyDataSetChanged();
-                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
-                        checkHasNext(liveCourseListBean.rows.size());
-                        mAdapter.setNewInstance(liveCourseListBean.rows);
-                    } else {
-                        showEmptyView();
-                    }
-                }
-            } else {
-                //加载更多
-                if (mAdapter != null) {
-                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
-                        mAdapter.getLoadMoreModule().loadMoreComplete();
-                        checkHasNext(liveCourseListBean.rows.size());
-                        mAdapter.addData(liveCourseListBean.rows);
-                    } else {
-                        mAdapter.getLoadMoreModule().loadMoreEnd();
-                    }
-                }
-            }
-        }
-    }
-
-    @Override
-    public void onGetCourseError(int page) {
-        if (isDetached()) {
-            return;
-        }
-        if (page == 1) {
-            mViewBinding.refreshLayout.finishRefresh();
-        } else {
-            if (mAdapter != null) {
-                currentPage--;
-                mAdapter.getLoadMoreModule().loadMoreFail();
-            }
-        }
-    }
-
-    private void showEmptyView() {
-        if (mEmptyView == null) {
-            mEmptyView = new EmptyViewLayout(getContext());
-        }
-        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程~");
-        mAdapter.setEmptyView(mEmptyView);
-    }
-
-
-    private void showTimeSelectPicker() {
-        if (pvTime == null) {
-            pvTime = new TimePickerBuilder(requireContext(), (date, v) -> {//选中事件回调
-                reBuildFilter(date, currentCourseFilterStatus);
-            }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_default_layout, v -> {
-                        //自定义布局中的控件初始化及事件处理
-                        final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
-                        TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
-                        tvSubmit.setOnClickListener(v12 -> {
-                            pvTime.returnData();
-                            pvTime.dismiss();
-                        });
-                        ivCancel.setOnClickListener(v1 -> pvTime.dismiss());
-
-                    }).setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
-                    .setDividerColor(Color.TRANSPARENT)
-                    .setBgColor(Color.TRANSPARENT)
-                    .setLineSpacingMultiplier(2.5f)
-                    .setType(new boolean[]{true, true, false, false, false, false})// 默认全部显示
-                    .setTextColorCenter(getResources().getColor(com.cooleshow.base.R.color.color_1a1a1a))//设置选中项的颜色
-                    .isDialog(false)//是否显示为对话框样式
-                    .setLabel("年", "月", "", "", "", "")
-                    .build();
-
-            pvTime.setOnDismissListener(new OnDismissListener() {
-                @Override
-                public void onDismiss(Object o) {
-                    UiUtils.refreshFilterTextStyle2(false, mViewBinding.tvTime);
-                }
-
-                @Override
-                public void onShow() {
-                    UiUtils.refreshFilterTextStyle2(true, mViewBinding.tvTime);
-                }
-            });
-        }
-        Calendar calendar = Calendar.getInstance();
-        calendar.setTime(currentSelectDate);
-        pvTime.setDate(calendar);
-        if (!pvTime.isShowing()) {
-            pvTime.show();
-        }
-    }
-
-    @Override
-    public void onClick(View v) {
-        if (v.getId() == R.id.tv_time) {
-            //时间筛选
-            showTimeSelectPicker();
-            return;
-        }
-
-        if (v.getId() == R.id.tv_course_status) {
-            //课程状态筛选
-            List<PopMenuBean> popList = new ArrayList<>();
-            for (CourseFilterStatusBean bean : mCourseFilterStatusBeans) {
-                PopMenuBean popMenuBean = new PopMenuBean();
-                popMenuBean.setActionName(bean.showText);
-                popList.add(popMenuBean);
-            }
-            initCoursePop(mViewBinding.tvCourseStatus, popList, position -> {
-                CourseFilterStatusBean bean = mCourseFilterStatusBeans.get(position);
-                mViewBinding.tvCourseStatus.setText(bean.showText);
-                reBuildFilter(currentSelectDate, bean.value);
-            });
-            return;
-        }
-
-        if (v.getId() == R.id.tv_agency) {
-            //选择声部
-            if (subjectBeanList.size() == 0) {
-                subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
-            }
-            List<PopMenuBean> popList = new ArrayList<>();
-            for (QuerySubjectBean bean : subjectBeanList) {
-                PopMenuBean popMenuBean = new PopMenuBean();
-                popMenuBean.setActionName(bean.name);
-                popList.add(popMenuBean);
-            }
-            initCoursePop(mViewBinding.tvAgency, popList, position -> {
-                QuerySubjectBean bean = subjectBeanList.get(position);
-                currentSubjectId = bean.id;
-                mViewBinding.tvAgency.setText(bean.name);
-                queryCourse(true);
-            });
-            return;
-        }
-    }
-
-
-    private void initCoursePop(TextView targetView, List<PopMenuBean> popList, PopupListWindow.PopupListListener listener) {
-        PopupListWindow popWindow = new PopupListWindow(getContext());
-        popWindow.showListPop(targetView, popList, position -> listener.onPopupListClick(position));
-        UiUtils.refreshFilterTextStyle2(true, targetView);
-        popWindow.getPopupWindow().setOnDismissListener(new PopupWindow.OnDismissListener() {
-            @Override
-            public void onDismiss() {
-                UiUtils.refreshFilterTextStyle2(false, targetView);
-            }
-        });
-    }
-
-    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
-        subjectBeanList.clear();
-        subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
-        subjectBeanList.addAll(data);
-    }
-
-    private OptionsPickerView pvOptions;
-
-    private void selectSubject() {
-        if (subjectBeanList.size() == 0) {
-            subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
-        }
-        pvOptions = new OptionsPickerBuilder(getContext(), (options1, options2, options3, v) -> {
-            currentSubjectId = subjectBeanList.get(options1).id;
-            mViewBinding.tvAgency.setText(subjectBeanList.get(options1).name);
-            queryCourse(true);
-        }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_address_layout, v -> {
-            //自定义布局中的控件初始化及事件处理
-            final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
-            TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
-            tvSubmit.setOnClickListener(v12 -> {
-                pvOptions.returnData();
-                pvOptions.dismiss();
-            });
-            ivCancel.setOnClickListener(v1 -> pvOptions.dismiss());
-
-        }).setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
-                .setDividerColor(Color.TRANSPARENT)
-                .setBgColor(Color.TRANSPARENT).isDialog(false).build();
-        pvOptions.setPicker(subjectBeanList);
-        pvOptions.show();
-
-    }
-}
+//package com.cooleshow.student.ui.course;
+//
+//import android.annotation.SuppressLint;
+//import android.graphics.Color;
+//import android.text.TextUtils;
+//import android.view.LayoutInflater;
+//import android.view.View;
+//import android.view.ViewGroup;
+//import android.widget.ImageView;
+//import android.widget.PopupWindow;
+//import android.widget.TextView;
+//
+//import androidx.annotation.NonNull;
+//import androidx.recyclerview.widget.LinearLayoutManager;
+//import androidx.recyclerview.widget.RecyclerView;
+//
+//import com.alibaba.android.arouter.launcher.ARouter;
+//import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
+//import com.bigkoo.pickerview.builder.TimePickerBuilder;
+//import com.bigkoo.pickerview.listener.CustomListener;
+//import com.bigkoo.pickerview.listener.OnDismissListener;
+//import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
+//import com.bigkoo.pickerview.view.OptionsPickerView;
+//import com.bigkoo.pickerview.view.TimePickerView;
+//import com.chad.library.adapter.base.BaseQuickAdapter;
+//import com.chad.library.adapter.base.listener.OnItemChildClickListener;
+//import com.chad.library.adapter.base.listener.OnItemClickListener;
+//import com.chad.library.adapter.base.listener.OnLoadMoreListener;
+//import com.cooleshow.base.common.WebConstants;
+//import com.cooleshow.base.constanst.Constants;
+//import com.cooleshow.base.router.RouterPath;
+//import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+//import com.cooleshow.base.utils.LogUtils;
+//import com.cooleshow.base.utils.PopupUtil;
+//import com.cooleshow.base.utils.TimeUtils;
+//import com.cooleshow.base.utils.UiUtils;
+//import com.cooleshow.base.widgets.EmptyViewLayout;
+//
+//import com.cooleshow.base.widgets.poplist.PopMenuBean;
+//import com.cooleshow.base.widgets.poplist.PopupListWindow;
+//import com.cooleshow.chatmodule.utils.helper.ChatHelper;
+//import com.cooleshow.student.R;
+//import com.cooleshow.student.adapter.CourseStatusFilterAdapter;
+//import com.cooleshow.student.adapter.LiveCourseListAdapter;
+//import com.cooleshow.student.bean.CourseFilterStatusBean;
+//import com.cooleshow.student.bean.LiveCourseListBean;
+//import com.cooleshow.student.bean.QuerySubjectBean;
+//import com.cooleshow.student.constants.CourseConstants;
+//import com.cooleshow.student.contract.LiveCourseContract;
+//import com.cooleshow.student.databinding.FragmentLiveCourseLayoutBinding;
+//import com.cooleshow.student.presenter.course.LiveCoursePresenter;
+//import com.scwang.smart.refresh.layout.api.RefreshLayout;
+//import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+//
+//import java.util.ArrayList;
+//import java.util.Calendar;
+//import java.util.Date;
+//import java.util.List;
+//
+///**
+// * Author by pq, Date on 2022/4/25.
+// */
+//public class LiveCourseFragment extends BaseMVPFragment<FragmentLiveCourseLayoutBinding, LiveCoursePresenter> implements LiveCourseContract.LiveCourseView, View.OnClickListener {
+//    private String currentCourseFilterStatus = CourseConstants.COURSE_FILTER_ALL;
+//    private String currentFilterDate;
+//    private Date currentSelectDate;
+//    private int currentSubjectId;
+//    private int currentPage;
+//    private LiveCourseListAdapter mAdapter;
+//    private EmptyViewLayout mEmptyView;
+//    private TimePickerView pvTime;
+//    private ArrayList<CourseFilterStatusBean> mCourseFilterStatusBeans;
+//    private List<QuerySubjectBean> subjectBeanList = new ArrayList<>();
+//    private boolean hasNext = true;
+//    private boolean isFirstLoad = true;
+//
+//    public static LiveCourseFragment newInstance() {
+//        LiveCourseFragment fragment = new LiveCourseFragment();
+//        return fragment;
+//    }
+//
+//    @Override
+//    protected FragmentLiveCourseLayoutBinding getLayoutView() {
+//        return FragmentLiveCourseLayoutBinding.inflate(getLayoutInflater());
+//    }
+//
+//    @Override
+//    protected LiveCoursePresenter createPresenter() {
+//        return new LiveCoursePresenter();
+//    }
+//
+//    @Override
+//    protected void initView(View rootView) {
+//        mViewBinding.tvTime.setOnClickListener(this);
+//        mViewBinding.tvCourseStatus.setOnClickListener(this);
+//        mViewBinding.tvAgency.setOnClickListener(this);
+//    }
+//
+//    @Override
+//    public void onResume() {
+//        super.onResume();
+//        if (isFirstLoad) {
+//            isFirstLoad = false;
+//            reBuildFilter(null, CourseConstants.COURSE_FILTER_ALL);
+//        }
+//    }
+//
+//    @Override
+//    public void refreshData() {
+//        super.refreshData();
+//        reBuildFilter(currentSelectDate, currentCourseFilterStatus);
+//        isFirstLoad = false;
+//    }
+//
+//    private void buildDefaultCourseStatusFilterList() {
+//        mCourseFilterStatusBeans = new ArrayList<>();
+//        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_ALL, "全部状态"));
+//        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_HAS_NOT_STARTED, "未开始"));
+//        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_IN_PROGRESS, "进行中"));
+//        mCourseFilterStatusBeans.add(new CourseFilterStatusBean(CourseConstants.COURSE_FILTER_COMPLETED, "已结束"));
+//    }
+//
+//    private void reBuildFilter(Date date, String status) {
+//        currentSelectDate = date != null ? date : TimeUtils.getNowDate();
+//        String targetDateTimeStr = TimeUtils.date2String(currentSelectDate, TimeUtils.getSafeDateFormat("yyyy-MM"));
+//        if (TextUtils.equals(targetDateTimeStr, currentFilterDate) && TextUtils.equals(currentCourseFilterStatus, status)) {
+//            //防止重复条件触发
+//            return;
+//        }
+//        currentFilterDate = targetDateTimeStr;
+//        currentCourseFilterStatus = !TextUtils.isEmpty(status) ? status : CourseConstants.COURSE_FILTER_ALL;
+//        currentPage = 1;
+//        mViewBinding.tvTime.setText(currentFilterDate);
+//        queryCourse(true);
+//    }
+//
+//    @Override
+//    protected void initData() {
+//        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+//            currentPage = 1;
+//            queryCourse(true);
+//        });
+//
+//        mAdapter = new LiveCourseListAdapter();
+//        mAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
+//            //上拉加载
+//            if (hasNext) {
+//                currentPage++;
+//                queryCourse(false);
+//            } else {
+//                mAdapter.getLoadMoreModule().loadMoreEnd();
+//            }
+//        });
+//        mViewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
+//        mViewBinding.recyclerView.setAdapter(mAdapter);
+//        buildDefaultCourseStatusFilterList();
+//        mAdapter.setOnItemClickListener((adapter, view, position) -> {
+//            LiveCourseListBean.RowsBean item = (LiveCourseListBean.RowsBean) adapter.getItem(position);
+//            ARouter.getInstance()
+//                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+//                    .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, item.courseGoupId, item.courseId))
+//                    .navigation();
+//        });
+//
+//        mAdapter.setOnItemChildClickListener(new OnItemChildClickListener() {
+//            @Override
+//            public void onItemChildClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+//                int id = view.getId();
+//                if (id == R.id.iv_chat) {
+//                    LiveCourseListBean.RowsBean item = (LiveCourseListBean.RowsBean) adapter.getItem(position);
+//                    if (item != null) {
+//                        ChatHelper.getInstance().goGroupChat(item.imGroupId, "");
+//                    }
+//                }
+//            }
+//        });
+//    }
+//
+//    private void queryCourse(boolean isShowLoading) {
+//        //根据默认筛选条件查询
+//        LogUtils.i("pq", "currentFilterDate:" + currentFilterDate);
+//        LogUtils.i("pq", "currentCourseFilterStatus:" + currentCourseFilterStatus);
+//        LogUtils.i("pq", "currentSubjectId:" + currentSubjectId);
+//        LogUtils.i("pq", "currentPage:" + currentPage);
+//        presenter.queryLiveCourse(isShowLoading, currentFilterDate, currentCourseFilterStatus, currentSubjectId, currentPage);
+//    }
+//
+//    private void checkHasNext(int dataSize) {
+//        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+//    }
+//
+//
+//    @SuppressLint("NotifyDataSetChanged")
+//    @Override
+//    public void onGetLiveCourseSuccess(int page, LiveCourseListBean liveCourseListBean) {
+//        if (isDetached()) {
+//            return;
+//        }
+//        if (liveCourseListBean != null) {
+//            if (page == 1) {
+//                //第一页
+//                mViewBinding.refreshLayout.finishRefresh();
+//                if (mAdapter != null) {
+//                    mAdapter.getData().clear();
+//                    mAdapter.notifyDataSetChanged();
+//                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
+//                        checkHasNext(liveCourseListBean.rows.size());
+//                        mAdapter.setNewInstance(liveCourseListBean.rows);
+//                    } else {
+//                        showEmptyView();
+//                    }
+//                }
+//            } else {
+//                //加载更多
+//                if (mAdapter != null) {
+//                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
+//                        mAdapter.getLoadMoreModule().loadMoreComplete();
+//                        checkHasNext(liveCourseListBean.rows.size());
+//                        mAdapter.addData(liveCourseListBean.rows);
+//                    } else {
+//                        mAdapter.getLoadMoreModule().loadMoreEnd();
+//                    }
+//                }
+//            }
+//        }
+//    }
+//
+//    @Override
+//    public void onGetCourseError(int page) {
+//        if (isDetached()) {
+//            return;
+//        }
+//        if (page == 1) {
+//            mViewBinding.refreshLayout.finishRefresh();
+//        } else {
+//            if (mAdapter != null) {
+//                currentPage--;
+//                mAdapter.getLoadMoreModule().loadMoreFail();
+//            }
+//        }
+//    }
+//
+//    private void showEmptyView() {
+//        if (mEmptyView == null) {
+//            mEmptyView = new EmptyViewLayout(getContext());
+//        }
+//        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程~");
+//        mAdapter.setEmptyView(mEmptyView);
+//    }
+//
+//
+//    private void showTimeSelectPicker() {
+//        if (pvTime == null) {
+//            pvTime = new TimePickerBuilder(requireContext(), (date, v) -> {//选中事件回调
+//                reBuildFilter(date, currentCourseFilterStatus);
+//            }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_default_layout, v -> {
+//                        //自定义布局中的控件初始化及事件处理
+//                        final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
+//                        TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
+//                        tvSubmit.setOnClickListener(v12 -> {
+//                            pvTime.returnData();
+//                            pvTime.dismiss();
+//                        });
+//                        ivCancel.setOnClickListener(v1 -> pvTime.dismiss());
+//
+//                    }).setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
+//                    .setDividerColor(Color.TRANSPARENT)
+//                    .setBgColor(Color.TRANSPARENT)
+//                    .setLineSpacingMultiplier(2.5f)
+//                    .setType(new boolean[]{true, true, false, false, false, false})// 默认全部显示
+//                    .setTextColorCenter(getResources().getColor(com.cooleshow.base.R.color.color_1a1a1a))//设置选中项的颜色
+//                    .isDialog(false)//是否显示为对话框样式
+//                    .setLabel("年", "月", "", "", "", "")
+//                    .build();
+//
+//            pvTime.setOnDismissListener(new OnDismissListener() {
+//                @Override
+//                public void onDismiss(Object o) {
+//                    UiUtils.refreshFilterTextStyle2(false, mViewBinding.tvTime);
+//                }
+//
+//                @Override
+//                public void onShow() {
+//                    UiUtils.refreshFilterTextStyle2(true, mViewBinding.tvTime);
+//                }
+//            });
+//        }
+//        Calendar calendar = Calendar.getInstance();
+//        calendar.setTime(currentSelectDate);
+//        pvTime.setDate(calendar);
+//        if (!pvTime.isShowing()) {
+//            pvTime.show();
+//        }
+//    }
+//
+//    @Override
+//    public void onClick(View v) {
+//        if (v.getId() == R.id.tv_time) {
+//            //时间筛选
+//            showTimeSelectPicker();
+//            return;
+//        }
+//
+//        if (v.getId() == R.id.tv_course_status) {
+//            //课程状态筛选
+//            List<PopMenuBean> popList = new ArrayList<>();
+//            for (CourseFilterStatusBean bean : mCourseFilterStatusBeans) {
+//                PopMenuBean popMenuBean = new PopMenuBean();
+//                popMenuBean.setActionName(bean.showText);
+//                popList.add(popMenuBean);
+//            }
+//            initCoursePop(mViewBinding.tvCourseStatus, popList, position -> {
+//                CourseFilterStatusBean bean = mCourseFilterStatusBeans.get(position);
+//                mViewBinding.tvCourseStatus.setText(bean.showText);
+//                reBuildFilter(currentSelectDate, bean.value);
+//            });
+//            return;
+//        }
+//
+//        if (v.getId() == R.id.tv_agency) {
+//            //选择声部
+//            if (subjectBeanList.size() == 0) {
+//                subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+//            }
+//            List<PopMenuBean> popList = new ArrayList<>();
+//            for (QuerySubjectBean bean : subjectBeanList) {
+//                PopMenuBean popMenuBean = new PopMenuBean();
+//                popMenuBean.setActionName(bean.name);
+//                popList.add(popMenuBean);
+//            }
+//            initCoursePop(mViewBinding.tvAgency, popList, position -> {
+//                QuerySubjectBean bean = subjectBeanList.get(position);
+//                currentSubjectId = bean.id;
+//                mViewBinding.tvAgency.setText(bean.name);
+//                queryCourse(true);
+//            });
+//            return;
+//        }
+//    }
+//
+//
+//    private void initCoursePop(TextView targetView, List<PopMenuBean> popList, PopupListWindow.PopupListListener listener) {
+//        PopupListWindow popWindow = new PopupListWindow(getContext());
+//        popWindow.showListPop(targetView, popList, position -> listener.onPopupListClick(position));
+//        UiUtils.refreshFilterTextStyle2(true, targetView);
+//        popWindow.getPopupWindow().setOnDismissListener(new PopupWindow.OnDismissListener() {
+//            @Override
+//            public void onDismiss() {
+//                UiUtils.refreshFilterTextStyle2(false, targetView);
+//            }
+//        });
+//    }
+//
+//    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+//        subjectBeanList.clear();
+//        subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+//        subjectBeanList.addAll(data);
+//    }
+//
+//    private OptionsPickerView pvOptions;
+//
+//    private void selectSubject() {
+//        if (subjectBeanList.size() == 0) {
+//            subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+//        }
+//        pvOptions = new OptionsPickerBuilder(getContext(), (options1, options2, options3, v) -> {
+//            currentSubjectId = subjectBeanList.get(options1).id;
+//            mViewBinding.tvAgency.setText(subjectBeanList.get(options1).name);
+//            queryCourse(true);
+//        }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_address_layout, v -> {
+//            //自定义布局中的控件初始化及事件处理
+//            final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
+//            TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
+//            tvSubmit.setOnClickListener(v12 -> {
+//                pvOptions.returnData();
+//                pvOptions.dismiss();
+//            });
+//            ivCancel.setOnClickListener(v1 -> pvOptions.dismiss());
+//
+//        }).setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
+//                .setDividerColor(Color.TRANSPARENT)
+//                .setBgColor(Color.TRANSPARENT).isDialog(false).build();
+//        pvOptions.setPicker(subjectBeanList);
+//        pvOptions.show();
+//
+//    }
+//}

+ 287 - 0
student/src/main/java/com/cooleshow/student/ui/course/LiveCourseGroupFragment.java

@@ -0,0 +1,287 @@
+package com.cooleshow.student.ui.course;
+
+import android.text.TextUtils;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.PopupWindow;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemChildClickListener;
+import com.cooleshow.base.common.WebConstants;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.constanst.CourseGroupStatusType;
+import com.cooleshow.base.interfaces.IFilterViewData;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.PopupUtil;
+import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.widgets.CourseGroupFilterView;
+import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.chatmodule.utils.helper.ChatHelper;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.LiveCourseListAdapter;
+import com.cooleshow.student.bean.LiveCourseListBean;
+import com.cooleshow.student.bean.QuerySubjectBean;
+import com.cooleshow.student.constants.CourseConstants;
+import com.cooleshow.student.contract.LiveCourseContract;
+import com.cooleshow.student.databinding.FragmentLiveCourseLayoutBinding;
+import com.cooleshow.student.presenter.course.LiveCoursePresenter;
+import com.scwang.smart.refresh.footer.ClassicsFooter;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+/**
+ * Author by pq, Date on 2022/4/25.
+ */
+public class LiveCourseGroupFragment extends BaseMVPFragment<FragmentLiveCourseLayoutBinding, LiveCoursePresenter> implements LiveCourseContract.LiveCourseView, View.OnClickListener {
+    private String currentCourseFilterStatus = CourseConstants.COURSE_FILTER_ALL;
+    private String currentSubjectId;
+    private String searchCondition;
+    private int currentPage;
+    private LiveCourseListAdapter mAdapter;
+    private EmptyViewLayout mEmptyView;
+    private ArrayList<IFilterViewData> mCourseFilterStatusBeans;
+    private List<IFilterViewData> subjectBeanList = new ArrayList<>();
+    private boolean hasNext = true;
+    private CourseGroupFilterView mCourseGroupFilterView;
+    private PopupWindow mPopupWindow;
+
+    @Override
+    protected FragmentLiveCourseLayoutBinding getLayoutView() {
+        return FragmentLiveCourseLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected LiveCoursePresenter createPresenter() {
+        return new LiveCoursePresenter();
+    }
+
+    @Override
+    protected void initView(View rootView) {
+        mViewBinding.refreshLayout.setRefreshFooter(new ClassicsFooter(getContext()));
+    }
+
+
+    @Override
+    public void onResume() {
+        super.onResume();
+    }
+
+    private void buildDefaultCourseStatusFilterList() {
+        CourseGroupStatusType[] values = CourseGroupStatusType.values();
+        List<CourseGroupStatusType> courseGroupStatusTypes = Arrays.asList(values);
+        mCourseFilterStatusBeans = new ArrayList<IFilterViewData>(courseGroupStatusTypes);
+    }
+
+    private void reBuildFilter(String status, String subjectId) {
+        if (!TextUtils.isEmpty(currentCourseFilterStatus) &&
+                !TextUtils.isEmpty(currentSubjectId) &&
+                TextUtils.equals(currentCourseFilterStatus, status) &&
+                TextUtils.equals(currentSubjectId, subjectId)) {
+            //防止重复条件触发
+            return;
+        }
+        currentCourseFilterStatus = !TextUtils.isEmpty(status) ? status : CourseConstants.COURSE_FILTER_ALL;
+        LiveCourseGroupFragment.this.currentSubjectId = subjectId;
+        currentPage = 1;
+        getData(true);
+    }
+
+    @Override
+    protected void initData() {
+        mAdapter = new LiveCourseListAdapter();
+        initListener();
+        if (mEmptyView == null) {
+            mEmptyView = new EmptyViewLayout(getContext());
+        }
+        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程~");
+        mAdapter.setEmptyView(mEmptyView);
+//        mAdapter.getLoadMoreModule().setEnableLoadMoreIfNotFullPage(false);
+        mViewBinding.recyclerViewList.setLayoutManager(new LinearLayoutManager(requireContext()));
+        mViewBinding.recyclerViewList.setAdapter(mAdapter);
+        buildDefaultCourseStatusFilterList();
+        reBuildFilter(CourseConstants.COURSE_FILTER_ALL, null);
+    }
+
+    private void initListener() {
+        mViewBinding.tvFilter.setOnClickListener(this);
+        mViewBinding.tvSearch.setOnClickListener(this);
+        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                currentPage = 1;
+                getData(true);
+            }
+        });
+
+        mViewBinding.refreshLayout.setOnLoadMoreListener(new com.scwang.smart.refresh.layout.listener.OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                //上拉加载
+                if (hasNext) {
+                    currentPage++;
+                    getData(false);
+                } else {
+                    mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                }
+            }
+        });
+
+        mAdapter.setOnItemClickListener((adapter, view, position) -> {
+            LiveCourseListBean.RowsBean item = (LiveCourseListBean.RowsBean) adapter.getItem(position);
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, item.courseGoupId, item.courseId))
+                    .navigation();
+        });
+        mAdapter.setOnItemChildClickListener(new OnItemChildClickListener() {
+            @Override
+            public void onItemChildClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                int id = view.getId();
+                if (id == R.id.iv_chat) {
+                    LiveCourseListBean.RowsBean item = (LiveCourseListBean.RowsBean) adapter.getItem(position);
+                    if (item != null) {
+                        ChatHelper.getInstance().goGroupChat(item.imGroupId, "");
+                    }
+                }
+            }
+        });
+    }
+
+
+    private void getData(boolean isShowLoading) {
+        //根据默认筛选条件查询
+        if (currentPage == 1) {
+            mViewBinding.refreshLayout.resetNoMoreData();
+        }
+        presenter.queryLiveCourse(isShowLoading, currentCourseFilterStatus, currentSubjectId, searchCondition, currentPage);
+    }
+
+    private void checkHasNext(int dataSize) {
+        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+        mViewBinding.refreshLayout.setNoMoreData(!hasNext);
+    }
+
+
+    @Override
+    public void onGetLiveCourseSuccess(int page, LiveCourseListBean dataList) {
+        if (isDetached()) {
+            return;
+        }
+        LOG.i("pq", "onGetLiveCourseSuccess:" + dataList);
+        if (dataList != null) {
+            if (page == 1) {
+                //第一页
+                mViewBinding.refreshLayout.finishRefresh();
+                if (mAdapter != null) {
+                    mAdapter.getData().clear();
+                    mAdapter.notifyDataSetChanged();
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.setNewInstance(dataList.getRows());
+                    }
+                }
+            } else {
+                //加载更多
+                if (mAdapter != null) {
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        mViewBinding.refreshLayout.finishLoadMore();
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.addData(dataList.getRows());
+                    } else {
+                        mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onGetCourseError(int page) {
+        if (isDetached()) {
+            return;
+        }
+        if (page == 1) {
+            mViewBinding.refreshLayout.finishRefresh();
+        } else {
+            if (mAdapter != null) {
+                currentPage--;
+                mViewBinding.refreshLayout.finishLoadMore(false);
+            }
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.tv_filter) {
+            //筛选
+            showFilterView();
+            return;
+        }
+
+        if (id == R.id.tv_search) {
+            currentPage = 1;
+            searchCondition = mViewBinding.etTargetName.getText().toString().trim();
+            getData(false);
+            return;
+        }
+    }
+
+
+    private void showFilterView() {
+        if (mCourseGroupFilterView == null) {
+            mCourseGroupFilterView = new CourseGroupFilterView(getContext());
+            mCourseGroupFilterView.setOnEventListener(new CourseGroupFilterView.OnEventListener() {
+                @Override
+                public void onDismiss() {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                }
+
+                @Override
+                public void onQuery(String obj, String obj2) {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                    currentPage = 1;
+                    reBuildFilter(obj, obj2);
+                }
+            });
+        }
+        mCourseGroupFilterView.setData(mCourseFilterStatusBeans, subjectBeanList);
+        ViewGroup parent = (ViewGroup) mCourseGroupFilterView.getParent();
+        if (parent != null) {
+            parent.removeView(mCourseGroupFilterView);
+        }
+        mPopupWindow = PopupUtil.showInDropWrapNObg(getContext(), mCourseGroupFilterView, mViewBinding.viewTopLine, new PopupUtil.ShowListener() {
+            @Override
+            public void onShow(View view, PopupWindow popupWindow) {
+                UiUtils.refreshFilterTextStyle(true, mViewBinding.tvFilter);
+            }
+        });
+        mPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                UiUtils.refreshFilterTextStyle(false, mViewBinding.tvFilter);
+            }
+        });
+    }
+
+
+    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+        subjectBeanList.clear();
+        subjectBeanList.add(new QuerySubjectBean("全部", ""));
+        subjectBeanList.addAll(data);
+    }
+}

+ 88 - 18
student/src/main/java/com/cooleshow/student/ui/course/MineCourseActivity.java

@@ -1,17 +1,24 @@
 package com.cooleshow.student.ui.course;
 
+import android.graphics.Color;
 import android.graphics.Typeface;
 import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.TextView;
 
 import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
 import androidx.viewpager2.widget.ViewPager2;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
+import com.cooleshow.base.bean.CourseTipBean;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.base.widgets.dialog.CourseTipDialog;
+import com.cooleshow.student.R;
 import com.cooleshow.student.adapter.MineCoursePagerAdapter;
 import com.cooleshow.student.bean.QuerySubjectBean;
 import com.cooleshow.student.contract.MineCourseContract;
@@ -32,22 +39,28 @@ import java.util.List;
  * 类说明:
  */
 @Route(path = RouterPath.CourseCenter.TEACHER_MINE_COURSE)
-public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBinding, MineCoursePresenter> implements MineCourseContract.MineCourseView {
+public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBinding, MineCoursePresenter> implements MineCourseContract.MineCourseView, View.OnClickListener {
     public static final String SELECT_POSITION = "selectPosition";
     private TabLayout tabLayout;
     private ViewPager2 viewPager;
-    private List<String> titles = new ArrayList<String>(Arrays.asList("陪练课", "直播课", "视频课", "琴房课"));
+    private List<String> titles = new ArrayList<String>(Arrays.asList("VIP定制课","趣纠课", "直播课", "视频课", "琴房课"));
     private List<BaseMVPFragment> fragments = new ArrayList<>();
-    private MinePracticeCourseFragment mMinePracticeCourseFragment;
-    private LiveCourseFragment mLiveCourseFragment;
-    private VideoCourseFragment mVideoCourseFragment;
-    private PianoRoomCourseFragment mPianoRoomCourseFragment;
+    private LiveCourseGroupFragment mLiveCourseFragment;
+    private VideoCourseGroupFragment mVideoCourseFragment;
+    private PianoCourseGroupFragment mPianoRoomCourseFragment;
+    private ArrayList<CourseTipBean> courseTipList;
+    private CourseTipDialog mCourseTipDialog;
 
     @Override
     protected void initView() {
         initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "我的课程");
+        viewBinding.toolbarInclude.toolbar.setBackgroundColor(Color.TRANSPARENT);
+        viewBinding.toolbarInclude.tvRight.setVisibility(View.VISIBLE);
+        viewBinding.toolbarInclude.tvRight.setImageResource(R.drawable.icon_question_mark);
+        viewBinding.toolbarInclude.tvRight.setOnClickListener(this);
+
         tabLayout = viewBinding.tablayout;
-        viewPager = viewBinding.viewpager;
+        viewPager = viewBinding.viewPager;
         viewPager.setCurrentItem(0);
     }
 
@@ -70,9 +83,16 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBindin
     @Override
     public void initData() {
         super.initData();
+        initListener();
+        initCourseTipData();
         int selectPosition = getIntent().getIntExtra(SELECT_POSITION, -1);
+        TabLayoutMediator tabLayoutMediator = new TabLayoutMediator(viewBinding.tablayout, viewBinding.viewPager, (tab, position) -> {
+            //这里需要根据position修改tab的样式和文字等
+            createTab(tab, titles.get(position));
+        });
         initTabLayoutAndViewPager();
-        presenter.querySubjectItem();
+        tabLayoutMediator.attach();
+
         if (selectPosition != -1 && selectPosition < fragments.size()) {
             viewPager.post(new Runnable() {
                 @Override
@@ -81,27 +101,27 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBindin
                 }
             });
         }
+        presenter.querySubjectItem();
     }
 
     private void initTabLayoutAndViewPager() {
-        mMinePracticeCourseFragment = MinePracticeCourseFragment.newInstance();
-        mLiveCourseFragment = LiveCourseFragment.newInstance();
-        mVideoCourseFragment = VideoCourseFragment.newInstance();
-        mPianoRoomCourseFragment = new PianoRoomCourseFragment();
-        fragments.add(mMinePracticeCourseFragment);
+        VIPCourseGroupFragment vipCourseGroupFragment = new VIPCourseGroupFragment();
+        InterestCourseGroupFragment interestCourseGroupFragment = new InterestCourseGroupFragment();
+        mLiveCourseFragment = new LiveCourseGroupFragment();
+        mVideoCourseFragment = new VideoCourseGroupFragment();
+        mPianoRoomCourseFragment = new PianoCourseGroupFragment();
+        fragments.add(vipCourseGroupFragment);
+        fragments.add(interestCourseGroupFragment);
         fragments.add(mLiveCourseFragment);
         fragments.add(mVideoCourseFragment);
         fragments.add(mPianoRoomCourseFragment);
         MineCoursePagerAdapter mineCoursePageAdapter = new MineCoursePagerAdapter(this);
         mineCoursePageAdapter.setFragments(fragments);
         viewPager.setAdapter(mineCoursePageAdapter);
-        new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> {
-            //这里需要根据position修改tab的样式和文字等
-            tab.setText(titles.get(position));
-            tab.select();
-        }).attach();
         viewPager.setOffscreenPageLimit(fragments.size());
+    }
 
+    private void initListener(){
         tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
             @Override
             public void onTabSelected(TabLayout.Tab tab) {
@@ -129,6 +149,26 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBindin
         });
     }
 
+    private void initCourseTipData() {
+        courseTipList = new ArrayList<>();
+        int[] titles = new int[]{com.cooleshow.base.R.string.vip_course_tip_title,
+                com.cooleshow.base.R.string.interest_course_tip_title,
+                com.cooleshow.base.R.string.live_course_tip_title,
+                com.cooleshow.base.R.string.video_course_tip_title,
+                com.cooleshow.base.R.string.piano_course_tip_title};
+        int[] desDatas = new int[]{com.cooleshow.base.R.string.vip_course_tip_str,
+                com.cooleshow.base.R.string.interest_course_tip_str,
+                com.cooleshow.base.R.string.live_course_tip_str,
+                com.cooleshow.base.R.string.video_course_tip_str,
+                com.cooleshow.base.R.string.piano_course_tip_str};
+        for (int i = 0; i < titles.length; i++) {
+            CourseTipBean courseTipBean = new CourseTipBean();
+            courseTipBean.setTitle(getString(titles[i]));
+            courseTipBean.setDes(getString(desDatas[i]));
+            courseTipList.add(courseTipBean);
+        }
+    }
+
     @Override
     public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
         if (mMinePracticeCourseFragment != null) {
@@ -144,4 +184,34 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBindin
             mPianoRoomCourseFragment.querySubjectItemSuccess(data);
         }
     }
+
+    private TabLayout.Tab createTab(TabLayout.Tab tab, String text) {
+        View view = LayoutInflater.from(this).inflate(R.layout.view_mine_course_tab_layout, null);
+        TextView tv_text = view.findViewById(R.id.tv_text);
+        tv_text.setText(text);
+        tab.setCustomView(view);
+        return tab;
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == com.cooleshow.base.R.id.tv_right) {
+            showTipDialog();
+            return;
+        }
+    }
+
+    private void showTipDialog() {
+        if (mCourseTipDialog == null) {
+            mCourseTipDialog = new CourseTipDialog(this);
+        }
+        if (!mCourseTipDialog.isShowing()) {
+            mCourseTipDialog.show();
+        }
+        //仅显示VIP定制课
+        mCourseTipDialog.showCustomData(courseTipList);
+        int pos = viewBinding.viewPager.getCurrentItem();
+        mCourseTipDialog.setSelect(pos);
+    }
 }

+ 4 - 4
student/src/main/java/com/cooleshow/student/ui/course/MinePracticeCourseFragment.java

@@ -63,7 +63,7 @@ public class MinePracticeCourseFragment extends BaseMVPFragment<FragmentPractice
     private String currentCourseFilterStatus = CourseConstants.COURSE_FILTER_ALL;
     private String currentFilterDate;
     private Date currentSelectDate;
-    private int currentSubjectId;
+    private String currentSubjectId;
     private int currentPage;
     private boolean hasNext = true;
     private PracticeCourseListAdapter mAdapter;
@@ -101,7 +101,7 @@ public class MinePracticeCourseFragment extends BaseMVPFragment<FragmentPractice
             });
         } else if (id == R.id.tv_agency) {
             if (subjectBeanList.size() == 0) {
-                subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+                subjectBeanList.add(new QuerySubjectBean("全部声部", ""));
             }
             List<PopMenuBean> popList = new ArrayList<>();
             for (QuerySubjectBean bean : subjectBeanList) {
@@ -285,7 +285,7 @@ public class MinePracticeCourseFragment extends BaseMVPFragment<FragmentPractice
 
     public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
         subjectBeanList.clear();
-        subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+        subjectBeanList.add(new QuerySubjectBean("全部声部", ""));
         subjectBeanList.addAll(data);
     }
 
@@ -357,7 +357,7 @@ public class MinePracticeCourseFragment extends BaseMVPFragment<FragmentPractice
 
     private void selectSubject() {
         if (subjectBeanList.size() == 0) {
-            subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+            subjectBeanList.add(new QuerySubjectBean("全部声部", ""));
         }
         pvOptions = new OptionsPickerBuilder(getContext(), (options1, options2, options3, v) -> {
             currentSubjectId = subjectBeanList.get(options1).id;

+ 249 - 0
student/src/main/java/com/cooleshow/student/ui/course/PianoCourseGroupFragment.java

@@ -0,0 +1,249 @@
+package com.cooleshow.student.ui.course;
+
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.PopupWindow;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.constanst.CourseGroupStatusType;
+import com.cooleshow.base.interfaces.IFilterViewData;
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.PopupUtil;
+import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.widgets.CourseGroupFilterView;
+import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.PianoCourseGroupAdapter;
+import com.cooleshow.student.bean.QuerySubjectBean;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+import com.cooleshow.student.contract.PianoCourseGroupContract;
+import com.cooleshow.student.databinding.FgPianoCourseGroupLayoutBinding;
+import com.cooleshow.student.presenter.course.PianoCourseGroupPresenter;
+import com.scwang.smart.refresh.footer.ClassicsFooter;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+/**
+ * Author by pq, Date on 2022/5/9.
+ * 我的课程-趣纠课课程组
+ */
+public class PianoCourseGroupFragment extends BaseMVPFragment<FgPianoCourseGroupLayoutBinding, PianoCourseGroupPresenter> implements PianoCourseGroupContract.View, View.OnClickListener {
+    private List<IFilterViewData> subjectBeanList = new ArrayList<>();//声部筛选
+    private PianoCourseGroupAdapter mAdapter;
+    private int currentPage = 1;
+    private boolean hasNext = true;
+    private String status = "";
+    private String currentSubjectId;
+    private String searchCondition;
+    private CourseGroupFilterView mCourseGroupFilterView;
+    private PopupWindow mPopupWindow;
+    private List<IFilterViewData> statusList;//状态筛选
+
+    @Override
+    protected void initView(View rootView) {
+        mViewBinding.refreshLayout.setRefreshFooter(new ClassicsFooter(getContext()));
+        LinearLayoutManager manager = new LinearLayoutManager(getContext());
+        mViewBinding.recyclerViewList.setLayoutManager(manager);
+        mAdapter = new PianoCourseGroupAdapter();
+        EmptyViewLayout mEmptyView = new EmptyViewLayout(getContext());
+        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程");
+        mAdapter.setEmptyView(mEmptyView);
+        mViewBinding.recyclerViewList.setAdapter(mAdapter);
+    }
+
+
+    @Override
+    protected void initData() {
+        CourseGroupStatusType[] values = CourseGroupStatusType.values();
+        List<CourseGroupStatusType> courseGroupStatusTypes = Arrays.asList(values);
+        statusList = new ArrayList<IFilterViewData>(courseGroupStatusTypes);
+
+
+        initListener();
+        getData(true);
+    }
+
+    private void initListener() {
+        mViewBinding.tvFilter.setOnClickListener(this);
+        mViewBinding.tvSearch.setOnClickListener(this);
+        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                currentPage = 1;
+                getData(false);
+            }
+        });
+        mViewBinding.refreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                //上拉加载
+                if (hasNext) {
+                    currentPage++;
+                    getData(false);
+                } else {
+                    mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                }
+            }
+        });
+
+        mAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                //课程详情页
+            }
+        });
+    }
+
+    private void getData(boolean isLoading) {
+        if (currentPage == 1) {
+            mViewBinding.refreshLayout.resetNoMoreData();
+        }
+        presenter.queryInterestCourseGroup(isLoading, status, currentSubjectId, searchCondition, currentPage);
+    }
+
+    @Override
+    protected FgPianoCourseGroupLayoutBinding getLayoutView() {
+        return FgPianoCourseGroupLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected PianoCourseGroupPresenter createPresenter() {
+        return new PianoCourseGroupPresenter();
+    }
+
+    @Override
+    public void onClick(View view) {
+        int id = view.getId();
+        if (id == R.id.tv_filter) {
+            showFilterView();
+            return;
+        }
+
+        if (id == R.id.tv_search) {
+            currentPage = 1;
+            searchCondition = mViewBinding.etTargetName.getText().toString().trim();
+            getData(false);
+            return;
+        }
+    }
+
+
+    private void showFilterView() {
+        if (mCourseGroupFilterView == null) {
+            mCourseGroupFilterView = new CourseGroupFilterView(getContext());
+            mCourseGroupFilterView.setOnEventListener(new CourseGroupFilterView.OnEventListener() {
+                @Override
+                public void onDismiss() {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                }
+
+                @Override
+                public void onQuery(String obj, String obj2) {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                    currentPage = 1;
+                    PianoCourseGroupFragment.this.status = obj;
+                    PianoCourseGroupFragment.this.currentSubjectId = obj2;
+                    getData(true);
+                }
+            });
+        }
+        mCourseGroupFilterView.setData(statusList, subjectBeanList);
+        ViewGroup parent = (ViewGroup) mCourseGroupFilterView.getParent();
+        if (parent != null) {
+            parent.removeView(mCourseGroupFilterView);
+        }
+        mPopupWindow = PopupUtil.showInDropWrapNObg(getContext(), mCourseGroupFilterView, mViewBinding.viewTopLine, new PopupUtil.ShowListener() {
+            @Override
+            public void onShow(View view, PopupWindow popupWindow) {
+                UiUtils.refreshFilterTextStyle(true, mViewBinding.tvFilter);
+            }
+        });
+        mPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                UiUtils.refreshFilterTextStyle(false, mViewBinding.tvFilter);
+            }
+        });
+    }
+
+
+    @Override
+    public void onResume() {
+        super.onResume();
+    }
+
+
+    private void checkHasNext(int dataSize) {
+        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+        mViewBinding.refreshLayout.setNoMoreData(!hasNext);
+    }
+
+    @Override
+    public void onGetCourseGroupSuccess(int page, VIPCourseGroupListBean dataList) {
+        if (isDetached()) {
+            return;
+        }
+        LOG.i("pq", "onGetCourseGroupSuccess:" + dataList);
+        if (dataList != null) {
+            if (page == 1) {
+                //第一页
+                mViewBinding.refreshLayout.finishRefresh();
+                if (mAdapter != null) {
+                    mAdapter.getData().clear();
+                    mAdapter.notifyDataSetChanged();
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.setNewInstance(dataList.getRows());
+                    }
+                }
+            } else {
+                //加载更多
+                if (mAdapter != null) {
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        mViewBinding.refreshLayout.finishLoadMore();
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.addData(dataList.getRows());
+                    } else {
+                        mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onGetCourseGroupError(int page) {
+        if (isDetached()) {
+            return;
+        }
+        if (page == 1) {
+            mViewBinding.refreshLayout.finishRefresh();
+        } else {
+            if (mAdapter != null) {
+                currentPage--;
+                mViewBinding.refreshLayout.finishLoadMore(false);
+            }
+        }
+    }
+
+    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+        subjectBeanList.clear();
+        subjectBeanList.add(new QuerySubjectBean("全部", ""));
+        subjectBeanList.addAll(data);
+    }
+}

+ 3 - 3
student/src/main/java/com/cooleshow/student/ui/course/PianoRoomCourseFragment.java

@@ -49,7 +49,7 @@ public class PianoRoomCourseFragment extends BaseMVPFragment<FragmentPianoRoomCo
     private String currentCourseFilterStatus = CourseConstants.COURSE_FILTER_ALL;
     private String currentFilterDate;
     private Date currentSelectDate;
-    private int currentSubjectId;
+    private String currentSubjectId;
     private int currentPage;
     private boolean hasNext = true;
     private PianoRoomCourseListAdapter mAdapter;
@@ -303,7 +303,7 @@ public class PianoRoomCourseFragment extends BaseMVPFragment<FragmentPianoRoomCo
         if (v.getId() == R.id.tv_agency) {
             //选择声部
             if (subjectBeanList.size() == 0) {
-                subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+                subjectBeanList.add(new QuerySubjectBean("全部声部", ""));
             }
             List<PopMenuBean> popList = new ArrayList<>();
             for (QuerySubjectBean bean : subjectBeanList) {
@@ -335,7 +335,7 @@ public class PianoRoomCourseFragment extends BaseMVPFragment<FragmentPianoRoomCo
 
     public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
         subjectBeanList.clear();
-        subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+        subjectBeanList.add(new QuerySubjectBean("全部声部", ""));
         subjectBeanList.addAll(data);
     }
 }

+ 249 - 0
student/src/main/java/com/cooleshow/student/ui/course/VIPCourseGroupFragment.java

@@ -0,0 +1,249 @@
+package com.cooleshow.student.ui.course;
+
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.PopupWindow;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.constanst.CourseGroupStatusType;
+import com.cooleshow.base.interfaces.IFilterViewData;
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.PopupUtil;
+import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.widgets.CourseGroupFilterView;
+import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.VIPCourseAdapter;
+import com.cooleshow.student.bean.QuerySubjectBean;
+import com.cooleshow.student.bean.VIPCourseGroupListBean;
+import com.cooleshow.student.contract.VipCourseGroupContract;
+import com.cooleshow.student.databinding.FgVipCourseLayoutBinding;
+import com.cooleshow.student.presenter.course.VipCourseGroupPresenter;
+import com.scwang.smart.refresh.footer.ClassicsFooter;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+/**
+ * Author by pq, Date on 2022/5/9.
+ * 我的课程-VIP课课程组
+ */
+public class VIPCourseGroupFragment extends BaseMVPFragment<FgVipCourseLayoutBinding, VipCourseGroupPresenter> implements VipCourseGroupContract.View, View.OnClickListener {
+    private List<IFilterViewData> subjectBeanList = new ArrayList<>();//声部筛选
+    private VIPCourseAdapter mAdapter;
+    private int currentPage = 1;
+    private boolean hasNext = true;
+    private String status = "";
+    private String currentSubjectId;
+    private String searchCondition;
+    private CourseGroupFilterView mCourseGroupFilterView;
+    private PopupWindow mPopupWindow;
+    private List<IFilterViewData> statusList;//状态筛选
+
+    @Override
+    protected void initView(View rootView) {
+        mViewBinding.refreshLayout.setRefreshFooter(new ClassicsFooter(getContext()));
+        LinearLayoutManager manager = new LinearLayoutManager(getContext());
+        mViewBinding.recyclerViewList.setLayoutManager(manager);
+        mAdapter = new VIPCourseAdapter();
+        EmptyViewLayout mEmptyView = new EmptyViewLayout(getContext());
+        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程");
+        mAdapter.setEmptyView(mEmptyView);
+        mViewBinding.recyclerViewList.setAdapter(mAdapter);
+    }
+
+
+    @Override
+    protected void initData() {
+        CourseGroupStatusType[] values = CourseGroupStatusType.values();
+        List<CourseGroupStatusType> courseGroupStatusTypes = Arrays.asList(values);
+        statusList = new ArrayList<IFilterViewData>(courseGroupStatusTypes);
+
+
+        initListener();
+        getData(true);
+    }
+
+    private void initListener() {
+        mViewBinding.tvFilter.setOnClickListener(this);
+        mViewBinding.tvSearch.setOnClickListener(this);
+        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                currentPage = 1;
+                getData(false);
+            }
+        });
+        mViewBinding.refreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                //上拉加载
+                if (hasNext) {
+                    currentPage++;
+                    getData(false);
+                } else {
+                    mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                }
+            }
+        });
+
+        mAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                //课程详情页
+            }
+        });
+    }
+
+    private void getData(boolean isLoading) {
+        if (currentPage == 1) {
+            mViewBinding.refreshLayout.resetNoMoreData();
+        }
+        presenter.queryVIPCourseGroup(isLoading, status, currentSubjectId, searchCondition, currentPage);
+    }
+
+    @Override
+    protected FgVipCourseLayoutBinding getLayoutView() {
+        return FgVipCourseLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected VipCourseGroupPresenter createPresenter() {
+        return new VipCourseGroupPresenter();
+    }
+
+    @Override
+    public void onClick(View view) {
+        int id = view.getId();
+        if (id == R.id.tv_filter) {
+            showFilterView();
+            return;
+        }
+
+        if (id == R.id.tv_search) {
+            currentPage = 1;
+            searchCondition = mViewBinding.etTargetName.getText().toString().trim();
+            getData(false);
+            return;
+        }
+    }
+
+
+    private void showFilterView() {
+        if (mCourseGroupFilterView == null) {
+            mCourseGroupFilterView = new CourseGroupFilterView(getContext());
+            mCourseGroupFilterView.setOnEventListener(new CourseGroupFilterView.OnEventListener() {
+                @Override
+                public void onDismiss() {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                }
+
+                @Override
+                public void onQuery(String obj, String obj2) {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                    currentPage = 1;
+                    VIPCourseGroupFragment.this.status = obj;
+                    VIPCourseGroupFragment.this.currentSubjectId = obj2;
+                    getData(true);
+                }
+            });
+        }
+        mCourseGroupFilterView.setData(statusList, subjectBeanList);
+        ViewGroup parent = (ViewGroup) mCourseGroupFilterView.getParent();
+        if (parent != null) {
+            parent.removeView(mCourseGroupFilterView);
+        }
+        mPopupWindow = PopupUtil.showInDropWrapNObg(getContext(), mCourseGroupFilterView, mViewBinding.viewTopLine, new PopupUtil.ShowListener() {
+            @Override
+            public void onShow(View view, PopupWindow popupWindow) {
+                UiUtils.refreshFilterTextStyle(true, mViewBinding.tvFilter);
+            }
+        });
+        mPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                UiUtils.refreshFilterTextStyle(false, mViewBinding.tvFilter);
+            }
+        });
+    }
+
+
+    @Override
+    public void onResume() {
+        super.onResume();
+    }
+
+
+    private void checkHasNext(int dataSize) {
+        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+        mViewBinding.refreshLayout.setNoMoreData(!hasNext);
+    }
+
+    @Override
+    public void onGetCourseGroupSuccess(int page, VIPCourseGroupListBean dataList) {
+        if (isDetached()) {
+            return;
+        }
+        LOG.i("pq", "onGetCourseGroupSuccess:" + dataList);
+        if (dataList != null) {
+            if (page == 1) {
+                //第一页
+                mViewBinding.refreshLayout.finishRefresh();
+                if (mAdapter != null) {
+                    mAdapter.getData().clear();
+                    mAdapter.notifyDataSetChanged();
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.setNewInstance(dataList.getRows());
+                    }
+                }
+            } else {
+                //加载更多
+                if (mAdapter != null) {
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        mViewBinding.refreshLayout.finishLoadMore();
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.addData(dataList.getRows());
+                    } else {
+                        mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onGetCourseGroupError(int page) {
+        if (isDetached()) {
+            return;
+        }
+        if (page == 1) {
+            mViewBinding.refreshLayout.finishRefresh();
+        } else {
+            if (mAdapter != null) {
+                currentPage--;
+                mViewBinding.refreshLayout.finishLoadMore(false);
+            }
+        }
+    }
+
+    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+        subjectBeanList.clear();
+        subjectBeanList.add(new QuerySubjectBean("全部", ""));
+        subjectBeanList.addAll(data);
+    }
+}

+ 300 - 300
student/src/main/java/com/cooleshow/student/ui/course/VideoCourseFragment.java

@@ -1,300 +1,300 @@
-package com.cooleshow.student.ui.course;
-
-import android.graphics.Color;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.PopupWindow;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.GridLayoutManager;
-
-import com.alibaba.android.arouter.launcher.ARouter;
-import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
-import com.bigkoo.pickerview.listener.CustomListener;
-import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
-import com.bigkoo.pickerview.view.OptionsPickerView;
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.listener.OnItemClickListener;
-import com.chad.library.adapter.base.listener.OnLoadMoreListener;
-import com.cooleshow.base.common.WebConstants;
-import com.cooleshow.base.constanst.Constants;
-import com.cooleshow.base.router.RouterPath;
-import com.cooleshow.base.ui.fragment.BaseMVPFragment;
-import com.cooleshow.base.utils.LogUtils;
-import com.cooleshow.base.utils.SizeUtils;
-import com.cooleshow.base.utils.UiUtils;
-import com.cooleshow.base.utils.helper.QMUIDeviceHelper;
-import com.cooleshow.base.widgets.EmptyViewLayout;
-import com.cooleshow.base.widgets.poplist.PopMenuBean;
-import com.cooleshow.base.widgets.poplist.PopupListWindow;
-import com.cooleshow.student.R;
-import com.cooleshow.student.adapter.CourseStatusFilterAdapter;
-import com.cooleshow.student.adapter.VideoCourseListAdapter;
-import com.cooleshow.student.bean.QuerySubjectBean;
-import com.cooleshow.student.bean.SelectMyGroupBean;
-import com.cooleshow.student.constants.CourseConstants;
-import com.cooleshow.student.contract.VideoCourseContract;
-import com.cooleshow.student.databinding.FragmentVideoCourseLayoutBinding;
-import com.cooleshow.student.presenter.course.VideoCoursePresenter;
-import com.cooleshow.student.wxapi.VideoCourseListItemDecoration;
-import com.cooleshow.usercenter.helper.UserHelper;
-import com.scwang.smart.refresh.layout.api.RefreshLayout;
-import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Author by pq, Date on 2022/4/25.
- */
-public class VideoCourseFragment extends BaseMVPFragment<FragmentVideoCourseLayoutBinding, VideoCoursePresenter> implements VideoCourseContract.VideoCourseView, View.OnClickListener {
-    private int currentSubjectId;
-    private int currentPage;
-    private VideoCourseListAdapter mAdapter;
-    private EmptyViewLayout mEmptyView;
-    private boolean hasNext = true;
-    private boolean isFirstLoad = true;
-    private List<QuerySubjectBean> subjectBeanList = new ArrayList<>();
-    private OptionsPickerView pvOptions;
-
-    public static VideoCourseFragment newInstance() {
-        VideoCourseFragment fragment = new VideoCourseFragment();
-        return fragment;
-    }
-
-    @Override
-    protected FragmentVideoCourseLayoutBinding getLayoutView() {
-        return FragmentVideoCourseLayoutBinding.inflate(getLayoutInflater());
-    }
-
-    @Override
-    protected VideoCoursePresenter createPresenter() {
-        return new VideoCoursePresenter();
-    }
-
-    @Override
-    protected void initView(View rootView) {
-        mViewBinding.tvSubject.setOnClickListener(this);
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (isFirstLoad) {
-            isFirstLoad = false;
-            reBuildFilter();
-        }
-    }
-
-    @Override
-    public void refreshData() {
-        super.refreshData();
-        reBuildFilter();
-        isFirstLoad = false;
-    }
-
-    private void reBuildFilter() {
-        currentPage = 1;
-        queryCourse(true);
-    }
-
-
-    @Override
-    protected void initData() {
-        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> refresh());
-
-        mAdapter = new VideoCourseListAdapter(R.layout.item_video_course_list_layout);
-        mAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
-            //上拉加载
-            if (hasNext) {
-                loadMore();
-            } else {
-                mAdapter.getLoadMoreModule().loadMoreEnd();
-            }
-        });
-        mAdapter.getLoadMoreModule().setAutoLoadMore(true);
-        //当自动加载开启,同时数据不满一屏时,是否继续执行自动加载更多(默认为true)
-        mAdapter.getLoadMoreModule().setEnableLoadMoreIfNotFullPage(false);
-
-
-        int count = QMUIDeviceHelper.isTablet(getContext()) ? 3 : 2;
-        GridLayoutManager gridLayoutManager = new GridLayoutManager(requireContext(), count);
-        gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
-            @Override
-            public int getSpanSize(int position) {
-                int itemViewType = mAdapter.getItemViewType(position);
-                if (itemViewType == BaseQuickAdapter.LOAD_MORE_VIEW) {
-                    return count;
-                }
-                return 1;
-            }
-        });
-        VideoCourseListItemDecoration itemDecoration = new VideoCourseListItemDecoration(0, SizeUtils.dp2px(11), 0, SizeUtils.dp2px(11), SizeUtils.dp2px(5.5f));
-        mViewBinding.recyclerView.addItemDecoration(itemDecoration);
-        mViewBinding.recyclerView.setLayoutManager(gridLayoutManager);
-        mViewBinding.recyclerView.setAdapter(mAdapter);
-        mAdapter.setOnItemClickListener((adapter, view, position) -> {
-            SelectMyGroupBean.RowsBean item = (SelectMyGroupBean.RowsBean) adapter.getItem(position);
-            ARouter.getInstance()
-                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_VIDEO_DETAIL + "?groupId=" + item.id)
-                    .navigation();
-        });
-    }
-
-
-    /**
-     * 刷新
-     */
-    private void refresh() {
-        // 这里的作用是防止下拉刷新的时候还可以上拉加载
-        mAdapter.getLoadMoreModule().setEnableLoadMore(false);
-        // 下拉刷新,需要重置页数
-        currentPage = 1;
-        queryCourse(true);
-    }
-
-    private void loadMore() {
-        currentPage++;
-        queryCourse(false);
-    }
-
-    private void queryCourse(boolean isShowLoading) {
-        //根据默认筛选条件查询
-        LogUtils.i("pq", "currentSubjectId:" + currentSubjectId);
-        LogUtils.i("pq", "currentPage:" + currentPage);
-        presenter.queryVideoCourse(isShowLoading, UserHelper.getUserId(), currentSubjectId, currentPage);
-    }
-
-    private void checkHasNext(int dataSize) {
-        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
-    }
-
-
-    @Override
-    public void onGetVideoCourseSuccess(int page, SelectMyGroupBean liveCourseListBean) {
-        if (isDetached()) {
-            return;
-        }
-        if (liveCourseListBean != null) {
-            mViewBinding.refreshLayout.finishRefresh();
-            mAdapter.getLoadMoreModule().setEnableLoadMore(true);
-            if (page == 1) {
-                //第一页
-                if (mAdapter != null) {
-                    mAdapter.getData().clear();
-                    mAdapter.notifyDataSetChanged();
-                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
-                        checkHasNext(liveCourseListBean.rows.size());
-                        mAdapter.setNewInstance(liveCourseListBean.rows);
-                    } else {
-                        showEmptyView();
-                    }
-                }
-            } else {
-                //加载更多
-                if (mAdapter != null) {
-                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
-                        checkHasNext(liveCourseListBean.rows.size());
-                        mAdapter.addData(liveCourseListBean.rows);
-                        mAdapter.getLoadMoreModule().loadMoreComplete();
-                    } else {
-                        mAdapter.getLoadMoreModule().loadMoreEnd();
-                    }
-                }
-            }
-        }
-    }
-
-    @Override
-    public void onGetCourseError(int page) {
-        if (isDetached()) {
-            return;
-        }
-        if (page == 1) {
-            mViewBinding.refreshLayout.finishRefresh();
-        } else {
-            if (mAdapter != null) {
-                currentPage--;
-                mAdapter.getLoadMoreModule().setEnableLoadMore(true);
-                mAdapter.getLoadMoreModule().loadMoreFail();
-            }
-        }
-    }
-
-    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
-        subjectBeanList.clear();
-        subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
-        subjectBeanList.addAll(data);
-    }
-
-    private void showEmptyView() {
-        if (mEmptyView == null) {
-            mEmptyView = new EmptyViewLayout(getContext());
-        }
-        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程~");
-        mAdapter.setEmptyView(mEmptyView);
-    }
-
-
-    @Override
-    public void onClick(View v) {
-        if (v.getId() == R.id.tv_subject) {
-            if (subjectBeanList.size() == 0) {
-                subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
-            }
-            List<PopMenuBean> popList = new ArrayList<>();
-            for (QuerySubjectBean bean : subjectBeanList) {
-                PopMenuBean popMenuBean = new PopMenuBean();
-                popMenuBean.setActionName(bean.name);
-                popList.add(popMenuBean);
-            }
-            initCoursePop(mViewBinding.tvSubject, popList, position -> {
-                QuerySubjectBean bean = subjectBeanList.get(position);
-                currentSubjectId = bean.id;
-                mViewBinding.tvSubject.setText(bean.name);
-                queryCourse(true);
-            });
-        }
-    }
-
-    private void initCoursePop(TextView targetView, List<PopMenuBean> popList, PopupListWindow.PopupListListener listener) {
-        PopupListWindow popWindow = new PopupListWindow(getContext());
-        popWindow.showListPop(targetView, popList, position -> listener.onPopupListClick(position));
-        UiUtils.refreshFilterTextStyle2(true, targetView);
-        popWindow.getPopupWindow().setOnDismissListener(new PopupWindow.OnDismissListener() {
-            @Override
-            public void onDismiss() {
-                UiUtils.refreshFilterTextStyle2(false, targetView);
-            }
-        });
-
-    }
-
-    private void selectSubject() {
-        if (subjectBeanList.size() == 0) {
-            subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
-        }
-        pvOptions = new OptionsPickerBuilder(getContext(), (options1, options2, options3, v) -> {
-            currentSubjectId = subjectBeanList.get(options1).id;
-            mViewBinding.tvSubject.setText(subjectBeanList.get(options1).name);
-            queryCourse(true);
-        }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_address_layout, v -> {
-                    //自定义布局中的控件初始化及事件处理
-                    final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
-                    TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
-                    tvSubmit.setOnClickListener(v12 -> {
-                        pvOptions.returnData();
-                        pvOptions.dismiss();
-                    });
-                    ivCancel.setOnClickListener(v1 -> pvOptions.dismiss());
-
-                }).setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
-                .setDividerColor(Color.TRANSPARENT)
-                .setBgColor(Color.TRANSPARENT).isDialog(false)
-                .build();
-        pvOptions.setPicker(subjectBeanList);
-        pvOptions.show();
-    }
-}
+//package com.cooleshow.student.ui.course;
+//
+//import android.graphics.Color;
+//import android.view.View;
+//import android.widget.ImageView;
+//import android.widget.PopupWindow;
+//import android.widget.TextView;
+//
+//import androidx.annotation.NonNull;
+//import androidx.recyclerview.widget.GridLayoutManager;
+//
+//import com.alibaba.android.arouter.launcher.ARouter;
+//import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
+//import com.bigkoo.pickerview.listener.CustomListener;
+//import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
+//import com.bigkoo.pickerview.view.OptionsPickerView;
+//import com.chad.library.adapter.base.BaseQuickAdapter;
+//import com.chad.library.adapter.base.listener.OnItemClickListener;
+//import com.chad.library.adapter.base.listener.OnLoadMoreListener;
+//import com.cooleshow.base.common.WebConstants;
+//import com.cooleshow.base.constanst.Constants;
+//import com.cooleshow.base.router.RouterPath;
+//import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+//import com.cooleshow.base.utils.LogUtils;
+//import com.cooleshow.base.utils.SizeUtils;
+//import com.cooleshow.base.utils.UiUtils;
+//import com.cooleshow.base.utils.helper.QMUIDeviceHelper;
+//import com.cooleshow.base.widgets.EmptyViewLayout;
+//import com.cooleshow.base.widgets.poplist.PopMenuBean;
+//import com.cooleshow.base.widgets.poplist.PopupListWindow;
+//import com.cooleshow.student.R;
+//import com.cooleshow.student.adapter.CourseStatusFilterAdapter;
+//import com.cooleshow.student.adapter.VideoCourseListAdapter;
+//import com.cooleshow.student.bean.QuerySubjectBean;
+//import com.cooleshow.student.bean.SelectMyGroupBean;
+//import com.cooleshow.student.constants.CourseConstants;
+//import com.cooleshow.student.contract.VideoCourseContract;
+//import com.cooleshow.student.databinding.FragmentVideoCourseLayoutBinding;
+//import com.cooleshow.student.presenter.course.VideoCoursePresenter;
+//import com.cooleshow.student.wxapi.VideoCourseListItemDecoration;
+//import com.cooleshow.usercenter.helper.UserHelper;
+//import com.scwang.smart.refresh.layout.api.RefreshLayout;
+//import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+//
+//import java.util.ArrayList;
+//import java.util.List;
+//
+///**
+// * Author by pq, Date on 2022/4/25.
+// */
+//public class VideoCourseFragment extends BaseMVPFragment<FragmentVideoCourseLayoutBinding, VideoCoursePresenter> implements VideoCourseContract.VideoCourseView, View.OnClickListener {
+//    private int currentSubjectId;
+//    private int currentPage;
+//    private VideoCourseListAdapter mAdapter;
+//    private EmptyViewLayout mEmptyView;
+//    private boolean hasNext = true;
+//    private boolean isFirstLoad = true;
+//    private List<QuerySubjectBean> subjectBeanList = new ArrayList<>();
+//    private OptionsPickerView pvOptions;
+//
+//    public static VideoCourseFragment newInstance() {
+//        VideoCourseFragment fragment = new VideoCourseFragment();
+//        return fragment;
+//    }
+//
+//    @Override
+//    protected FragmentVideoCourseLayoutBinding getLayoutView() {
+//        return FragmentVideoCourseLayoutBinding.inflate(getLayoutInflater());
+//    }
+//
+//    @Override
+//    protected VideoCoursePresenter createPresenter() {
+//        return new VideoCoursePresenter();
+//    }
+//
+//    @Override
+//    protected void initView(View rootView) {
+//        mViewBinding.tvSubject.setOnClickListener(this);
+//    }
+//
+//    @Override
+//    public void onResume() {
+//        super.onResume();
+//        if (isFirstLoad) {
+//            isFirstLoad = false;
+//            reBuildFilter();
+//        }
+//    }
+//
+//    @Override
+//    public void refreshData() {
+//        super.refreshData();
+//        reBuildFilter();
+//        isFirstLoad = false;
+//    }
+//
+//    private void reBuildFilter() {
+//        currentPage = 1;
+//        queryCourse(true);
+//    }
+//
+//
+//    @Override
+//    protected void initData() {
+//        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> refresh());
+//
+//        mAdapter = new VideoCourseListAdapter();
+//        mAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
+//            //上拉加载
+//            if (hasNext) {
+//                loadMore();
+//            } else {
+//                mAdapter.getLoadMoreModule().loadMoreEnd();
+//            }
+//        });
+//        mAdapter.getLoadMoreModule().setAutoLoadMore(true);
+//        //当自动加载开启,同时数据不满一屏时,是否继续执行自动加载更多(默认为true)
+//        mAdapter.getLoadMoreModule().setEnableLoadMoreIfNotFullPage(false);
+//
+//
+//        int count = QMUIDeviceHelper.isTablet(getContext()) ? 3 : 2;
+//        GridLayoutManager gridLayoutManager = new GridLayoutManager(requireContext(), count);
+//        gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
+//            @Override
+//            public int getSpanSize(int position) {
+//                int itemViewType = mAdapter.getItemViewType(position);
+//                if (itemViewType == BaseQuickAdapter.LOAD_MORE_VIEW) {
+//                    return count;
+//                }
+//                return 1;
+//            }
+//        });
+//        VideoCourseListItemDecoration itemDecoration = new VideoCourseListItemDecoration(0, SizeUtils.dp2px(11), 0, SizeUtils.dp2px(11), SizeUtils.dp2px(5.5f));
+//        mViewBinding.recyclerView.addItemDecoration(itemDecoration);
+//        mViewBinding.recyclerView.setLayoutManager(gridLayoutManager);
+//        mViewBinding.recyclerView.setAdapter(mAdapter);
+//        mAdapter.setOnItemClickListener((adapter, view, position) -> {
+//            SelectMyGroupBean.RowsBean item = (SelectMyGroupBean.RowsBean) adapter.getItem(position);
+//            ARouter.getInstance()
+//                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+//                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_VIDEO_DETAIL + "?groupId=" + item.id)
+//                    .navigation();
+//        });
+//    }
+//
+//
+//    /**
+//     * 刷新
+//     */
+//    private void refresh() {
+//        // 这里的作用是防止下拉刷新的时候还可以上拉加载
+//        mAdapter.getLoadMoreModule().setEnableLoadMore(false);
+//        // 下拉刷新,需要重置页数
+//        currentPage = 1;
+//        queryCourse(true);
+//    }
+//
+//    private void loadMore() {
+//        currentPage++;
+//        queryCourse(false);
+//    }
+//
+//    private void queryCourse(boolean isShowLoading) {
+//        //根据默认筛选条件查询
+//        LogUtils.i("pq", "currentSubjectId:" + currentSubjectId);
+//        LogUtils.i("pq", "currentPage:" + currentPage);
+//        presenter.queryVideoCourse(isShowLoading, UserHelper.getUserId(), currentSubjectId, currentPage);
+//    }
+//
+//    private void checkHasNext(int dataSize) {
+//        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+//    }
+//
+//
+//    @Override
+//    public void onGetVideoCourseSuccess(int page, SelectMyGroupBean liveCourseListBean) {
+//        if (isDetached()) {
+//            return;
+//        }
+//        if (liveCourseListBean != null) {
+//            mViewBinding.refreshLayout.finishRefresh();
+//            mAdapter.getLoadMoreModule().setEnableLoadMore(true);
+//            if (page == 1) {
+//                //第一页
+//                if (mAdapter != null) {
+//                    mAdapter.getData().clear();
+//                    mAdapter.notifyDataSetChanged();
+//                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
+//                        checkHasNext(liveCourseListBean.rows.size());
+//                        mAdapter.setNewInstance(liveCourseListBean.rows);
+//                    } else {
+//                        showEmptyView();
+//                    }
+//                }
+//            } else {
+//                //加载更多
+//                if (mAdapter != null) {
+//                    if (liveCourseListBean.rows != null && liveCourseListBean.rows.size() > 0) {
+//                        checkHasNext(liveCourseListBean.rows.size());
+//                        mAdapter.addData(liveCourseListBean.rows);
+//                        mAdapter.getLoadMoreModule().loadMoreComplete();
+//                    } else {
+//                        mAdapter.getLoadMoreModule().loadMoreEnd();
+//                    }
+//                }
+//            }
+//        }
+//    }
+//
+//    @Override
+//    public void onGetCourseError(int page) {
+//        if (isDetached()) {
+//            return;
+//        }
+//        if (page == 1) {
+//            mViewBinding.refreshLayout.finishRefresh();
+//        } else {
+//            if (mAdapter != null) {
+//                currentPage--;
+//                mAdapter.getLoadMoreModule().setEnableLoadMore(true);
+//                mAdapter.getLoadMoreModule().loadMoreFail();
+//            }
+//        }
+//    }
+//
+//    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+//        subjectBeanList.clear();
+//        subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+//        subjectBeanList.addAll(data);
+//    }
+//
+//    private void showEmptyView() {
+//        if (mEmptyView == null) {
+//            mEmptyView = new EmptyViewLayout(getContext());
+//        }
+//        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程~");
+//        mAdapter.setEmptyView(mEmptyView);
+//    }
+//
+//
+//    @Override
+//    public void onClick(View v) {
+//        if (v.getId() == R.id.tv_subject) {
+//            if (subjectBeanList.size() == 0) {
+//                subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+//            }
+//            List<PopMenuBean> popList = new ArrayList<>();
+//            for (QuerySubjectBean bean : subjectBeanList) {
+//                PopMenuBean popMenuBean = new PopMenuBean();
+//                popMenuBean.setActionName(bean.name);
+//                popList.add(popMenuBean);
+//            }
+//            initCoursePop(mViewBinding.tvSubject, popList, position -> {
+//                QuerySubjectBean bean = subjectBeanList.get(position);
+//                currentSubjectId = bean.id;
+//                mViewBinding.tvSubject.setText(bean.name);
+//                queryCourse(true);
+//            });
+//        }
+//    }
+//
+//    private void initCoursePop(TextView targetView, List<PopMenuBean> popList, PopupListWindow.PopupListListener listener) {
+//        PopupListWindow popWindow = new PopupListWindow(getContext());
+//        popWindow.showListPop(targetView, popList, position -> listener.onPopupListClick(position));
+//        UiUtils.refreshFilterTextStyle2(true, targetView);
+//        popWindow.getPopupWindow().setOnDismissListener(new PopupWindow.OnDismissListener() {
+//            @Override
+//            public void onDismiss() {
+//                UiUtils.refreshFilterTextStyle2(false, targetView);
+//            }
+//        });
+//
+//    }
+//
+//    private void selectSubject() {
+//        if (subjectBeanList.size() == 0) {
+//            subjectBeanList.add(new QuerySubjectBean("全部声部", 0));
+//        }
+//        pvOptions = new OptionsPickerBuilder(getContext(), (options1, options2, options3, v) -> {
+//            currentSubjectId = subjectBeanList.get(options1).id;
+//            mViewBinding.tvSubject.setText(subjectBeanList.get(options1).name);
+//            queryCourse(true);
+//        }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_address_layout, v -> {
+//                    //自定义布局中的控件初始化及事件处理
+//                    final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
+//                    TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
+//                    tvSubmit.setOnClickListener(v12 -> {
+//                        pvOptions.returnData();
+//                        pvOptions.dismiss();
+//                    });
+//                    ivCancel.setOnClickListener(v1 -> pvOptions.dismiss());
+//
+//                }).setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
+//                .setDividerColor(Color.TRANSPARENT)
+//                .setBgColor(Color.TRANSPARENT).isDialog(false)
+//                .build();
+//        pvOptions.setPicker(subjectBeanList);
+//        pvOptions.show();
+//    }
+//}

+ 262 - 0
student/src/main/java/com/cooleshow/student/ui/course/VideoCourseGroupFragment.java

@@ -0,0 +1,262 @@
+package com.cooleshow.student.ui.course;
+
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.PopupWindow;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.cooleshow.base.common.WebConstants;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.interfaces.IFilterViewData;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.PopupUtil;
+import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.widgets.CourseGroupFilterView;
+import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.student.R;
+import com.cooleshow.student.adapter.VideoCourseListAdapter;
+import com.cooleshow.student.bean.QuerySubjectBean;
+import com.cooleshow.student.bean.SelectMyGroupBean;
+import com.cooleshow.student.bean.VideoCourseListBean;
+import com.cooleshow.student.contract.VideoCourseContract;
+import com.cooleshow.student.databinding.FragmentVideoCourseLayoutBinding;
+import com.cooleshow.student.presenter.course.VideoCoursePresenter;
+import com.scwang.smart.refresh.footer.ClassicsFooter;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+/**
+ * Author by pq, Date on 2022/4/25.
+ */
+public class VideoCourseGroupFragment extends BaseMVPFragment<FragmentVideoCourseLayoutBinding, VideoCoursePresenter> implements VideoCourseContract.VideoCourseView, View.OnClickListener {
+    private String currentSubjectId;
+    private String searchCondition;
+    private int currentPage;
+    private VideoCourseListAdapter mAdapter;
+    private EmptyViewLayout mEmptyView;
+    private List<IFilterViewData> subjectBeanList = new ArrayList<>();
+    private boolean hasNext = true;
+    private CourseGroupFilterView mCourseGroupFilterView;
+    private PopupWindow mPopupWindow;
+
+    @Override
+    protected FragmentVideoCourseLayoutBinding getLayoutView() {
+        return FragmentVideoCourseLayoutBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected VideoCoursePresenter createPresenter() {
+        return new VideoCoursePresenter();
+    }
+
+    @Override
+    protected void initView(View rootView) {
+        mViewBinding.refreshLayout.setRefreshFooter(new ClassicsFooter(getContext()));
+    }
+
+    @Override
+    protected void initData() {
+        mAdapter = new VideoCourseListAdapter();
+        if (mEmptyView == null) {
+            mEmptyView = new EmptyViewLayout(getContext());
+        }
+        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_course, "暂无课程~");
+        mAdapter.setEmptyView(mEmptyView);
+
+        LinearLayoutManager layoutManager = new LinearLayoutManager(requireContext());
+//        VideoCourseListItemDecoration itemDecoration = new VideoCourseListItemDecoration(0, SizeUtils.dp2px(11), 0, SizeUtils.dp2px(11), SizeUtils.dp2px(5.5f));
+//        mViewBinding.recyclerViewList.addItemDecoration(itemDecoration);
+        mViewBinding.recyclerViewList.setLayoutManager(layoutManager);
+        mViewBinding.recyclerViewList.setAdapter(mAdapter);
+        initListener();
+        reBuildFilter(null);
+    }
+
+    private void initListener() {
+        mViewBinding.tvFilter.setOnClickListener(this);
+        mViewBinding.tvSearch.setOnClickListener(this);
+        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                currentPage = 1;
+                getData(false);
+            }
+        });
+        mViewBinding.refreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                //上拉加载
+                if (hasNext) {
+                    currentPage++;
+                    getData(false);
+                } else {
+                    mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                }
+            }
+        });
+        mAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                SelectMyGroupBean.RowsBean item = (SelectMyGroupBean.RowsBean) adapter.getItem(position);
+                ARouter.getInstance()
+                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, WebConstants.TEACHER_VIDEO_DETAIL + "?groupId=" + item.id)
+                        .navigation();
+            }
+        });
+    }
+
+    @Override
+    public void refreshData() {
+        super.refreshData();
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+    }
+
+
+    private void reBuildFilter(String subjectId) {
+        currentPage = 1;
+        currentSubjectId =subjectId;
+        getData(true);
+    }
+
+    private void getData(boolean isShowLoading) {
+        //根据默认筛选条件查询
+        if (currentPage == 1) {
+            mViewBinding.refreshLayout.resetNoMoreData();
+        }
+        presenter.queryVideoCourse(isShowLoading, currentSubjectId, searchCondition,currentPage);
+    }
+
+    private void checkHasNext(int dataSize) {
+        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+        mViewBinding.refreshLayout.setNoMoreData(!hasNext);
+    }
+
+
+    @Override
+    public void onGetVideoCourseSuccess(int page, SelectMyGroupBean dataList) {
+        if (isDetached()) {
+            return;
+        }
+        LOG.i("pq", "interest queryGroupNoticeSuccess:" + dataList);
+        if (dataList != null) {
+            if (page == 1) {
+                //第一页
+                mViewBinding.refreshLayout.finishRefresh();
+                if (mAdapter != null) {
+                    mAdapter.getData().clear();
+                    mAdapter.notifyDataSetChanged();
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        checkHasNext(dataList.getRows().size());
+                        mAdapter.setNewInstance(dataList.getRows());
+                    }
+                }
+            } else {
+                //加载更多
+                if (mAdapter != null) {
+                    if (dataList.getRows() != null && dataList.getRows().size() > 0) {
+                        mViewBinding.refreshLayout.finishLoadMore();
+                        mAdapter.addData(dataList.getRows());
+                        checkHasNext(dataList.getRows().size());
+                    } else {
+                        mViewBinding.refreshLayout.finishLoadMoreWithNoMoreData();
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onGetCourseError(int page) {
+        if (isDetached()) {
+            return;
+        }
+        if (page == 1) {
+            mViewBinding.refreshLayout.finishRefresh();
+        } else {
+            if (mAdapter != null) {
+                currentPage--;
+                mViewBinding.refreshLayout.finishLoadMore(false);
+            }
+        }
+    }
+
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.tv_filter) {
+            //筛选
+            showFilterView();
+            return;
+        }
+
+        if (id == R.id.tv_search) {
+            currentPage = 1;
+            searchCondition = mViewBinding.etTargetName.getText().toString().trim();
+            getData(false);
+            return;
+        }
+    }
+
+    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+        subjectBeanList.clear();
+        subjectBeanList.add(new QuerySubjectBean("全部", ""));
+        subjectBeanList.addAll(data);
+    }
+
+    private void showFilterView() {
+        if (mCourseGroupFilterView == null) {
+            mCourseGroupFilterView = new CourseGroupFilterView(getContext());
+            mCourseGroupFilterView.setOnEventListener(new CourseGroupFilterView.OnEventListener() {
+                @Override
+                public void onDismiss() {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                }
+
+                @Override
+                public void onQuery(String obj, String obj2) {
+                    if (mPopupWindow != null) {
+                        mPopupWindow.dismiss();
+                    }
+                    currentPage = 1;
+                    reBuildFilter(obj2);
+                }
+            });
+        }
+        mCourseGroupFilterView.setData(null, subjectBeanList);
+        ViewGroup parent = (ViewGroup) mCourseGroupFilterView.getParent();
+        if (parent != null) {
+            parent.removeView(mCourseGroupFilterView);
+        }
+        mPopupWindow = PopupUtil.showInDropWrapNObg(getContext(), mCourseGroupFilterView, mViewBinding.viewTopLine, new PopupUtil.ShowListener() {
+            @Override
+            public void onShow(View view, PopupWindow popupWindow) {
+                UiUtils.refreshFilterTextStyle(true, mViewBinding.tvFilter);
+            }
+        });
+        mPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                UiUtils.refreshFilterTextStyle(false, mViewBinding.tvFilter);
+            }
+        });
+    }
+}

BIN
student/src/main/res/drawable-xhdpi/icon_piano_room_course.png


BIN
student/src/main/res/drawable-xhdpi/icon_question_mark.png


BIN
student/src/main/res/drawable-xxhdpi/icon_piano_room_course.png


BIN
student/src/main/res/drawable-xxhdpi/icon_question_mark.png


+ 48 - 30
student/src/main/res/layout/activity_mine_course.xml

@@ -1,39 +1,57 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/color_f6f8f9"
-    android:orientation="vertical">
+    android:layout_height="match_parent">
 
-    <include
-        android:id="@+id/toolbar_include"
-        layout="@layout/common_toolbar_layout" />
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:src="@drawable/bg_appointment_top"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
 
-    <com.google.android.material.tabs.TabLayout
-        android:id="@+id/tablayout"
-        android:background="@color/white"
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_44"
-        android:scrollbars="none"
-        app:tabBackground="@null"
-        app:tabGravity="fill"
-        app:tabIndicator="@drawable/tab_indicator"
-        app:tabIndicatorColor="@color/color_2dc7aa"
-        app:tabIndicatorFullWidth="false"
-        app:tabIndicatorHeight="4dp"
-        app:tabMode="fixed"
-        app:tabRippleColor="@null"
-        app:tabSelectedTextColor="@color/black_333"
-        app:tabTextAppearance="@style/tab_layout_style"
-        app:tabTextColor="@color/color_666666" />
+        android:layout_height="match_parent"
+        android:orientation="vertical">
 
+        <include
+            android:id="@+id/toolbar_include"
+            layout="@layout/common_toolbar_layout" />
 
+        <com.google.android.material.tabs.TabLayout
+            android:id="@+id/tablayout"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_44"
+            android:scrollbars="none"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/toolbar_include"
+            app:tabBackground="@null"
+            app:tabGravity="fill"
+            app:tabIndicator="@drawable/tab_indicator"
+            app:tabIndicatorColor="@color/color_2dc7aa"
+            app:tabIndicatorFullWidth="false"
+            app:tabIndicatorHeight="4dp"
+            app:tabMode="scrollable"
+            app:tabRippleColor="@null"
+            app:tabPaddingEnd="0dp"
+            app:tabPaddingStart="0dp"
+            app:tabSelectedTextColor="@color/black_333"
+            app:tabTextAppearance="@style/tab_layout_style"
+            app:tabTextColor="@color/color_666666" />
 
-    <androidx.viewpager2.widget.ViewPager2
-        android:id="@+id/viewpager"
-        android:layout_width="match_parent"
-        android:overScrollMode="never"
-        android:layout_height="0dp"
-        android:layout_weight="1" />
-</LinearLayout>
+        <androidx.viewpager2.widget.ViewPager2
+            android:id="@+id/view_pager"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tablayout" />
+    </LinearLayout>
+</FrameLayout>

+ 112 - 0
student/src/main/res/layout/fg_interest_course_layout.xml

@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:paddingTop="10dp"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:id="@+id/tv_filter"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
+        android:drawableRight="@drawable/icon_arrow_down"
+        android:drawablePadding="6dp"
+        android:ellipsize="end"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:maxLength="6"
+        android:maxLines="1"
+        android:paddingStart="13dp"
+        android:paddingEnd="8dp"
+        android:text="筛选"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:id="@+id/view_search_bg"
+        android:layout_width="0dp"
+        android:layout_height="34dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintLeft_toRightOf="@+id/tv_filter"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:src="@drawable/icon_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <com.cooleshow.base.widgets.ClearEditText
+        android:id="@+id/et_target_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:background="@null"
+        android:ellipsize="end"
+        android:hint="请输入搜索关键词"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:paddingStart="8dp"
+        android:textColorHint="@color/color_66000000"
+        android:textColor="@color/color_333333"
+        android:textCursorDrawable="@drawable/shape_2dc7aa_1dp"
+        android:textSize="@dimen/sp_14"
+        android:theme="@style/MyEditText"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintRight_toLeftOf="@+id/tv_search"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <TextView
+        android:id="@+id/tv_search"
+        android:layout_width="56dp"
+        android:layout_height="28dp"
+        android:layout_marginEnd="3dp"
+        android:background="@drawable/shape_1ecdac_18dp"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:text="搜索"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintRight_toRightOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:layout_marginTop="12dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_search_bg"
+        android:id="@+id/view_top_line"
+        android:layout_width="match_parent"
+        android:layout_height="1px"/>
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_top_line"
+        app:srlEnableLoadMore="true">
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/recyclerView_list"
+            android:layout_marginEnd="14dp"
+            android:layout_marginStart="14dp"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none" />
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 112 - 0
student/src/main/res/layout/fg_piano_course_group_layout.xml

@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:paddingTop="10dp"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:id="@+id/tv_filter"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
+        android:drawableRight="@drawable/icon_arrow_down"
+        android:drawablePadding="6dp"
+        android:ellipsize="end"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:maxLength="6"
+        android:maxLines="1"
+        android:paddingStart="13dp"
+        android:paddingEnd="8dp"
+        android:text="筛选"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:id="@+id/view_search_bg"
+        android:layout_width="0dp"
+        android:layout_height="34dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintLeft_toRightOf="@+id/tv_filter"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:src="@drawable/icon_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <com.cooleshow.base.widgets.ClearEditText
+        android:id="@+id/et_target_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:background="@null"
+        android:ellipsize="end"
+        android:hint="请输入搜索关键词"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:paddingStart="8dp"
+        android:textColorHint="@color/color_66000000"
+        android:textColor="@color/color_333333"
+        android:textCursorDrawable="@drawable/shape_2dc7aa_1dp"
+        android:textSize="@dimen/sp_14"
+        android:theme="@style/MyEditText"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintRight_toLeftOf="@+id/tv_search"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <TextView
+        android:id="@+id/tv_search"
+        android:layout_width="56dp"
+        android:layout_height="28dp"
+        android:layout_marginEnd="3dp"
+        android:background="@drawable/shape_1ecdac_18dp"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:text="搜索"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintRight_toRightOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:layout_marginTop="12dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_search_bg"
+        android:id="@+id/view_top_line"
+        android:layout_width="match_parent"
+        android:layout_height="1px"/>
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_top_line"
+        app:srlEnableLoadMore="true">
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/recyclerView_list"
+            android:layout_marginEnd="14dp"
+            android:layout_marginStart="14dp"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none" />
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 112 - 0
student/src/main/res/layout/fg_vip_course_layout.xml

@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:paddingTop="10dp"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:id="@+id/tv_filter"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
+        android:drawableRight="@drawable/icon_arrow_down"
+        android:drawablePadding="6dp"
+        android:ellipsize="end"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:maxLength="6"
+        android:maxLines="1"
+        android:paddingStart="13dp"
+        android:paddingEnd="8dp"
+        android:text="筛选"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:id="@+id/view_search_bg"
+        android:layout_width="0dp"
+        android:layout_height="34dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintLeft_toRightOf="@+id/tv_filter"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:src="@drawable/icon_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <com.cooleshow.base.widgets.ClearEditText
+        android:id="@+id/et_target_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:background="@null"
+        android:ellipsize="end"
+        android:hint="请输入搜索关键词"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:paddingStart="8dp"
+        android:textColorHint="@color/color_66000000"
+        android:textColor="@color/color_333333"
+        android:textCursorDrawable="@drawable/shape_2dc7aa_1dp"
+        android:textSize="@dimen/sp_14"
+        android:theme="@style/MyEditText"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintRight_toLeftOf="@+id/tv_search"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <TextView
+        android:id="@+id/tv_search"
+        android:layout_width="56dp"
+        android:layout_height="28dp"
+        android:layout_marginEnd="3dp"
+        android:background="@drawable/shape_1ecdac_18dp"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:text="搜索"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintRight_toRightOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:layout_marginTop="12dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_search_bg"
+        android:id="@+id/view_top_line"
+        android:layout_width="match_parent"
+        android:layout_height="1px"/>
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_top_line"
+        app:srlEnableLoadMore="true">
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/recyclerView_list"
+            android:layout_marginEnd="14dp"
+            android:layout_marginStart="14dp"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none" />
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 75 - 83
student/src/main/res/layout/fragment_live_course_layout.xml

@@ -1,120 +1,112 @@
 <?xml version="1.0" encoding="utf-8"?>
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
+    android:paddingTop="10dp"
     android:layout_height="match_parent">
 
-    <View
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_time"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        android:background="@color/white"
-        android:layout_width="0dp"
-        android:layout_height="0dp"/>
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guide_line1"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_percent="0.33" />
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guide_line2"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_percent="0.66" />
-
     <TextView
-        android:id="@+id/tv_time"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:id="@+id/tv_filter"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
         android:drawableRight="@drawable/icon_arrow_down"
         android:drawablePadding="6dp"
+        android:ellipsize="end"
         android:gravity="center"
         android:includeFontPadding="false"
-        android:paddingTop="18dp"
-        android:paddingBottom="12dp"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
+        android:maxLength="6"
         android:maxLines="1"
-        android:ellipsize="end"
-        android:paddingEnd="10dp"
-        android:paddingStart="10dp"
-        app:layout_constraintWidth_default="wrap"
-        app:layout_constraintHorizontal_chainStyle="spread_inside"
+        android:paddingStart="13dp"
+        android:paddingEnd="8dp"
+        android:text="筛选"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toLeftOf="@+id/guide_line1"
-        app:layout_constraintTop_toTopOf="parent"
-        tools:text="2021年9月" />
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
 
-    <TextView
-        android:id="@+id/tv_course_status"
+    <View
+        android:id="@+id/view_search_bg"
         android:layout_width="0dp"
+        android:layout_height="34dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintLeft_toRightOf="@+id/tv_filter"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:drawableRight="@drawable/icon_arrow_down"
-        android:drawablePadding="6dp"
-        android:gravity="center"
+        android:layout_marginStart="12dp"
+        android:src="@drawable/icon_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <com.cooleshow.base.widgets.ClearEditText
+        android:id="@+id/et_target_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:background="@null"
+        android:ellipsize="end"
+        android:hint="请输入搜索关键词"
         android:includeFontPadding="false"
-        android:paddingTop="18dp"
-        android:paddingBottom="12dp"
-        android:text="课程状态"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
         android:maxLines="1"
-        android:ellipsize="end"
-        android:paddingEnd="10dp"
-        android:paddingStart="10dp"
-        app:layout_constraintWidth_default="wrap"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_time"
-        app:layout_constraintLeft_toRightOf="@+id/guide_line1"
-        app:layout_constraintRight_toLeftOf="@+id/guide_line2"
-        app:layout_constraintTop_toTopOf="@+id/tv_time"
-        tools:text="课程状态" />
+        android:paddingStart="8dp"
+        android:textColorHint="@color/color_66000000"
+        android:textColor="@color/color_333333"
+        android:textCursorDrawable="@drawable/shape_2dc7aa_1dp"
+        android:textSize="@dimen/sp_14"
+        android:theme="@style/MyEditText"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintRight_toLeftOf="@+id/tv_search"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
 
     <TextView
-        android:id="@+id/tv_agency"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:drawableRight="@drawable/icon_arrow_down"
-        android:drawablePadding="6dp"
+        android:id="@+id/tv_search"
+        android:layout_width="56dp"
+        android:layout_height="28dp"
+        android:layout_marginEnd="3dp"
+        android:background="@drawable/shape_1ecdac_18dp"
         android:gravity="center"
         android:includeFontPadding="false"
-        android:paddingTop="18dp"
-        android:paddingBottom="12dp"
-        android:text="全部声部"
-        android:maxLines="1"
-        android:ellipsize="end"
-        android:paddingEnd="10dp"
-        android:paddingStart="10dp"
-        app:layout_constraintWidth_default="wrap"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_time"
-        app:layout_constraintLeft_toRightOf="@+id/guide_line2"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/tv_time"
-        tools:text="课程状态" />
+        android:text="搜索"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintRight_toRightOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:layout_marginTop="12dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_search_bg"
+        android:id="@+id/view_top_line"
+        android:layout_width="match_parent"
+        android:layout_height="1px"/>
 
     <com.scwang.smart.refresh.layout.SmartRefreshLayout
         android:id="@+id/refreshLayout"
         android:layout_width="match_parent"
         android:layout_height="0dp"
+        app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/tv_time">
-
-
+        app:layout_constraintTop_toBottomOf="@+id/view_top_line"
+        app:srlEnableLoadMore="true">
 
         <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/recyclerView"
+            android:id="@+id/recyclerView_list"
+            android:layout_marginEnd="14dp"
+            android:layout_marginStart="14dp"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:overScrollMode="never"
             android:scrollbars="none" />
     </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 80 - 42
student/src/main/res/layout/fragment_video_course_layout.xml

@@ -1,74 +1,112 @@
 <?xml version="1.0" encoding="utf-8"?>
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:ignore="MissingDefaultResource">
+    android:paddingTop="10dp"
+    android:layout_height="match_parent">
 
-    <View
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_subject"
+    <TextView
+        android:id="@+id/tv_filter"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
+        android:drawableRight="@drawable/icon_arrow_down"
+        android:drawablePadding="6dp"
+        android:ellipsize="end"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:maxLength="6"
+        android:maxLines="1"
+        android:paddingStart="13dp"
+        android:paddingEnd="8dp"
+        android:text="筛选"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        android:background="@color/white"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:id="@+id/view_search_bg"
         android:layout_width="0dp"
-        android:layout_height="0dp"/>
+        android:layout_height="34dp"
+        android:layout_marginEnd="14dp"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintLeft_toRightOf="@+id/tv_filter"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
 
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guide_line1"
+    <ImageView
+        android:id="@+id/iv_search_icon"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_percent="0.33" />
+        android:layout_marginStart="12dp"
+        android:src="@drawable/icon_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
 
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guide_line2"
-        android:layout_width="wrap_content"
+    <com.cooleshow.base.widgets.ClearEditText
+        android:id="@+id/et_target_name"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_percent="0.66" />
+        android:layout_marginEnd="5dp"
+        android:background="@null"
+        android:ellipsize="end"
+        android:hint="请输入搜索关键词"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:paddingStart="8dp"
+        android:textColorHint="@color/color_66000000"
+        android:textColor="@color/color_333333"
+        android:textCursorDrawable="@drawable/shape_2dc7aa_1dp"
+        android:textSize="@dimen/sp_14"
+        android:theme="@style/MyEditText"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintRight_toLeftOf="@+id/tv_search"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
 
     <TextView
-        android:id="@+id/tv_subject"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:drawableRight="@drawable/icon_arrow_down"
-        android:drawablePadding="4dp"
+        android:id="@+id/tv_search"
+        android:layout_width="56dp"
+        android:layout_height="28dp"
+        android:layout_marginEnd="3dp"
+        android:background="@drawable/shape_1ecdac_18dp"
         android:gravity="center"
         android:includeFontPadding="false"
-        android:paddingTop="18dp"
-        android:paddingBottom="@dimen/dp_12"
-        android:text="全部声部"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
-        android:maxLines="1"
-        android:ellipsize="end"
-        android:paddingEnd="10dp"
-        android:paddingStart="10dp"
-        app:layout_constraintWidth_default="wrap"
-        app:layout_constraintRight_toLeftOf="@+id/guide_line1"
-        app:layout_constraintHorizontal_chainStyle="spread_inside"
+        android:text="搜索"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintRight_toRightOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <View
+        android:layout_marginTop="12dp"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        tools:text="全部声部" />
+        app:layout_constraintTop_toBottomOf="@+id/view_search_bg"
+        android:id="@+id/view_top_line"
+        android:layout_width="match_parent"
+        android:layout_height="1px"/>
 
     <com.scwang.smart.refresh.layout.SmartRefreshLayout
         android:id="@+id/refreshLayout"
         android:layout_width="match_parent"
         android:layout_height="0dp"
+        app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/tv_subject">
-
-
+        app:layout_constraintTop_toBottomOf="@+id/view_top_line"
+        app:srlEnableLoadMore="true">
 
         <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/recyclerView"
+            android:id="@+id/recyclerView_list"
+            android:layout_marginEnd="14dp"
+            android:layout_marginStart="14dp"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:overScrollMode="never"
             android:scrollbars="none" />
     </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 42 - 4
student/src/main/res/layout/item_live_course_appoint_layout.xml

@@ -112,7 +112,7 @@
         android:background="@drawable/shape_12ff802c_2dp"
         android:textColor="@color/color_ff6827"
         android:textSize="@dimen/sp_12"
-        android:visibility="visible"
+        android:visibility="gone"
         android:paddingStart="4dp"
         android:paddingEnd="4dp"
         android:paddingTop="3dp"
@@ -123,20 +123,58 @@
         tools:text="6人已购买" />
 
 
+    <de.hdodenhof.circleimageview.CircleImageView
+        android:id="@+id/iv_avatar"
+        android:layout_width="20dp"
+        android:layout_height="20dp"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/tv_teacher_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
+
+    <TextView
+        app:layout_constraintRight_toLeftOf="@+id/tv_price_symbol"
+        android:id="@+id/tv_teacher_name"
+        android:layout_width="0dp"
+        android:maxLines="1"
+        android:ellipsize="end"
+        android:layout_marginEnd="5dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="11dp"
+        android:includeFontPadding="false"
+        android:paddingStart="6dp"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_13"
+        android:visibility="visible"
+        app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintTop_toBottomOf="@+id/tv_des"
+        tools:text="严老师" />
+
     <TextView
         android:id="@+id/tv_price"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="¥120"
+        android:text="120"
         android:textColor="@color/color_f44541"
         android:textSize="@dimen/sp_20"
         android:textStyle="bold"
         android:includeFontPadding="false"
-        app:layout_constraintTop_toTopOf="@+id/tv_buy_num"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_buy_num"
+        app:layout_constraintTop_toTopOf="@+id/tv_teacher_name"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
         app:layout_constraintRight_toLeftOf="@+id/tv_price_unit" />
 
     <TextView
+        android:id="@+id/tv_price_symbol"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="¥"
+        android:textColor="@color/color_f44541"
+        android:textSize="@dimen/sp_14"
+        android:textStyle="bold"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_price"
+        app:layout_constraintRight_toLeftOf="@+id/tv_price" />
+
+    <TextView
         android:includeFontPadding="false"
         android:id="@+id/tv_price_unit"
         android:layout_width="wrap_content"

+ 149 - 103
student/src/main/res/layout/item_live_course_list_layout.xml

@@ -4,153 +4,199 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_marginStart="14dp"
-    android:layout_marginTop="12dp"
-    android:layout_marginEnd="14dp"
-    android:background="@drawable/bg_white_10dp"
-    android:paddingStart="11dp"
-    android:paddingEnd="11dp"
-    android:paddingBottom="11dp">
-
-
-    <com.cooleshow.base.widgets.QMUIRadiusImageView
-        android:id="@+id/iv_bg"
-        android:layout_width="105dp"
-        android:layout_height="71dp"
-        android:layout_marginTop="16dp"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:qmui_corner_radius="5dp" />
+    android:layout_marginBottom="12dp"
+    android:background="@drawable/bg_white_6dp"
+    android:paddingStart="12dp"
+    android:paddingEnd="12dp"
+    android:paddingBottom="14dp">
 
     <TextView
-        android:id="@+id/tv_title"
-        android:layout_width="0dp"
+        android:drawableStart="@drawable/icon_live_course_time_tag"
+        android:id="@+id/tv_time"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="10dp"
+        android:layout_marginTop="9dp"
         android:includeFontPadding="false"
-        android:textColor="@color/color_1a1a1a"
-        android:textSize="@dimen/sp_16"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_14"
         android:textStyle="bold"
-        android:maxLines="1"
-        android:ellipsize="end"
-        app:layout_constraintWidth_default="wrap"
-        app:layout_constraintHorizontal_chainStyle="packed"
-        app:layout_constraintHorizontal_bias="0"
-        app:layout_constraintRight_toLeftOf="@+id/iv_chat"
-        app:layout_constraintLeft_toRightOf="@+id/iv_bg"
-        app:layout_constraintTop_toTopOf="@+id/iv_bg"
-        app:layout_constraintVertical_chainStyle="packed"
-        tools:text="张豆张豆豆豆豆豆豆" />
+        android:drawablePadding="6dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="开课时间:2024-11-16 09:30" />
 
-    <ImageView
-        android:id="@+id/iv_chat"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="5dp"
-        android:src="@drawable/icon_chat_small"
+    <com.cooleshow.base.widgets.QMUIRadiusImageView
+        android:id="@+id/iv_bg"
+        android:layout_width="0dp"
+        app:layout_constraintDimensionRatio="h,16:9"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
-        app:layout_constraintLeft_toRightOf="@+id/tv_title"
-        app:layout_constraintTop_toTopOf="@+id/tv_title" />
+        android:layout_height="0dp"
+        android:layout_marginTop="11dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_time"
+        app:qmui_corner_radius="6dp" />
 
     <TextView
         android:id="@+id/tv_course_name"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="@dimen/dp_19"
         android:layout_marginTop="8dp"
-        android:layout_marginBottom="5dp"
-        android:background="@drawable/shape_couse_type_text_bg"
+        android:layout_marginStart="@dimen/dp_8"
+        android:background="@drawable/shape_66000000_3dp"
         android:gravity="center"
         android:includeFontPadding="false"
-        android:paddingStart="4dp"
-        android:paddingTop="2dp"
-        android:paddingEnd="4dp"
-        android:paddingBottom="2dp"
-        android:textColor="@color/color_ff8c00"
-        android:textSize="@dimen/sp_11"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_bg"
-        app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+        android:paddingStart="@dimen/dp_6"
+        android:paddingEnd="@dimen/dp_6"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintTop_toTopOf="@+id/iv_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
         tools:text="单簧管" />
 
-    <View
-        android:id="@+id/view_line2"
-        android:layout_width="1dp"
-        android:layout_height="11dp"
-        android:layout_marginStart="8dp"
-        android:background="@color/color_d3d3d3"
+    <TextView
         android:visibility="gone"
+        android:id="@+id/tv_course_status_tip"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:background="@drawable/shape_ffe7e7_15dp_left"
+        android:gravity="center"
+        android:paddingStart="12dp"
+        android:paddingTop="3dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="3dp"
+        android:text="销售中"
+        android:textColor="@color/color_ff1919"
+        android:textSize="@dimen/sp_10"
         app:layout_constraintBottom_toBottomOf="@+id/tv_course_name"
-        app:layout_constraintLeft_toRightOf="@+id/tv_course_name"
+        app:layout_constraintRight_toRightOf="@+id/iv_bg"
         app:layout_constraintTop_toTopOf="@+id/tv_course_name" />
 
+
+    <TextView
+        android:id="@+id/tv_title"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_16"
+        android:textStyle="bold"
+        android:layout_marginTop="8dp"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
+        app:layout_constraintRight_toRightOf="@+id/iv_bg"
+        app:layout_constraintTop_toBottomOf="@+id/iv_bg"
+        app:layout_constraintVertical_chainStyle="packed"
+        tools:text="张豆张豆豆豆" />
+
+    <TextView
+        android:id="@+id/tv_des"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_777777"
+        android:textSize="@dimen/sp_14"
+        android:layout_marginTop="4dp"
+        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
+        app:layout_constraintRight_toRightOf="@+id/iv_bg"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title"
+        tools:text="国际著名长笛演奏家、教育家子珊女士为您讲教育家子珊女士为您讲教育家子珊女士为您讲" />
+
     <TextView
         android:id="@+id/tv_buy_num"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:textColor="@color/color_ff802c"
-        android:textSize="@dimen/sp_11"
+        android:layout_marginTop="11dp"
+        android:background="@drawable/shape_12ff802c_2dp"
+        android:textColor="@color/color_ff6827"
+        android:textSize="@dimen/sp_12"
         android:visibility="gone"
-        app:layout_constraintBottom_toBottomOf="@+id/view_line2"
-        app:layout_constraintLeft_toRightOf="@+id/view_line2"
-        app:layout_constraintTop_toTopOf="@+id/view_line2"
+        android:paddingStart="4dp"
+        android:paddingEnd="4dp"
+        android:paddingTop="3dp"
+        android:paddingBottom="3dp"
+        android:includeFontPadding="false"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_des"
         tools:text="6人已购买" />
 
-    <View
-        android:id="@+id/view_line"
-        android:layout_width="0dp"
-        android:layout_height="1dp"
-        android:layout_marginTop="15dp"
-        android:background="@color/color_f2f2f2"
+
+    <de.hdodenhof.circleimageview.CircleImageView
+        android:id="@+id/iv_avatar"
+        android:layout_width="20dp"
+        android:layout_height="20dp"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/iv_bg" />
+        app:layout_constraintRight_toLeftOf="@+id/tv_teacher_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
 
-    <ImageView
-        android:id="@+id/iv_clock_icon"
-        android:layout_width="wrap_content"
+    <TextView
+        app:layout_constraintRight_toLeftOf="@+id/tv_price_symbol"
+        android:id="@+id/tv_teacher_name"
+        android:layout_width="0dp"
+        android:maxLines="1"
+        android:ellipsize="end"
+        android:layout_marginEnd="5dp"
         android:layout_height="wrap_content"
         android:layout_marginTop="11dp"
-        android:src="@drawable/icon_clock"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/view_line" />
+        android:includeFontPadding="false"
+        android:paddingStart="6dp"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_13"
+        android:visibility="visible"
+        app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintTop_toBottomOf="@+id/tv_des"
+        tools:text="严老师" />
 
     <TextView
-        android:id="@+id/tv_time"
+        android:id="@+id/tv_price"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="6dp"
+        android:text="120"
+        android:textColor="@color/color_f44541"
+        android:textSize="@dimen/sp_20"
+        android:textStyle="bold"
         android:includeFontPadding="false"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
-        app:layout_constraintLeft_toRightOf="@+id/iv_clock_icon"
-        app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
-        tools:text="2021/09/17 14:00~14:25" />
+        app:layout_constraintTop_toTopOf="@+id/tv_teacher_name"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+        app:layout_constraintRight_toLeftOf="@+id/tv_price_unit" />
 
+    <TextView
+        android:id="@+id/tv_price_symbol"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="¥"
+        android:textColor="@color/color_f44541"
+        android:textSize="@dimen/sp_14"
+        android:textStyle="bold"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_price"
+        app:layout_constraintRight_toLeftOf="@+id/tv_price" />
 
     <TextView
-        android:id="@+id/tv_course_status"
+        android:includeFontPadding="false"
+        android:id="@+id/tv_price_unit"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:paddingStart="2dp"
+        android:text="/4课时"
         android:textColor="@color/color_999999"
-        android:textSize="@dimen/sp_14"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
+        android:textSize="@dimen/sp_12"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
-        tools:text="未开始" />
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_price" />
 
-    <TextView
-        android:id="@+id/tv_course_status_bt"
-        android:layout_width="70dp"
-        android:layout_height="28dp"
-        android:background="@drawable/shape_course_status_normal"
-        android:gravity="center"
-        android:textColor="@color/color_2dc7aa"
-        android:textSize="@dimen/sp_14"
+    <ImageView
+        android:id="@+id/iv_chat"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:src="@drawable/icon_chat_small"
         android:visibility="gone"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        tools:text="调课" />
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_title"
+        app:layout_constraintTop_toTopOf="@+id/tv_title" />
+
+
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 155 - 0
student/src/main/res/layout/item_piano_course_group_layout.xml

@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginBottom="12dp"
+    android:background="@drawable/bg_white_10dp"
+    android:padding="12dp">
+
+    <TextView
+        android:id="@+id/tv_title"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_131415"
+        android:textSize="@dimen/sp_16"
+        android:textStyle="bold"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/tv_status"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="VIP定制课-张涵宇" />
+
+    <TextView
+        android:id="@+id/tv_status"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_title"
+        tools:text="已结课" />
+
+    <ImageView
+        android:src="@drawable/icon_piano_room_course"
+        android:id="@+id/iv_avatar"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title"
+        app:qmui_corner_radius="5dp" />
+
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="10dp"
+        android:layout_marginEnd="5dp"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toTopOf="@+id/tv_course_completed_title"
+        app:layout_constraintHorizontal_bias="0"
+        app:layout_constraintHorizontal_chainStyle="packed"
+        app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+        app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+        app:layout_constraintVertical_chainStyle="packed"
+        app:layout_constraintWidth_default="wrap"
+        tools:text="张涵宇" />
+
+
+    <TextView
+        android:id="@+id/tv_course_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:background="@drawable/shape_couse_type_text_bg"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:paddingStart="4dp"
+        android:paddingTop="2dp"
+        android:paddingEnd="4dp"
+        android:paddingBottom="2dp"
+        android:textColor="@color/color_ff8c00"
+        android:textSize="@dimen/sp_10"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+        app:layout_constraintLeft_toRightOf="@+id/tv_name"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
+        tools:text="单簧管" />
+
+    <ImageView
+        android:id="@+id/iv_course_tag"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:src="@drawable/icon_course_completed_tag"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_course_completed_title"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_course_completed_title" />
+
+    <TextView
+        android:id="@+id/tv_course_completed_title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="4dp"
+        android:layout_marginTop="5dp"
+        android:includeFontPadding="false"
+        android:text="已上课时"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+        app:layout_constraintLeft_toRightOf="@+id/iv_course_tag"
+        app:layout_constraintTop_toBottomOf="@+id/tv_name" />
+
+
+    <TextView
+        android:id="@+id/tv_course_completed_value"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:paddingStart="3dp"
+        android:paddingEnd="3dp"
+        android:text="0"
+        android:textColor="@color/color_2dc7aa"
+        android:textSize="@dimen/sp_12"
+        android:textStyle="bold"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_course_completed_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_course_completed_title" />
+
+    <TextView
+        android:id="@+id/tv_course_total_title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:text="/总课时"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_course_completed_value"
+        app:layout_constraintLeft_toRightOf="@+id/tv_course_completed_value" />
+
+
+    <TextView
+        android:id="@+id/tv_course_total_value"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:paddingStart="3dp"
+        android:paddingEnd="3dp"
+        android:text="0"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_12"
+        android:textStyle="bold"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_course_total_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_course_total_title" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 97 - 94
student/src/main/res/layout/item_video_course_list_layout.xml

@@ -4,130 +4,143 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingBottom="12dp"
-    android:background="@drawable/bg_white_10dp"
-    android:layout_marginTop="12dp">
+    android:layout_marginBottom="12dp"
+    android:background="@drawable/bg_white_6dp"
+    android:paddingBottom="9dp">
+
 
     <com.cooleshow.base.widgets.QMUIRadiusImageView
-        android:id="@+id/iv_bg"
-        android:layout_width="match_parent"
-        android:layout_height="111dp"
+        android:id="@+id/im_pic"
+        android:layout_width="146dp"
+        android:layout_height="@dimen/dp_81"
+        android:layout_marginStart="12dp"
+        android:layout_marginTop="12dp"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent"
-        app:qmui_corner_radius="5dp" />
+        app:qmui_corner_radius="6dp" />
 
     <TextView
         android:id="@+id/course_name"
         android:layout_width="wrap_content"
         android:layout_height="@dimen/dp_13"
-        android:layout_marginLeft="@dimen/dp_5"
-        android:layout_marginTop="@dimen/dp_7"
-        android:background="@drawable/gray_1_radius_bg"
+        android:layout_marginStart="4dp"
+        android:layout_marginTop="4dp"
+        android:background="@drawable/shape_66000000_3dp"
         android:gravity="center"
         android:paddingLeft="@dimen/dp_4"
         android:paddingRight="@dimen/dp_4"
         android:textColor="@color/white"
         android:textSize="@dimen/sp_9"
-        app:layout_constraintLeft_toLeftOf="@+id/iv_bg"
-        app:layout_constraintTop_toTopOf="@+id/iv_bg" />
-
-<!--    <View-->
-<!--        android:layout_width="match_parent"-->
-<!--        android:layout_height="0dp"-->
-<!--        android:background="@drawable/bg_white_bottom_10dp"-->
-<!--        app:layout_constraintBottom_toBottomOf="@+id/tv_price"-->
-<!--        app:layout_constraintTop_toBottomOf="@+id/iv_bg" />-->
+        app:layout_constraintLeft_toLeftOf="@+id/im_pic"
+        app:layout_constraintTop_toTopOf="@+id/im_pic" />
 
     <TextView
         android:id="@+id/tv_title"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginTop="6dp"
+        android:layout_marginLeft="12dp"
+        android:layout_marginEnd="5dp"
+        android:ellipsize="end"
         android:includeFontPadding="false"
-        android:paddingStart="11dp"
-        android:paddingEnd="11dp"
-        android:textColor="@color/color_1a1a1a"
-        android:textSize="@dimen/sp_14"
-        android:textStyle="bold"
         android:maxLines="1"
-        android:ellipsize="end"
-        app:layout_constraintLeft_toLeftOf="parent"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_15"
+        app:layout_constraintBottom_toTopOf="@+id/ll_tag"
+        app:layout_constraintLeft_toRightOf="@+id/im_pic"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/iv_bg"
+        app:layout_constraintTop_toTopOf="@+id/im_pic"
         app:layout_constraintVertical_chainStyle="packed"
-        tools:text="张豆豆" />
+        tools:text="从零开始学竖笛视频课从零开始学竖笛视频课从零开始学竖笛视频课" />
+
+    <LinearLayout
+        android:id="@+id/ll_tag"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toTopOf="@+id/tv_teacher_name"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title">
 
+        <TextView
+            android:id="@+id/tv_music_num"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:background="@drawable/shape_f5f6fa_3dp"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:paddingStart="6dp"
+            android:paddingTop="1dp"
+            android:paddingEnd="6dp"
+            android:paddingBottom="1dp"
+            android:textColor="@color/color_777777"
+            android:textSize="@dimen/sp_11"
+            android:visibility="gone"
+            tools:text="3首曲目" />
+
+        <TextView
+            android:id="@+id/tv_price_unit"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="4dp"
+            android:background="@drawable/shape_f5f6fa_3dp"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:paddingStart="6dp"
+            android:paddingTop="1dp"
+            android:paddingEnd="6dp"
+            android:paddingBottom="1dp"
+            android:textColor="@color/color_777777"
+            android:textSize="@dimen/sp_11"
+            app:layout_constraintBaseline_toBaselineOf="@+id/tv_music_num"
+            app:layout_constraintLeft_toRightOf="@+id/tv_music_num"
+            tools:text="4课时" />
+    </LinearLayout>
 
     <de.hdodenhof.circleimageview.CircleImageView
-        android:id="@+id/cir_avatar"
-        android:layout_width="18dp"
-        android:layout_height="18dp"
-        android:layout_marginStart="11dp"
-        android:layout_marginTop="9dp"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/tv_title" />
+        android:id="@+id/iv_avatar"
+        android:layout_width="20dp"
+        android:layout_height="20dp"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+        app:layout_constraintLeft_toLeftOf="@+id/ll_tag"
+        app:layout_constraintRight_toLeftOf="@+id/tv_teacher_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
 
     <TextView
-        android:id="@+id/tv_author_name"
+        app:layout_constraintRight_toLeftOf="@+id/tv_price_symbol"
+        android:id="@+id/tv_teacher_name"
         android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="5dp"
-        android:includeFontPadding="false"
-        android:textColor="@color/color_999999"
-        android:textSize="@dimen/sp_12"
         android:maxLines="1"
         android:ellipsize="end"
-        app:layout_constraintHorizontal_chainStyle="packed"
-        app:layout_constraintHorizontal_bias="0"
-        app:layout_constraintWidth_default="wrap"
-        app:layout_constraintRight_toLeftOf="@+id/view_line2"
-        app:layout_constraintBottom_toBottomOf="@+id/cir_avatar"
-        app:layout_constraintLeft_toRightOf="@+id/cir_avatar"
-        app:layout_constraintTop_toTopOf="@+id/cir_avatar"
-        tools:text="李" />
-
-    <View
-        android:id="@+id/view_line2"
-        android:layout_width="1dp"
-        android:layout_height="11dp"
-        android:layout_marginStart="6dp"
-        android:background="@color/color_d3d3d3"
-        android:visibility="visible"
-        app:layout_constraintRight_toLeftOf="@+id/tv_buy_num"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_author_name"
-        app:layout_constraintLeft_toRightOf="@+id/tv_author_name"
-        app:layout_constraintTop_toTopOf="@+id/tv_author_name" />
-
-    <TextView
-        android:paddingEnd="5dp"
-        app:layout_constraintRight_toRightOf="parent"
-        android:id="@+id/tv_buy_num"
-        android:layout_width="wrap_content"
+        android:layout_marginEnd="5dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="6dp"
+        android:layout_marginTop="12dp"
         android:includeFontPadding="false"
-        android:textColor="@color/color_ff802c"
-        android:textSize="@dimen/sp_11"
+        android:paddingStart="4dp"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_13"
         android:visibility="visible"
-        android:maxLines="1"
-        app:layout_constraintBottom_toBottomOf="@+id/view_line2"
-        app:layout_constraintLeft_toRightOf="@+id/view_line2"
-        app:layout_constraintTop_toTopOf="@+id/view_line2"
-        tools:text="李老师李老师李老师李老师李老师李老师123" />
+        app:layout_constraintBottom_toBottomOf="@+id/im_pic"
+        app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintTop_toBottomOf="@+id/ll_tag"
+        tools:text="严老师" />
 
     <TextView
+        android:visibility="gone"
         android:id="@+id/tv_price"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="5dp"
-        android:textColor="@color/color_2dc7aa"
-        android:textSize="@dimen/sp_16"
+        android:layout_marginEnd="12dp"
+        android:text="120"
+        android:textColor="@color/color_f44541"
+        android:textSize="@dimen/sp_18"
         android:textStyle="bold"
-        app:layout_constraintLeft_toLeftOf="@+id/cir_avatar"
-        app:layout_constraintTop_toBottomOf="@+id/cir_avatar"
-        tools:text="120" />
+        app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
 
     <TextView
+        android:visibility="gone"
         android:id="@+id/tv_price_symbol"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
@@ -135,17 +148,7 @@
         android:textColor="@color/color_f44541"
         android:textSize="@dimen/sp_14"
         android:textStyle="bold"
-        app:layout_constraintRight_toLeftOf="@+id/tv_price"
-        app:layout_constraintBaseline_toBaselineOf="@+id/tv_price" />
-
-    <TextView
-        android:id="@+id/tv_price_unit"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:paddingStart="5dp"
-        android:text="/4课时"
-        android:textColor="@color/color_999999"
-        android:textSize="@dimen/sp_14"
         app:layout_constraintBaseline_toBaselineOf="@+id/tv_price"
-        app:layout_constraintLeft_toRightOf="@+id/tv_price" />
+        app:layout_constraintRight_toLeftOf="@+id/tv_price" />
+
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 154 - 0
student/src/main/res/layout/item_vip_course_layout.xml

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginBottom="12dp"
+    android:background="@drawable/bg_white_10dp"
+    android:padding="12dp">
+
+    <TextView
+        android:id="@+id/tv_title"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_131415"
+        android:textSize="@dimen/sp_16"
+        android:textStyle="bold"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toLeftOf="@+id/tv_status"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="VIP定制课-张涵宇" />
+
+    <TextView
+        android:id="@+id/tv_status"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_title"
+        tools:text="已结课" />
+
+
+    <de.hdodenhof.circleimageview.CircleImageView
+        android:id="@+id/iv_avatar"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:layout_marginTop="8dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title" />
+
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="10dp"
+        android:layout_marginEnd="5dp"
+        android:ellipsize="end"
+        android:includeFontPadding="false"
+        android:maxLines="1"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toTopOf="@+id/tv_course_completed_title"
+        app:layout_constraintHorizontal_bias="0"
+        app:layout_constraintHorizontal_chainStyle="packed"
+        app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+        app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+        app:layout_constraintVertical_chainStyle="packed"
+        app:layout_constraintWidth_default="wrap"
+        tools:text="张涵宇" />
+
+
+    <TextView
+        android:id="@+id/tv_course_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:background="@drawable/shape_couse_type_text_bg"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:paddingStart="4dp"
+        android:paddingTop="2dp"
+        android:paddingEnd="4dp"
+        android:paddingBottom="2dp"
+        android:textColor="@color/color_ff8c00"
+        android:textSize="@dimen/sp_10"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+        app:layout_constraintLeft_toRightOf="@+id/tv_name"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
+        tools:text="单簧管" />
+
+    <ImageView
+        android:id="@+id/iv_course_tag"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:src="@drawable/icon_course_completed_tag"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_course_completed_title"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_course_completed_title" />
+
+    <TextView
+        android:id="@+id/tv_course_completed_title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="4dp"
+        android:layout_marginTop="5dp"
+        android:includeFontPadding="false"
+        android:text="已上课时"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+        app:layout_constraintLeft_toRightOf="@+id/iv_course_tag"
+        app:layout_constraintTop_toBottomOf="@+id/tv_name" />
+
+
+    <TextView
+        android:id="@+id/tv_course_completed_value"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:paddingStart="3dp"
+        android:paddingEnd="3dp"
+        android:text="0"
+        android:textColor="@color/color_2dc7aa"
+        android:textSize="@dimen/sp_12"
+        android:textStyle="bold"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_course_completed_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_course_completed_title" />
+
+    <TextView
+        android:id="@+id/tv_course_total_title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:text="/总课时"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_12"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_course_completed_value"
+        app:layout_constraintLeft_toRightOf="@+id/tv_course_completed_value" />
+
+
+    <TextView
+        android:id="@+id/tv_course_total_value"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:includeFontPadding="false"
+        android:paddingStart="3dp"
+        android:paddingEnd="3dp"
+        android:text="0"
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/sp_12"
+        android:textStyle="bold"
+        app:layout_constraintBaseline_toBaselineOf="@+id/tv_course_total_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_course_total_title" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 19 - 0
student/src/main/res/layout/view_mine_course_tab_layout.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_gravity="center"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content">
+    <TextView
+        android:paddingStart="15dp"
+        android:paddingEnd="15dp"
+        tools:text="哈哈"
+        android:gravity="center"
+        android:layout_gravity="center"
+        android:includeFontPadding="false"
+        android:textSize="@dimen/sp_16"
+        android:textColor="@color/color_666666"
+        android:id="@+id/tv_text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"/>
+</FrameLayout>