Procházet zdrojové kódy

Merge branch 'dev' of http://git.dayaedu.com/yonge/cooleshow_android into dev

Pq před 3 roky
rodič
revize
91fa555e99
79 změnil soubory, kde provedl 1785 přidání a 324 odebrání
  1. 3 0
      BaseLibrary/build.gradle
  2. 4 1
      BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt
  3. 11 0
      BaseLibrary/src/main/java/com/cooleshow/base/utils/ToastUtil.java
  4. 142 0
      BaseLibrary/src/main/java/com/cooleshow/base/widgets/ComTitleBar.java
  5. 85 0
      BaseLibrary/src/main/res/layout/common_title_layout.xml
  6. 4 4
      BaseLibrary/src/main/res/layout/common_toolbar_layout.xml
  7. 1 1
      BaseLibrary/src/main/res/layout/list_popu_layout.xml
  8. binární
      BaseLibrary/src/main/res/mipmap-hdpi/ic_launcher.webp
  9. binární
      BaseLibrary/src/main/res/mipmap-hdpi/ic_launcher_round.webp
  10. binární
      BaseLibrary/src/main/res/mipmap-mdpi/ic_launcher.webp
  11. binární
      BaseLibrary/src/main/res/mipmap-mdpi/ic_launcher_round.webp
  12. 15 0
      BaseLibrary/src/main/res/values/attrs.xml
  13. 3 1
      student/src/main/AndroidManifest.xml
  14. 17 2
      student/src/main/java/com/cooleshow/student/adapter/LiveCourseListAdapter.java
  15. 13 1
      student/src/main/java/com/cooleshow/student/ui/course/PracticeCourseDetailActivity.java
  16. 38 32
      student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java
  17. 1 1
      student/src/main/res/layout/fragment_home_layout.xml
  18. 1 1
      student/src/main/res/layout/item_live_course_list_layout.xml
  19. 16 22
      teacher/src/main/AndroidManifest.xml
  20. 5 1
      teacher/src/main/java/com/cooleshow/teacher/adapter/CourseTableListAdapter.kt
  21. 36 8
      teacher/src/main/java/com/cooleshow/teacher/adapter/HomeworkAdapter.java
  22. 13 0
      teacher/src/main/java/com/cooleshow/teacher/adapter/MineIncomeAdapter.java
  23. 13 5
      teacher/src/main/java/com/cooleshow/teacher/adapter/MineStyleFansGroupListAdapter.java
  24. 20 6
      teacher/src/main/java/com/cooleshow/teacher/api/APIService.java
  25. 1 0
      teacher/src/main/java/com/cooleshow/teacher/bean/CourseTableDataBean.java
  26. 46 29
      teacher/src/main/java/com/cooleshow/teacher/bean/HomeworkListBean.java
  27. 12 0
      teacher/src/main/java/com/cooleshow/teacher/bean/request/AssignHomeWorkEntry.java
  28. 12 0
      teacher/src/main/java/com/cooleshow/teacher/bean/request/CommentHomeWorkEntry.java
  29. 13 0
      teacher/src/main/java/com/cooleshow/teacher/bean/request/QueryGroupListEntry.java
  30. 14 0
      teacher/src/main/java/com/cooleshow/teacher/bean/request/SheetMusicEntry.java
  31. 12 0
      teacher/src/main/java/com/cooleshow/teacher/bean/request/UnBindCardEntry.java
  32. 6 0
      teacher/src/main/java/com/cooleshow/teacher/constants/AssignHomeworkContract.java
  33. 14 0
      teacher/src/main/java/com/cooleshow/teacher/constants/TeacherConfig.java
  34. 5 0
      teacher/src/main/java/com/cooleshow/teacher/contract/MineStyleContract.java
  35. 2 1
      teacher/src/main/java/com/cooleshow/teacher/contract/MyBankCardContract.java
  36. 6 0
      teacher/src/main/java/com/cooleshow/teacher/contract/SheetMusicPageContract.java
  37. 6 10
      teacher/src/main/java/com/cooleshow/teacher/presenter/course/PianoRoomDetailPresenter.java
  38. 12 19
      teacher/src/main/java/com/cooleshow/teacher/presenter/course/SparringCourseDetailPresenter.java
  39. 17 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/homePage/MineStylePresenter.java
  40. 29 11
      teacher/src/main/java/com/cooleshow/teacher/presenter/homePage/SheetMusicPagePresenter.java
  41. 81 1
      teacher/src/main/java/com/cooleshow/teacher/presenter/homework/AssignHomeworkPresenter.java
  42. 10 7
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/MyBankCardPresenter.java
  43. 6 8
      teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentDetailActivity.java
  44. 11 2
      teacher/src/main/java/com/cooleshow/teacher/ui/course/SparringCourseDetailActivity.java
  45. 28 1
      teacher/src/main/java/com/cooleshow/teacher/ui/homepage/MineStyleFragment.java
  46. 75 19
      teacher/src/main/java/com/cooleshow/teacher/ui/homepage/SheetMusicPageFragment.java
  47. 42 36
      teacher/src/main/java/com/cooleshow/teacher/ui/main/CourseTableFragment.kt
  48. 11 0
      teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeFragment.kt
  49. 6 6
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/FeedBackActivity.java
  50. 11 10
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/MyBankCardActivity.java
  51. 98 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/UnBindBankCardActivity.java
  52. 4 3
      teacher/src/main/java/com/cooleshow/teacher/ui/web/HtmlActivity.java
  53. 175 5
      teacher/src/main/java/com/cooleshow/teacher/ui/work/AssignHomeworkActivity.java
  54. 21 21
      teacher/src/main/java/com/cooleshow/teacher/ui/work/HomeWorkFragment.java
  55. 91 0
      teacher/src/main/java/com/cooleshow/teacher/widgets/CourseSearchView.java
  56. binární
      teacher/src/main/res/drawable-xhdpi/icon_group_fans.png
  57. binární
      teacher/src/main/res/drawable-xxhdpi/icon_group_fans.png
  58. 38 24
      teacher/src/main/res/layout/activity_assign_homework.xml
  59. 0 1
      teacher/src/main/res/layout/activity_bind_bankcard.xml
  60. 1 0
      teacher/src/main/res/layout/activity_feedback.xml
  61. 8 7
      teacher/src/main/res/layout/activity_home_page_layout.xml
  62. 184 0
      teacher/src/main/res/layout/activity_un_bind_bank_card.xml
  63. 70 0
      teacher/src/main/res/layout/course_search_view.xml
  64. 3 2
      teacher/src/main/res/layout/fragment_home_layout.xml
  65. 1 0
      teacher/src/main/res/layout/fragment_mine_style_layout.xml
  66. 16 5
      teacher/src/main/res/layout/fragment_sheet_music_page_layout.xml
  67. 32 1
      teacher/src/main/res/layout/item_mine_style_fans_group_layout.xml
  68. 1 1
      teacher/src/main/res/layout/layout_item_homework.xml
  69. binární
      teacher/src/main/res/mipmap-xhdpi/small_search_icon.png
  70. binární
      teacher/src/main/res/mipmap-xxhdpi/small_search_icon.png
  71. 0 0
      teacher/src/main/res/mipmap-xxxhdpi/small_alarm_clock.png
  72. binární
      teacher/src/main/res/mipmap-xxxhdpi/small_search_icon.png
  73. 2 0
      teacher/src/main/res/values/strings.xml
  74. 6 0
      teacher/src/main/res/values/styles.xml
  75. 14 8
      usercenter/src/main/AndroidManifest.xml
  76. 4 0
      usercenter/src/main/java/com/cooleshow/usercenter/constants/UserConstants.java
  77. 37 0
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/CommEmptyActivity.java
  78. 0 0
      usercenter/src/main/res/drawable/ic_launcher_foreground.xml
  79. 50 0
      usercenter/src/main/res/layout/activity_comm_empty.xml

+ 3 - 0
BaseLibrary/build.gradle

@@ -181,4 +181,7 @@ dependencies {
     api 'org.java-websocket:Java-WebSocket:1.5.1'
     api project(path: ':midiplaylib')
     api 'org.greenrobot:eventbus:3.1.1'
+
+    //UI适配
+    api 'me.jessyan:autosize:1.2.1'
 }

+ 4 - 1
BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt

@@ -30,7 +30,7 @@ object RouterPath {
     }
 
     //网络教室
-    class OnlineClassroom{
+    class OnlineClassroom {
         companion object {
             const val PATH_LIVE = "/daya/live_teaching/ui/LiveActivity"
             const val ACTIVITY_PHOTO_PREVIEW = "/daya/live_teaching/ui/ACTIVITY_PHOTO_PREVIEW"
@@ -44,6 +44,7 @@ object RouterPath {
             const val PATH_VERIFY_LOGIN = "/userCenter/verifyLogin"
             const val PATH_VERIFY_INPUT = "/userCenter/verifyInput"
             const val PATH_BIND_PASSWORD = "/userCenter/bindPwd"
+            const val COMMON_EMPTY_ACTIVITY="/userCenter/CommEmptyActivity"
         }
     }
 
@@ -148,6 +149,8 @@ object RouterPath {
             const val MINE_PAY_TEST = "/teacher/ui/mine/PayTestActivity"
             const val MINE_NETWORK_MONITORING = "/ui/mine/NetworkMonitoringActivity"
             const val MINE_EQUIPMENT_TEST = "/ui/mine/EquipmentTestActivity"
+            const val MINE_UNBIND_BANKCARD = "/teacher/ui/mine/UnBindBankCardActivity"
+
         }
     }
 

+ 11 - 0
BaseLibrary/src/main/java/com/cooleshow/base/utils/ToastUtil.java

@@ -38,6 +38,17 @@ public class ToastUtil {
         }
     }
 
+    /**
+     * 创建自定义Toasts :
+     */
+    public void showShort(String toastStr) {
+        if (init(toastStr, Toast.LENGTH_SHORT) == null) {
+            toast = new Toast(Utils.getApp());
+            toast.setText(toastStr);
+            toast.setDuration(Toast.LENGTH_SHORT);
+            toast.show();
+        }
+    }
     private Toast init(String message, int duration) {
         try {
             if (toast != null) {

+ 142 - 0
BaseLibrary/src/main/java/com/cooleshow/base/widgets/ComTitleBar.java

@@ -0,0 +1,142 @@
+package com.cooleshow.base.widgets;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.constraintlayout.widget.ConstraintLayout;
+
+import com.cooleshow.base.R;
+import com.cooleshow.base.utils.SizeUtils;
+import com.luck.picture.lib.tools.ScreenUtils;
+
+/**
+ * @author dengqw
+ * @time 2022/6/30 10:36
+ * @describe:
+ **/
+public class ComTitleBar extends FrameLayout {
+    private String mTitleText, mRightText;
+    private boolean mRightMoreImgVisible, mLeftImgVisible, mRightImgVisible, mRightTextVisible;
+    private int mLeftImgSrc, mRightImgSrc, mRightMoreImgSrc;
+    private int mTitleTextSize;
+    public ImageView mLeftImg, mRightImg, mRightMoreImg;
+    public TextView mTitle, mRightTextView;
+
+    public ComTitleBar(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.title_style);
+        mTitleText = array.getString(R.styleable.title_style_title_text);
+        mTitleTextSize = array.getInteger(R.styleable.title_style_title_text_size, 18);
+        mRightText = array.getString(R.styleable.title_style_right_text);
+        mRightTextVisible = array.getBoolean(R.styleable.title_style_right_visible, false);
+        mRightImgVisible = array.getBoolean(R.styleable.title_style_right_img_visible, false);
+        mRightImgSrc = array.getResourceId(R.styleable.title_style_right_img_src, 0);
+        mLeftImgSrc = array.getResourceId(R.styleable.title_style_left_img_src, R.drawable.icon_back_black);
+        mLeftImgVisible = array.getBoolean(R.styleable.title_style_left_img_visible, true);
+        mRightMoreImgSrc = array.getResourceId(R.styleable.title_style_right_more_img_src, 0);
+        mRightMoreImgVisible = array.getBoolean(R.styleable.title_style_right_more_img_visible, false);
+        array.recycle();
+        initView();
+    }
+
+    public ComTitleBar(@NonNull Context context) {
+        this(context, null);
+    }
+
+    public ComTitleBar(@NonNull Context context, @Nullable AttributeSet attrs) {
+        this(context, attrs, -1);
+    }
+
+    private void initView() {
+        View titleView = View.inflate(getContext(), R.layout.common_title_layout, this);
+        ConstraintLayout rootView = titleView.findViewById(R.id.toolbar);
+        mTitle = titleView.findViewById(R.id.title);
+        mRightTextView = titleView.findViewById(R.id.tv_right_text);
+        mLeftImg = titleView.findViewById(R.id.iv_back);
+        mRightImg = titleView.findViewById(R.id.tv_right);
+        mRightMoreImg = titleView.findViewById(R.id.tv_right2);
+
+        int statusBarHeight = ScreenUtils.getStatusBarHeight(getContext());
+        ViewGroup.LayoutParams lp = rootView.getLayoutParams();
+        lp.height = statusBarHeight + ScreenUtils.dip2px(getContext(), 44);
+        lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
+        rootView.setLayoutParams(lp);
+        rootView.setPadding(SizeUtils.dp2px(10),statusBarHeight,SizeUtils.dp2px(10),0);
+
+        setTitleText(mTitleText);
+        setLeftImgSrc(mLeftImgSrc);
+        setRightImgSrc(mRightImgSrc);
+        setRightText(mRightText);
+        setRightMoreImgSrc(mRightMoreImgSrc);
+    }
+
+    private void setTitleTextSize(int titleTextSize) {
+        mTitleTextSize = titleTextSize;
+        if (mTitle != null) {
+            mTitle.setTextSize(titleTextSize);
+        }
+    }
+
+    //左边按钮
+    private void setLeftImgSrc(int leftImgId) {
+        mLeftImgSrc = leftImgId;
+        if (mLeftImgSrc != 0) {
+            mLeftImg.setImageResource(mLeftImgSrc);
+            mLeftImgVisible = true;
+        }
+        mLeftImg.setVisibility(mLeftImgVisible ? VISIBLE : GONE);
+    }
+
+    //右边按钮
+    private void setRightImgSrc(int rightImgId) {
+        mRightImgSrc = rightImgId;
+        if (mRightImgSrc != 0) {
+            mRightImg.setImageResource(mRightImgSrc);
+            mRightImgVisible = true;
+        }
+        mRightImg.setVisibility(mRightImgVisible ? VISIBLE : GONE);
+
+    }
+
+
+    private void setRightMoreImgSrc(int rightMoreImgId) {
+        mRightMoreImgSrc = rightMoreImgId;
+        if (mRightMoreImgSrc != 0) {
+            mRightMoreImg.setImageResource(mRightMoreImgSrc);
+            mRightMoreImgVisible = true;
+        }
+        mRightMoreImg.setVisibility(mRightMoreImgVisible ? VISIBLE : GONE);
+    }
+
+    public void setRightText(String rightText) {
+        mRightText = rightText;
+        mRightTextView.setText(mRightText);
+        mRightTextView.setVisibility(VISIBLE);
+    }
+
+    //标题
+    public void setTitleText(String title) {
+        mTitleText = title;
+        mTitle.setText(mTitleText);
+    }
+
+    public void setLeftClickListener(View.OnClickListener listener) {
+        mLeftImg.setOnClickListener(listener);
+    }
+
+    public void setRightClickListener(View.OnClickListener listener) {
+        mRightImg.setOnClickListener(listener);
+    }
+
+    public void setRightMoreClickListener(View.OnClickListener listener) {
+        mRightMoreImg.setOnClickListener(listener);
+    }
+}

+ 85 - 0
BaseLibrary/src/main/res/layout/common_title_layout.xml

@@ -0,0 +1,85 @@
+<?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:id="@+id/toolbar"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/transparent"
+    android:fitsSystemWindows="true"
+    android:paddingLeft="@dimen/dp_10"
+    android:paddingRight="@dimen/dp_10"
+    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+    android:visibility="visible"
+    app:popupTheme="@style/AppBarTheme">
+
+    <ImageView
+        android:id="@+id/iv_back"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="15dp"
+        android:paddingLeft="@dimen/dp_20"
+        android:paddingTop="5dp"
+        android:paddingRight="12dp"
+        android:paddingBottom="5dp"
+        android:src="@drawable/icon_back_black"
+        app:layout_constraintBottom_toBottomOf="@+id/title"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/title" />
+
+    <TextView
+        android:id="@+id/title"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_44"
+        android:layout_centerInParent="true"
+        android:layout_gravity="center"
+        android:gravity="center"
+        android:textColor="@color/common_black"
+        android:textSize="@dimen/sp_18"
+        android:textStyle="bold"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="我的课程" />
+
+    <ImageView
+        android:id="@+id/tv_right"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="right"
+        android:layout_marginRight="15dp"
+        android:scaleType="centerCrop"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/title"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/title"
+        tools:visibility="visible" />
+
+    <ImageView
+        android:id="@+id/tv_right2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="right"
+        android:layout_marginRight="25dp"
+        android:scaleType="centerCrop"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_right"
+        app:layout_constraintTop_toTopOf="@+id/title"
+        tools:visibility="visible" />
+
+    <TextView
+        android:id="@+id/tv_right_text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="right|center_vertical"
+        android:layout_marginRight="15dp"
+        android:scaleType="centerCrop"
+        android:text=""
+        android:textColor="@color/white"
+        android:textSize="15sp"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@id/title"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/title"
+        tools:text="右侧标题"
+        tools:visibility="gone" />
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 4 - 4
BaseLibrary/src/main/res/layout/common_toolbar_layout.xml

@@ -25,7 +25,6 @@
         android:src="@drawable/icon_back_black" />
 
     <TextView
-        tools:text="我的课程"
         android:id="@+id/title"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
@@ -33,7 +32,8 @@
         android:layout_gravity="center"
         android:textColor="@color/common_black"
         android:textSize="@dimen/sp_18"
-        android:textStyle="bold" />
+        android:textStyle="bold"
+        tools:text="我的课程" />
 
     <ImageView
         android:id="@+id/tv_right"
@@ -75,7 +75,8 @@
         android:layout_height="wrap_content"
         android:layout_gravity="right|center_vertical"
         android:layout_marginRight="15dp"
-        android:visibility="gone">
+        android:visibility="gone"
+        tools:visibility="visible">
 
         <TextView
             android:id="@+id/tv_right_text_red"
@@ -84,7 +85,6 @@
             android:layout_gravity="right|center_vertical"
             android:layout_marginTop="4dp"
             android:scaleType="centerCrop"
-            android:text=""
             android:textColor="@color/white"
             android:textSize="16sp"
             android:visibility="gone"

+ 1 - 1
BaseLibrary/src/main/res/layout/list_popu_layout.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
+    android:layout_height="wrap_content"
     android:orientation="vertical">
 
     <androidx.recyclerview.widget.RecyclerView

binární
BaseLibrary/src/main/res/mipmap-hdpi/ic_launcher.webp


binární
BaseLibrary/src/main/res/mipmap-hdpi/ic_launcher_round.webp


binární
BaseLibrary/src/main/res/mipmap-mdpi/ic_launcher.webp


binární
BaseLibrary/src/main/res/mipmap-mdpi/ic_launcher_round.webp


+ 15 - 0
BaseLibrary/src/main/res/values/attrs.xml

@@ -39,4 +39,19 @@
         <attr name="cllBorderColor" format="color"/>
         <attr name="cllBorderWidth" format="dimension"/>
     </declare-styleable>
+
+    <declare-styleable name="title_style">
+        <attr name="title_text" format="string" />
+        <attr name="title_text_size" format="integer" />
+        <attr name="left_img_visible" format="boolean" />
+        <attr name="right_img_visible" format="boolean" />
+        <attr name="right_more_img_visible" format="boolean" />
+        <attr name="left_img_src" format="reference" />
+        <attr name="right_img_src" format="reference" />
+        <attr name="right_more_img_src" format="reference" />
+        <attr name="right_text" format="string" />
+        <attr name="right_visible" format="boolean" />
+        <attr name="right_title_visible" format="boolean" />
+        <attr name="right_title_text" format="string" />
+    </declare-styleable>
 </resources>

+ 3 - 1
student/src/main/AndroidManifest.xml

@@ -21,7 +21,9 @@
         android:requestLegacyExternalStorage="true"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
-
+        <meta-data
+            android:name="design_width_in_dp"
+            android:value="375" />
         <activity
             android:name=".ui.splash.SplashActivity"
             android:exported="true"

+ 17 - 2
student/src/main/java/com/cooleshow/student/adapter/LiveCourseListAdapter.java

@@ -11,10 +11,13 @@ import com.chad.library.adapter.base.module.BaseLoadMoreModule;
 import com.chad.library.adapter.base.module.LoadMoreModule;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
 import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.student.R;
 import com.cooleshow.student.bean.LiveCourseListBean;
 import com.cooleshow.student.constants.CourseConstants;
 
+import java.util.Date;
+
 /**
  * Author by pq, Date on 2022/4/25.
  */
@@ -26,8 +29,20 @@ public class LiveCourseListAdapter extends BaseQuickAdapter<LiveCourseListBean.R
 
     @Override
     protected void convert(@NonNull BaseViewHolder holder, LiveCourseListBean.RowsBean data) {
+        if (data == null) {
+            return;
+        }
         //时间
-        holder.setText(R.id.tv_time, data.startTime);
+        String endTime = TimeUtils.date2String(TimeUtils.getDate(data.endTime), "yyyy-MM-dd");
+        String startTime = TimeUtils.date2String(TimeUtils.getDate(data.startTime), "yyyy-MM-dd");
+        String startTimeText = TimeUtils.date2String(TimeUtils.getDate(data.startTime), "HH:mm");
+        String endTimeText = TimeUtils.date2String(TimeUtils.getDate(data.endTime), "HH:mm");
+        if (TextUtils.equals(endTime, startTime)) {
+            holder.setText(R.id.tv_time, startTime + " " + startTimeText + "-" + endTimeText);
+        } else {
+            holder.setText(R.id.tv_time, startTime + " " + startTimeText + "-" + endTime + " " + endTimeText);
+        }
+
         //title
         holder.setText(R.id.tv_title, data.name);
         //subjectName
@@ -36,7 +51,7 @@ public class LiveCourseListAdapter extends BaseQuickAdapter<LiveCourseListBean.R
         holder.setText(R.id.tv_buy_num, getContext().getString(R.string.pay_count_str, data.payCount));
         //头像
         ImageView iv_avatar = holder.getView(R.id.iv_bg);
-        GlideUtils.INSTANCE.loadImage(getContext(), data.avatar, iv_avatar, R.drawable.icon_teacher_default_head);
+        GlideUtils.INSTANCE.loadImage(getContext(), data.cover, iv_avatar, R.drawable.icon_teacher_default_head);
 
         TextView tvCourseStatusBt = holder.getView(R.id.tv_course_status);
 

+ 13 - 1
student/src/main/java/com/cooleshow/student/ui/course/PracticeCourseDetailActivity.java

@@ -15,12 +15,14 @@ import androidx.recyclerview.widget.RecyclerView;
 import com.alibaba.android.arouter.facade.annotation.Route;
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.utils.ActivityUtils;
 import com.cooleshow.base.utils.FileUtils;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.student.R;
 import com.cooleshow.student.adapter.ItemMarkAdapter;
 import com.cooleshow.student.adapter.PracticeVideoWorkAdapter;
@@ -34,6 +36,7 @@ import com.cooleshow.student.presenter.course.PracticeCourseDetailPresenter;
 import com.tbruyelle.rxpermissions3.RxPermissions;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -99,6 +102,7 @@ public class PracticeCourseDetailActivity extends BaseMVPActivity<ActivityPracti
 
     @Override
     protected void initView() {
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
         initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "课程详情");
         mCourseId = getIntent().getStringExtra(COURSE_ID);
         mCourseGroupId = getIntent().getStringExtra(COURSE_GROUP_ID);
@@ -149,8 +153,16 @@ public class PracticeCourseDetailActivity extends BaseMVPActivity<ActivityPracti
             return;
         }
         mInfoBean = infoBean;
+        String startTime = TimeUtils.date2String(TimeUtils.getDate(infoBean.startTime), "yyyy-MM-dd");
+        String endTime = TimeUtils.date2String(TimeUtils.getDate(infoBean.endTime), "yyyy-MM-dd");
+        if (TextUtils.equals(startTime, endTime)) {
+            String startTimeText = TimeUtils.date2String(TimeUtils.getDate(infoBean.startTime), "HH:mm");
+            String endTimeText = TimeUtils.date2String(TimeUtils.getDate(infoBean.endTime), "HH:mm");
+            viewBinding.tvCourseTime.setText(startTime + " " + startTimeText + "-" + endTimeText);
+        } else {
+            viewBinding.tvCourseTime.setText(infoBean.startTime + "-" + infoBean.endTime);
+        }
         //时间
-        viewBinding.tvCourseTime.setText(infoBean.classDate);
         //老师头像
         GlideUtils.INSTANCE.loadImage(this, infoBean.teacherAvatar, viewBinding.ivAvatar, R.drawable.icon_teacher_default_head);
         //title

+ 38 - 32
student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java

@@ -1,5 +1,6 @@
 package com.cooleshow.student.ui.main;
 
+import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.graphics.Point;
 import android.graphics.Rect;
@@ -25,6 +26,7 @@ import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.SPUtils;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.base.utils.helper.QMUIDisplayHelper;
 import com.cooleshow.student.R;
 import com.cooleshow.student.adapter.HomeHotAlbumAdapter;
@@ -54,6 +56,7 @@ import com.youth.banner.holder.BannerImageHolder;
 import com.youth.banner.listener.OnBannerListener;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.TreeMap;
 
@@ -128,6 +131,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         super.onResume();
         presenter.queryCountOfUnread();
         presenter.queryUserInfo();
+        presenter.queryLiveAndVideo();
     }
 
     @Override
@@ -187,16 +191,16 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         //banner自带图片轮播的适配器
         banner.setAdapter(new BannerImageAdapter<AppHomeBean.ItemBean>(bannerList) {
 
-                    @Override
-                    public void onBindView(BannerImageHolder holder, AppHomeBean.ItemBean data, int position, int size) {
-                        Glide.with(holder.imageView)
-                                .load(data.coverImage)
-                                .thumbnail(Glide.with(holder.itemView).load(com.cooleshow.base.R.drawable.bg_video_placeholder))//加载成功前显示一个loading的加载
-                                //.apply(RequestOptions.bitmapTransform(new RoundedCorners(30)))  //设置图片圆角
-                                .into(holder.imageView);
+            @Override
+            public void onBindView(BannerImageHolder holder, AppHomeBean.ItemBean data, int position, int size) {
+                Glide.with(holder.imageView)
+                        .load(data.coverImage)
+                        .thumbnail(Glide.with(holder.itemView).load(com.cooleshow.base.R.drawable.bg_video_placeholder))//加载成功前显示一个loading的加载
+                        //.apply(RequestOptions.bitmapTransform(new RoundedCorners(30)))  //设置图片圆角
+                        .into(holder.imageView);
 
-                    }
-                }, true).addBannerLifecycleObserver(this)//添加生命周期观察者
+            }
+        }, true).addBannerLifecycleObserver(this)//添加生命周期观察者
                 .setIntercept(true) //是否要拦截事件
                 .setBannerRound(10f) //圆角
                 .isAutoLoop(true)
@@ -224,16 +228,13 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         presenter.queryLiveAndVideo();
         presenter.getStylePage();
 
-        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                mViewBinding.refreshLayout.finishRefresh();
-                presenter.appHome();
-                presenter.userAccountPage();
-                presenter.queryLiveAndVideo();
-                presenter.getStylePage();
-                presenter.queryUserInfo();
-            }
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            mViewBinding.refreshLayout.finishRefresh();
+            presenter.appHome();
+            presenter.userAccountPage();
+            presenter.queryLiveAndVideo();
+            presenter.getStylePage();
+            presenter.queryUserInfo();
         });
 
     }
@@ -251,7 +252,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         if (null == flashPage || flashPage.size() == 0) {
             return;
         }
-        if(isShowFlashPage){
+        if (isShowFlashPage) {
             return;
         }
         DialogUtils.showHomeDialog(getContext(), flashPage.get(0));
@@ -322,12 +323,13 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
 
         if (TextUtils.isEmpty(data.subjectName)) {
             ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
-                    .withBoolean("hintBar",true)
+                    .withBoolean("hintBar", true)
                     .navigation();
         }
     }
 
 
+    @SuppressLint("SetTextI18n")
     private void initRecentLive(HomeLiveAndVideoBean.RecentCoursesBean recentCourses) {
         if (null == recentCourses) {
             mViewBinding.clLive.setVisibility(View.GONE);
@@ -336,8 +338,15 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         mViewBinding.clLive.setVisibility(View.VISIBLE);
         GlideUtils.INSTANCE.loadImage(getContext(), recentCourses.avatar, mViewBinding.imLiveHeader, R.drawable.icon_student_default_head);
         mViewBinding.tvLiveTitle.setText(recentCourses.courseGroupName);
-        mViewBinding.tvLiveTime.setText(recentCourses.courseStartTime);
-        mViewBinding.tvGoLive.setOnClickListener(v->{
+        String currentTime = TimeUtils.date2String(new Date(System.currentTimeMillis()), "yyyy-MM-dd");
+        String startTime = TimeUtils.date2String(TimeUtils.getDate(recentCourses.courseStartTime), "yyyy-MM-dd");
+        if (!TextUtils.isEmpty(recentCourses.courseStartTime) && TextUtils.equals(currentTime, startTime)) {
+            String timeText = TimeUtils.date2String(TimeUtils.getDate(recentCourses.courseStartTime), "HH:mm");
+            mViewBinding.tvLiveTime.setText("今日 " + timeText);
+        } else {
+            mViewBinding.tvLiveTime.setText(TimeUtils.date2String(TimeUtils.getDate(recentCourses.courseStartTime), "yyyy-MM-dd HH:mm"));
+        }
+        mViewBinding.tvGoLive.setOnClickListener(v -> {
             //进入直播
             ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
                     .withString(SparringCourseDetailActivity.COURSE_ID, String.valueOf(recentCourses.courseId))
@@ -383,15 +392,12 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         mViewBinding.rvVideoCourse.setLayoutManager(manager);
         HomeVideoCourseAdapter homeLiveCourseAdapter = new HomeVideoCourseAdapter(liveList);
         mViewBinding.rvVideoCourse.setAdapter(homeLiveCourseAdapter);
-        homeLiveCourseAdapter.setOnItemClickListener(new OnItemClickListener() {
-            @Override
-            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
-                HomeLiveAndVideoBean.VideoCourseBean item = (HomeLiveAndVideoBean.VideoCourseBean) adapter.getItem(position);
-                ARouter.getInstance()
-                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                        .withString(WebConstants.WEB_URL, WebConstants.TEACHER_VIDEO_DETAIL + "?groupId=" + item.videoGroupId)
-                        .navigation();
-            }
+        homeLiveCourseAdapter.setOnItemClickListener((adapter, view, position) -> {
+            HomeLiveAndVideoBean.VideoCourseBean item = (HomeLiveAndVideoBean.VideoCourseBean) adapter.getItem(position);
+            ARouter.getInstance()
+                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_VIDEO_DETAIL + "?groupId=" + item.videoGroupId)
+                    .navigation();
         });
     }
 

+ 1 - 1
student/src/main/res/layout/fragment_home_layout.xml

@@ -121,7 +121,7 @@
                     android:layout_marginTop="@dimen/dp_17"
                     android:layout_marginRight="@dimen/dp_14"
                     android:background="@drawable/bg_white_30dp"
-                    android:visibility="invisible">
+                    android:visibility="gone">
 
                     <de.hdodenhof.circleimageview.CircleImageView
                         android:id="@+id/im_live_header"

+ 1 - 1
student/src/main/res/layout/item_live_course_list_layout.xml

@@ -82,7 +82,7 @@
         android:layout_marginStart="8dp"
         android:textColor="@color/color_ff802c"
         android:textSize="@dimen/sp_11"
-        android:visibility="visible"
+        android:visibility="gone"
         app:layout_constraintBottom_toBottomOf="@+id/view_line2"
         app:layout_constraintLeft_toRightOf="@+id/view_line2"
         app:layout_constraintTop_toTopOf="@+id/view_line2"

+ 16 - 22
teacher/src/main/AndroidManifest.xml

@@ -11,15 +11,13 @@
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
 
-
     <queries>
-        <package android:name="com.tencent.mm" />         <!--   // 指定微信包名-->
-        <package android:name="com.tencent.mobileqq" />    <!--//指定qq包名-->
-        <package android:name="com.sina.weibo" />          <!--   //指定微博包名-->
-        <package android:name="com.qzone" />              <!--     //指定QQ空间包名-->
+        <package android:name="com.tencent.mm" /> <!-- // 指定微信包名 -->
+        <package android:name="com.tencent.mobileqq" /> <!-- //指定qq包名 -->
+        <package android:name="com.sina.weibo" /> <!-- //指定微博包名 -->
+        <package android:name="com.qzone" /> <!-- //指定QQ空间包名 -->
     </queries>
 
-
     <application
         android:name=".App"
         android:allowBackup="true"
@@ -30,8 +28,15 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
 
+        <meta-data
+            android:name="design_width_in_dp"
+            android:value="375" />
+
+        <activity
+            android:name=".ui.mine.UnBindBankCardActivity"
+            android:exported="false" />
         <activity
-            android:name="com.cooleshow.teacher.ui.splash.SplashActivity"
+            android:name=".ui.splash.SplashActivity"
             android:exported="true"
             android:screenOrientation="portrait"
             android:theme="@style/SplashTheme">
@@ -58,7 +63,6 @@
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:exported="false"
             android:screenOrientation="portrait" />
-
         <activity
             android:name=".ui.splash.GuideActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
@@ -67,7 +71,6 @@
             android:name=".ui.course.MineCourseActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
-
         <activity
             android:name=".ui.web.WebActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
@@ -89,13 +92,11 @@
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustNothing" />
-
         <activity
             android:name=".ui.course.PianoRoomCourseDetailActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustNothing" />
-
         <activity
             android:name=".ui.course.PianoRoomCourseHomeWorkActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
@@ -110,12 +111,10 @@
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustPan" />
-
         <activity
             android:name=".ui.comment.CourseCommentDetailActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
-
         <activity
             android:name=".ui.homepage.HomePageActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
@@ -252,19 +251,18 @@
             android:name=".ui.mine.PayTestActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
-
         <activity
             android:name=".wxapi.WXPayEntryActivity"
             android:exported="true"
             android:launchMode="singleTop">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
+
                 <category android:name="android.intent.category.DEFAULT" />
+
                 <data android:scheme="wx149a928c415c137a" />
             </intent-filter>
-
         </activity>
-
         <activity
             android:name=".ui.work.AssignHomeworkActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
@@ -294,18 +292,15 @@
             android:windowSoftInputMode="adjustPan">
             <intent-filter>
                 <action android:name="com.cooleshow.student.ui.live.LiveRoomActivity" />
+
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
-        </activity>
-
-        <!--        分享开始-->
+        </activity> <!-- 分享开始 -->
         <activity
             android:name=".wxapi.WXEntryActivity"
             android:configChanges="keyboardHidden|orientation|screenSize"
             android:exported="true"
             android:theme="@android:style/Theme.Translucent.NoTitleBar" />
-
-
         <activity
             android:name="com.tencent.tauth.AuthActivity"
             android:launchMode="singleTask"
@@ -328,7 +323,6 @@
         <meta-data
             android:name="qqappid"
             android:value="1110018403" />
-        <!--        分享结束-->
     </application>
 
 </manifest>

+ 5 - 1
teacher/src/main/java/com/cooleshow/teacher/adapter/CourseTableListAdapter.kt

@@ -101,7 +101,11 @@ class CourseTableListAdapter(layoutResId: Int) :
                     //直播课隐藏
                     tvCourseStatusBt.setVisible(false)
                 }
-                tvCourseStatusBt.text = "评价"
+                if (data?.teacherReplied == 0) {
+                    tvCourseStatusBt.text = "评价"
+                } else {
+                    tvCourseStatusBt.text = "已评价"
+                }
                 baseViewHolder.setText(R.id.tv_course_status, "已结束")
                 tvCourseStatusBt.setBackgroundResource(R.drawable.shape_course_status_normal);
                 tvCourseStatusBt.setTextColor(context.resources.getColor(com.cooleshow.base.R.color.color_2dc7aa))

+ 36 - 8
teacher/src/main/java/com/cooleshow/teacher/adapter/HomeworkAdapter.java

@@ -14,6 +14,7 @@ import com.chad.library.adapter.base.module.BaseLoadMoreModule;
 import com.chad.library.adapter.base.module.LoadMoreModule;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
 import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.HomeworkListBean;
 import com.cooleshow.teacher.bean.MusicSheetListBean;
@@ -29,6 +30,8 @@ import java.util.List;
  */
 public class HomeworkAdapter extends BaseQuickAdapter<HomeworkListBean.RowsBean, BaseViewHolder> implements LoadMoreModule {
 
+    private String mDecorate;
+
     public HomeworkAdapter(List<HomeworkListBean.RowsBean> data) {
         super(R.layout.layout_item_homework, data);
     }
@@ -36,13 +39,27 @@ public class HomeworkAdapter extends BaseQuickAdapter<HomeworkListBean.RowsBean,
 
     @Override
     protected void convert(BaseViewHolder helper, HomeworkListBean.RowsBean item) {
-        TextView tv_date=helper.getView(R.id.tv_date);
-        TextView tv_state=helper.getView(R.id.tv_state);
-        ImageView im_header=helper.getView(R.id.im_header);
-        TextView tv_name=helper.getView(R.id.tv_name);
-        RecyclerView rv_mark=helper.getView(R.id.rv_mark);
-        GlideUtils.INSTANCE.loadImage(getContext(), item.teacherAvatar, im_header, R.drawable.icon_teacher_default_head);
-        tv_name.setText(item.teacherName);
+        TextView tv_state = helper.getView(R.id.tv_state);
+        ImageView im_header = helper.getView(R.id.im_header);
+        TextView tv_name = helper.getView(R.id.tv_name);
+        RecyclerView rv_mark = helper.getView(R.id.rv_mark);
+        GlideUtils.INSTANCE.loadImage(getContext(), item.studentAvatar, im_header, R.drawable.icon_teacher_default_head);
+        tv_name.setText(item.studentName);
+        if (TextUtils.equals(mDecorate, "YES")) {
+            tv_state.setVisibility(View.VISIBLE);
+            if (TextUtils.equals(item.homeworkStatus, "NOTCOMMIT")) {
+                tv_state.setText("未提交");
+                tv_state.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
+            } else if (TextUtils.equals(item.homeworkStatus, "NOTREVIEW")) {
+                tv_state.setText("未评价");
+                tv_state.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+            } else if (TextUtils.equals(item.homeworkStatus, "REVIEWED")) {
+                tv_state.setText("已点评");
+                tv_state.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
+            }
+        } else {
+            tv_state.setVisibility(View.GONE);
+        }
         if (!TextUtils.isEmpty(item.subjectName)) {
             rv_mark.setVisibility(View.VISIBLE);
             List<String> markList = new ArrayList<>();
@@ -62,8 +79,16 @@ public class HomeworkAdapter extends BaseQuickAdapter<HomeworkListBean.RowsBean,
         } else {
             rv_mark.setVisibility(View.GONE);
         }
-        tv_date.setText(item.classDate);
 
+        String endTime = TimeUtils.date2String(TimeUtils.getDate(item.endTime), "yyyy-MM-dd");
+        String startTime = TimeUtils.date2String(TimeUtils.getDate(item.startTime), "yyyy-MM-dd");
+        String startTimeText = TimeUtils.date2String(TimeUtils.getDate(item.startTime), "HH:mm");
+        String endTimeText = TimeUtils.date2String(TimeUtils.getDate(item.endTime), "HH:mm");
+        if (TextUtils.equals(endTime, startTime)) {
+            helper.setText(R.id.tv_date, startTime + " " + startTimeText + "-" + endTimeText);
+        } else {
+            helper.setText(R.id.tv_date, startTime + " " + startTimeText + "-" + endTime + " " + endTimeText);
+        }
     }
 
     @NonNull
@@ -72,4 +97,7 @@ public class HomeworkAdapter extends BaseQuickAdapter<HomeworkListBean.RowsBean,
         return new BaseLoadMoreModule(baseQuickAdapter);
     }
 
+    public void setDecorate(String decorate) {
+        mDecorate = decorate;
+    }
 }

+ 13 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/MineIncomeAdapter.java

@@ -1,5 +1,6 @@
 package com.cooleshow.teacher.adapter;
 
+import android.text.TextUtils;
 import android.view.View;
 import android.widget.ImageView;
 import android.widget.TextView;
@@ -10,10 +11,12 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.module.BaseLoadMoreModule;
 import com.chad.library.adapter.base.module.LoadMoreModule;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.MusicSheetListBean;
 import com.cooleshow.teacher.bean.UserAccountBean;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -65,6 +68,16 @@ public class MineIncomeAdapter extends BaseQuickAdapter<UserAccountBean.RowsBean
         tv_name.setText(item.bizName);
         tv_price.setText(item.transAmount + "");
         tv_date.setText(item.endTime);
+
+        String startTime = TimeUtils.date2String(TimeUtils.getDate(item.startTime), "yyyy-MM-dd");
+        String endTime = TimeUtils.date2String(TimeUtils.getDate(item.endTime), "yyyy-MM-dd");
+        String startTimeText = TimeUtils.date2String(TimeUtils.getDate(item.startTime), "HH:mm");
+        String endTimeText = TimeUtils.date2String(TimeUtils.getDate(item.endTime), "HH:mm");
+        if (TextUtils.equals(startTime, endTime)) {
+            tv_date.setText(startTime + " " + startTimeText + "-" + endTimeText);
+        } else {
+            tv_date.setText(startTime + " " + startTimeText + "-" + endTime + " " + endTimeText);
+        }
     }
 
     @NonNull

+ 13 - 5
teacher/src/main/java/com/cooleshow/teacher/adapter/MineStyleFansGroupListAdapter.java

@@ -2,6 +2,9 @@ package com.cooleshow.teacher.adapter;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.common.im.bean.ContactRoomListBean;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 
 import androidx.annotation.NonNull;
@@ -9,13 +12,18 @@ import androidx.annotation.NonNull;
 /**
  * Author by pq, Date on 2022/5/10.
  */
-public class MineStyleFansGroupListAdapter extends BaseQuickAdapter<TeacherSelfStyleInfoBean.StyleVideoBean, BaseViewHolder> {
-    public MineStyleFansGroupListAdapter(int layoutResId) {
-        super(layoutResId);
+public class MineStyleFansGroupListAdapter extends BaseQuickAdapter<ContactRoomListBean, BaseViewHolder> {
+    public MineStyleFansGroupListAdapter() {
+        super(R.layout.item_mine_style_fans_group_layout);
     }
 
     @Override
-    protected void convert(@NonNull BaseViewHolder holder, TeacherSelfStyleInfoBean.StyleVideoBean styleVideoBean) {
-
+    protected void convert(@NonNull BaseViewHolder holder, ContactRoomListBean bean) {
+        if (bean == null) {
+            return;
+        }
+        holder.setText(R.id.group_name, bean.getName());
+        holder.setText(R.id.group_desc, bean.getIntroduce());
+        GlideUtils.INSTANCE.loadImage(getContext(), bean.getImg(), holder.getView(R.id.group_aver), R.drawable.icon_group_fans);
     }
 }

+ 20 - 6
teacher/src/main/java/com/cooleshow/teacher/api/APIService.java

@@ -1,7 +1,10 @@
 package com.cooleshow.teacher.api;
 
+import com.common.im.bean.ContactRoomListBean;
 import com.cooleshow.base.data.net.BaseResponse;
 import com.cooleshow.teacher.bean.HomeLiveAndVideoBean;
+import com.cooleshow.teacher.bean.request.AssignHomeWorkEntry;
+import com.cooleshow.teacher.bean.request.CommentHomeWorkEntry;
 import com.cooleshow.teacher.bean.request.LiveCourseEntry;
 import com.cooleshow.teacher.bean.AccountDetailBean;
 import com.cooleshow.teacher.bean.AccountTotalBean;
@@ -40,6 +43,9 @@ import com.cooleshow.teacher.bean.UserAccountBean;
 import com.cooleshow.teacher.bean.VideoCourseListBean;
 import com.cooleshow.teacher.bean.WithdrawalInfoBean;
 import com.cooleshow.teacher.bean.WithdrawalRecordBean;
+import com.cooleshow.teacher.bean.request.QueryGroupListEntry;
+import com.cooleshow.teacher.bean.request.SheetMusicEntry;
+import com.cooleshow.teacher.bean.request.UnBindCardEntry;
 import com.cooleshow.usercenter.bean.SetDetailBean;
 import com.cooleshow.usercenter.bean.UserInfo;
 
@@ -111,7 +117,7 @@ public interface APIService {
      *
      * @return
      */
-    @POST(STUDENT_GROUP + "student/querySubjectItem")
+    @POST(TEACHER_GROUP + "teacher/querySubjectItem")
     Observable<BaseResponse<List<QuerySubjectBean>>> querySubjectItem();
 
     /**
@@ -212,7 +218,7 @@ public interface APIService {
      * @return
      */
     @POST(TEACHER_GROUP + "homework/decorate")
-    Observable<BaseResponse<Object>> submitSparringCourseHomework(@Body RequestBody body);
+    Observable<BaseResponse<Object>> submitSparringCourseHomework(@Body AssignHomeWorkEntry body);
 
     /**
      * 提交陪练课老师作业点评
@@ -221,7 +227,7 @@ public interface APIService {
      * @return
      */
     @POST(TEACHER_GROUP + "homework/review")
-    Observable<BaseResponse<Object>> submitSparringCourseHomeworkComment(@Body RequestBody body);
+    Observable<BaseResponse<Object>> submitSparringCourseHomeworkComment(@Body CommentHomeWorkEntry body);
 
     /**
      * 查询直播课
@@ -270,6 +276,14 @@ public interface APIService {
     Observable<BaseResponse<TeacherSelfStyleInfoBean>> getTeacherSelfStyle();
 
     /**
+     * 群列表-老师
+     *
+     * @return
+     */
+    @POST(TEACHER_GROUP + "imGroup/queryAll")
+    Observable<BaseResponse<List<ContactRoomListBean>>> queryTeaGroupList(@Body QueryGroupListEntry requestBody);
+
+    /**
      * 查询我收到的评价
      *
      * @param
@@ -295,7 +309,7 @@ public interface APIService {
      * @return
      */
     @POST(TEACHER_GROUP + "music/sheet/list")
-    Observable<BaseResponse<HomePageSheetMusicListBean>> getSheetMusicList(@Body RequestBody body);
+    Observable<BaseResponse<HomePageSheetMusicListBean>> getSheetMusicList(@Body SheetMusicEntry body);
 
     /**
      * 乐器列表查询
@@ -447,11 +461,11 @@ public interface APIService {
     /**
      * 用户解绑银行卡
      *
-     * @param body
+     * @param entry
      * @return
      */
     @POST(TEACHER_GROUP + "userBankCard/unBind")
-    Observable<BaseResponse<ResponseBindCardBean>> unbindBankCard(@Body RequestBody body);
+    Observable<BaseResponse<ResponseBindCardBean>> unbindBankCard(@Body UnBindCardEntry entry);
 
 
     /**

+ 1 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/CourseTableDataBean.java

@@ -61,5 +61,6 @@ public class CourseTableDataBean {
         public String cover;
         public String payCount;
         public String name;
+        public int teacherReplied;
     }
 }

+ 46 - 29
teacher/src/main/java/com/cooleshow/teacher/bean/HomeworkListBean.java

@@ -1,5 +1,10 @@
 package com.cooleshow.teacher.bean;
 
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -19,39 +24,51 @@ public class HomeworkListBean {
     public List<RowsBean> rows;
 
     public static class RowsBean {
-        /*
-
-
-        	"absenteeism": "",
-                    "classDate": "",
-                    "courseGroupId": 0,
-                    "courseId": 0,
-                    "decorateTime": "",
-                    "endTime": "",
-                    "startTime": "",
-                    "studentAvatar": "",
-                    "studentId": 0,
-                    "studentName": "",
-                    "subjectName": "",
-                    "submitTime": "",
-                    "teacherAvatar": "",
-                    "teacherId": 0,
-                    "teacherName": ""
-         */
-        public String absenteeism;
-        public String classDate;
-        public int courseGroupId;
-        public int courseId;
-        public String decorateTime;
+        public String startTime;
         public String endTime;
-        public String studentAvatar;
-        public int studentId;
-        public String studentName;
+        public String studentId;
+        public String courseId;
+        public String backgroundPic;
         public String subjectName;
-        public String submitTime;
-        public String teacherAvatar;
+        public int courseGroupId;
         public int teacherId;
+        public int classNum;
+        public String studentAvatar;
+        public String studentName;
         public String teacherName;
+        public String teacherAvatar;
+        public int absenteeism;
+        public String courseGroupName;
+        public String classDate;
+        public String homeworkStatus;
+        public Object submitTime;
+        public Object decorateTime;
+        public int homeworkId;
+        public String type;
+        /*
+            "startTime": "2022-06-30 13:00:00",
+			"endTime": "2022-06-30 13:45:00",
+			"studentId": 581,
+			"courseId": 1429,
+			"backgroundPic": "",
+			"subjectName": "架子鼓",
+			"courseGroupId": 482,
+			"teacherId": 579,
+			"classNum": 1,
+			"studentAvatar": "https://ks3-cn-beijing.ksyuncs.com/daya/android/2022-06/1656470726398_1656470726398.jpg",
+			"studentName": "13310629003",
+			"teacherName": "3at",
+			"teacherAvatar": "https://ks3-cn-beijing.ksyuncs.com/daya/android/2022-06/1656469925640_1656469925640.jpg",
+			"absenteeism": 0,
+			"courseGroupName": "架子鼓陪练课",
+			"classDate": "2022-06-30 00:00:00",
+			"homeworkStatus": "NOTCOMMIT",
+			"submitTime": null,
+			"decorateTime": null,
+			"homeworkId": 0,
+			"type": "PRACTICE"
+         */
+        
 
     }
 }

+ 12 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/request/AssignHomeWorkEntry.java

@@ -0,0 +1,12 @@
+package com.cooleshow.teacher.bean.request;
+
+/**
+ * @author dengqw
+ * @time 2022/7/1 00:12
+ * @describe:
+ **/
+public class AssignHomeWorkEntry {
+    public String courseScheduleId;
+    public String content;
+    public String attachments;
+}

+ 12 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/request/CommentHomeWorkEntry.java

@@ -0,0 +1,12 @@
+package com.cooleshow.teacher.bean.request;
+
+/**
+ * @author dengqw
+ * @time 2022/7/1 00:15
+ * @describe:
+ **/
+public class CommentHomeWorkEntry {
+    public String courseScheduleId;
+    public String review;
+    public String studentId;
+}

+ 13 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/request/QueryGroupListEntry.java

@@ -0,0 +1,13 @@
+package com.cooleshow.teacher.bean.request;
+
+/**
+ * @author dengqw
+ * @time 2022/6/30 22:36
+ * @describe:
+ **/
+public class QueryGroupListEntry {
+    public String search;
+    public String createUserId;
+    public String userId;
+    public String type;
+}

+ 14 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/request/SheetMusicEntry.java

@@ -0,0 +1,14 @@
+package com.cooleshow.teacher.bean.request;
+
+/**
+ * @author dengqw
+ * @time 2022/6/30 22:14
+ * @describe:查询乐谱
+ **/
+public class SheetMusicEntry {
+    public String idAndName;
+    public String subjectIds;
+    public String auditStatus;
+    public int page;
+    public int rows;
+}

+ 12 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/request/UnBindCardEntry.java

@@ -0,0 +1,12 @@
+package com.cooleshow.teacher.bean.request;
+
+/**
+ * @author dengqw
+ * @time 2022/6/30 14:58
+ * @describe:
+ **/
+public class UnBindCardEntry {
+    public String id;
+    public String idCardNo;
+    public String name;
+}

+ 6 - 0
teacher/src/main/java/com/cooleshow/teacher/constants/AssignHomeworkContract.java

@@ -1,6 +1,7 @@
 package com.cooleshow.teacher.constants;
 
 import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.teacher.bean.SparringCourseHomeworkBean;
 
 /**
  * 创建日期:2022/5/31 15:48
@@ -10,8 +11,13 @@ import com.cooleshow.base.presenter.view.BaseView;
  */
 public interface AssignHomeworkContract {
     interface AssignHomeworkView extends BaseView {
+        void getSparringCourseHomework(SparringCourseHomeworkBean bean);
 
+        void submitSparringCourseHomeworkSuccess();
+
+        void submitSparringCourseHomeworkCommentSuccess();
     }
+
     interface Presenter {
     }
 }

+ 14 - 0
teacher/src/main/java/com/cooleshow/teacher/constants/TeacherConfig.java

@@ -0,0 +1,14 @@
+package com.cooleshow.teacher.constants;
+
+/**
+ * @author dengqw
+ * @time 2022/6/30 15:01
+ * @describe:
+ **/
+public class TeacherConfig {
+    public static final String BANK_CARD_ID="bank_card_id";
+    public static final String BANK_NAME="bank_name";
+    public static final String BANK_CARD="bank_card";
+    public static final String COURSE_ID="course_id";
+    public static final String STUDENT_ID="student_id";
+}

+ 5 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/MineStyleContract.java

@@ -1,8 +1,11 @@
 package com.cooleshow.teacher.contract;
 
+import com.common.im.bean.ContactRoomListBean;
 import com.cooleshow.base.presenter.view.BaseView;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 
+import java.util.List;
+
 /**
  * Author by pq, Date on 2022/4/20.
  */
@@ -10,6 +13,8 @@ public interface MineStyleContract {
 
     interface MineStylePageView extends BaseView {
         void getSelfStyleSuccess(TeacherSelfStyleInfoBean styleInfoBean);
+
+        void getFunGroupList(List<ContactRoomListBean> list);
     }
 
     interface Presenter {

+ 2 - 1
teacher/src/main/java/com/cooleshow/teacher/contract/MyBankCardContract.java

@@ -13,9 +13,10 @@ import com.cooleshow.teacher.bean.ResponseBindCardBean;
 public interface MyBankCardContract {
     interface MyBankCardView extends BaseView {
         void querySuccess(int page, ResponseBankCardBean data);
-        void unbindBankCardSuccess(ResponseBindCardBean data);
 
+        void unbindBankCard(boolean isSuccess);
     }
+
     interface Presenter {
     }
 }

+ 6 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/SheetMusicPageContract.java

@@ -2,6 +2,9 @@ package com.cooleshow.teacher.contract;
 
 import com.cooleshow.base.presenter.view.BaseView;
 import com.cooleshow.teacher.bean.HomePageSheetMusicListBean;
+import com.cooleshow.teacher.bean.QuerySubjectBean;
+
+import java.util.List;
 
 /**
  * Author by pq, Date on 2022/4/20.
@@ -12,6 +15,9 @@ public interface SheetMusicPageContract {
         void getSheetMusicListSuccess(int page, HomePageSheetMusicListBean sheetMusicListBean);
 
         void getSheetMusicListError(int page);
+
+        void querySubjectItemSuccess(List<QuerySubjectBean> data);
+
     }
 
     interface Presenter {

+ 6 - 10
teacher/src/main/java/com/cooleshow/teacher/presenter/course/PianoRoomDetailPresenter.java

@@ -5,6 +5,7 @@ import com.cooleshow.base.rx.BaseObserver;
 import com.cooleshow.base.utils.RequestBodyUtil;
 import com.cooleshow.teacher.api.APIService;
 import com.cooleshow.teacher.bean.PianoRoomCourseInfoBean;
+import com.cooleshow.teacher.bean.request.AssignHomeWorkEntry;
 import com.cooleshow.teacher.contract.PianoRoomCourseDetailContract;
 
 import org.json.JSONException;
@@ -51,16 +52,11 @@ public class PianoRoomDetailPresenter extends BasePresenter<PianoRoomCourseDetai
         if (getView() != null) {
             getView().showLoading();
         }
-        JSONObject jsonObject = new JSONObject();
-        try {
-            jsonObject.putOpt("courseScheduleId", courseScheduleId);
-            jsonObject.putOpt("content", commentContent);
-            jsonObject.putOpt("attachments", commentContent);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-
-        addSubscribe(create(APIService.class).submitSparringCourseHomework(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<Object>(getView()) {
+        AssignHomeWorkEntry entry = new AssignHomeWorkEntry();
+        entry.courseScheduleId = courseScheduleId;
+        entry.content = commentContent;
+        entry.attachments = commentContent;
+        addSubscribe(create(APIService.class).submitSparringCourseHomework(entry), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object o) {
                 if (getView() != null) {

+ 12 - 19
teacher/src/main/java/com/cooleshow/teacher/presenter/course/SparringCourseDetailPresenter.java

@@ -7,6 +7,8 @@ import com.cooleshow.teacher.api.APIService;
 import com.cooleshow.teacher.bean.SparringCourseCommentBean;
 import com.cooleshow.teacher.bean.SparringCourseHomeworkBean;
 import com.cooleshow.teacher.bean.SparringCourseListBean;
+import com.cooleshow.teacher.bean.request.AssignHomeWorkEntry;
+import com.cooleshow.teacher.bean.request.CommentHomeWorkEntry;
 import com.cooleshow.teacher.contract.SparringCourseDetailContract;
 
 import org.json.JSONException;
@@ -115,16 +117,11 @@ public class SparringCourseDetailPresenter extends BasePresenter<SparringCourseD
         if (getView() != null) {
             getView().showLoading();
         }
-        JSONObject jsonObject = new JSONObject();
-        try {
-            jsonObject.putOpt("courseScheduleId", courseScheduleId);
-            jsonObject.putOpt("content", commentContent);
-            jsonObject.putOpt("attachments", commentContent);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-
-        addSubscribe(create(APIService.class).submitSparringCourseHomework(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<Object>(getView()) {
+        AssignHomeWorkEntry entry = new AssignHomeWorkEntry();
+        entry.courseScheduleId = courseScheduleId;
+        entry.content = commentContent;
+        entry.attachments = commentContent;
+        addSubscribe(create(APIService.class).submitSparringCourseHomework(entry), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object o) {
                 if (getView() != null) {
@@ -144,16 +141,12 @@ public class SparringCourseDetailPresenter extends BasePresenter<SparringCourseD
         if (getView() != null) {
             getView().showLoading();
         }
-        JSONObject jsonObject = new JSONObject();
-        try {
-            jsonObject.putOpt("courseScheduleId", courseScheduleId);
-            jsonObject.putOpt("review", commentContent);
-            jsonObject.putOpt("studentId", studentId);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
+        CommentHomeWorkEntry entry = new CommentHomeWorkEntry();
+        entry.courseScheduleId = courseScheduleId;
+        entry.review = commentContent;
+        entry.studentId = studentId;
 
-        addSubscribe(create(APIService.class).submitSparringCourseHomeworkComment(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<Object>(getView()) {
+        addSubscribe(create(APIService.class).submitSparringCourseHomeworkComment(entry), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object o) {
                 if (getView() != null) {

+ 17 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/homePage/MineStylePresenter.java

@@ -1,14 +1,18 @@
 package com.cooleshow.teacher.presenter.homePage;
 
+import com.common.im.bean.ContactRoomListBean;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
 import com.cooleshow.teacher.api.APIService;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 import com.cooleshow.teacher.bean.TeacherUserInfo;
+import com.cooleshow.teacher.bean.request.QueryGroupListEntry;
 import com.cooleshow.teacher.contract.HomePageContract;
 import com.cooleshow.teacher.contract.MineStyleContract;
 import com.cooleshow.usercenter.bean.UserInfo;
 
+import java.util.List;
+
 /**
  * Author by pq, Date on 2022/4/20.
  */
@@ -41,4 +45,17 @@ public class MineStylePresenter extends BasePresenter<MineStyleContract.MineStyl
             }
         });
     }
+
+    public void getTeaGroupList() {
+        QueryGroupListEntry entry = new QueryGroupListEntry();
+        entry.type = "FAN";
+        addSubscribe(create(APIService.class).queryTeaGroupList(entry), new BaseObserver<List<ContactRoomListBean>>(getView()) {
+            @Override
+            protected void onSuccess(List<ContactRoomListBean> list) {
+                if (getView() != null) {
+                    getView().getFunGroupList(list);
+                }
+            }
+        });
+    }
 }

+ 29 - 11
teacher/src/main/java/com/cooleshow/teacher/presenter/homePage/SheetMusicPagePresenter.java

@@ -6,7 +6,9 @@ import com.cooleshow.base.rx.BaseObserver;
 import com.cooleshow.base.utils.RequestBodyUtil;
 import com.cooleshow.teacher.api.APIService;
 import com.cooleshow.teacher.bean.HomePageSheetMusicListBean;
+import com.cooleshow.teacher.bean.QuerySubjectBean;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
+import com.cooleshow.teacher.bean.request.SheetMusicEntry;
 import com.cooleshow.teacher.contract.LiveCoursePageContract;
 import com.cooleshow.teacher.contract.SheetMusicPageContract;
 import com.cooleshow.usercenter.bean.UserInfo;
@@ -14,6 +16,8 @@ import com.cooleshow.usercenter.bean.UserInfo;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.util.List;
+
 /**
  * Author by pq, Date on 2022/4/20.
  */
@@ -40,20 +44,17 @@ public class SheetMusicPagePresenter extends BasePresenter<SheetMusicPageContrac
     /**
      * 老师个人主页->曲谱列表
      */
-    public void getSheetMusicList(boolean isShowLoading, int page) {
+    public void getSheetMusicList(boolean isShowLoading, int page, String idAndName, String subjectIds) {
         if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
-        JSONObject jsonObject = new JSONObject();
-        try {
-            jsonObject.putOpt("auditStatus", SHEET_MUSIC_STATUS_PASS);//0:停用,1:启用
-            jsonObject.putOpt("page", page);
-            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-
-        addSubscribe(create(APIService.class).getSheetMusicList(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<HomePageSheetMusicListBean>(getView()) {
+        SheetMusicEntry entry = new SheetMusicEntry();
+        entry.idAndName = idAndName;
+        entry.subjectIds = subjectIds;
+        entry.auditStatus = SHEET_MUSIC_STATUS_PASS;
+        entry.page = page;
+        entry.rows = Constants.DEFAULT_DATA_SIZE;
+        addSubscribe(create(APIService.class).getSheetMusicList(entry), new BaseObserver<HomePageSheetMusicListBean>(getView()) {
             @Override
             protected void onSuccess(HomePageSheetMusicListBean data) {
                 if (getView() != null) {
@@ -70,4 +71,21 @@ public class SheetMusicPagePresenter extends BasePresenter<SheetMusicPageContrac
             }
         });
     }
+
+    public void querySubjectItem() {
+        addSubscribe(create(APIService.class).querySubjectItem(), new BaseObserver<List<QuerySubjectBean>>(getView()) {
+            @Override
+            protected void onSuccess(List<QuerySubjectBean> data) {
+                if (getView() != null) {
+                    getView().querySubjectItemSuccess(data);
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+
+            }
+        });
+    }
 }

+ 81 - 1
teacher/src/main/java/com/cooleshow/teacher/presenter/homework/AssignHomeworkPresenter.java

@@ -1,8 +1,18 @@
 package com.cooleshow.teacher.presenter.homework;
 
 import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.bean.HomeworkListBean;
+import com.cooleshow.teacher.bean.SparringCourseHomeworkBean;
+import com.cooleshow.teacher.bean.request.AssignHomeWorkEntry;
+import com.cooleshow.teacher.bean.request.CommentHomeWorkEntry;
 import com.cooleshow.teacher.constants.AssignHomeworkContract;
-import com.cooleshow.teacher.contract.AboutContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
 
 /**
  * 创建日期:2022/5/31 15:48
@@ -12,4 +22,74 @@ import com.cooleshow.teacher.contract.AboutContract;
  */
 public class AssignHomeworkPresenter extends BasePresenter<AssignHomeworkContract.AssignHomeworkView> implements AssignHomeworkContract.Presenter {
 
+    public void getCourseDetail(String courseId, String studentId) {
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        addSubscribe(create(APIService.class).getSparringCourseHomework(courseId, studentId), new BaseObserver<SparringCourseHomeworkBean>(getView()) {
+            @Override
+            protected void onSuccess(SparringCourseHomeworkBean data) {
+                if (getView() != null) {
+                    getView().getSparringCourseHomework(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+            }
+        });
+    }
+
+    public void submitSparringCourseHomework(String content, String courseId) {
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        AssignHomeWorkEntry entry = new AssignHomeWorkEntry();
+        entry.courseScheduleId = courseId;
+        entry.content = content;
+        entry.attachments = content;
+
+        addSubscribe(create(APIService.class).submitSparringCourseHomework(entry), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object o) {
+                if (getView() != null) {
+                    getView().submitSparringCourseHomeworkSuccess();
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+            }
+        });
+    }
+    public void submitSparringCourseHomeworkComment(String commentContent, String courseScheduleId,String studentId ) {
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        CommentHomeWorkEntry entry = new CommentHomeWorkEntry();
+        entry.courseScheduleId = courseScheduleId;
+        entry.review = commentContent;
+        entry.studentId = studentId;
+        addSubscribe(create(APIService.class).submitSparringCourseHomeworkComment(entry), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object o) {
+                if (getView() != null) {
+                    getView().submitSparringCourseHomeworkCommentSuccess();
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+            }
+        });
+    }
 }

+ 10 - 7
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/MyBankCardPresenter.java

@@ -10,6 +10,7 @@ import com.cooleshow.base.utils.ErrorParse;
 import com.cooleshow.teacher.api.APIService;
 import com.cooleshow.teacher.bean.ResponseBankCardBean;
 import com.cooleshow.teacher.bean.ResponseBindCardBean;
+import com.cooleshow.teacher.bean.request.UnBindCardEntry;
 import com.cooleshow.teacher.contract.MyBankCardContract;
 
 import org.json.JSONException;
@@ -50,13 +51,17 @@ public class MyBankCardPresenter extends BasePresenter<MyBankCardContract.MyBank
         });
     }
 
-    public void unBindBankCard(String jsonStr) {
+    public void unBindBankCard(String id ,String realName,String realIdCard) {
+        UnBindCardEntry entry = new UnBindCardEntry();
+        entry.name = realName;
+        entry.id = id;
+        entry.idCardNo = realIdCard;
         getView().showLoading();
-        addSubscribe(create(APIService.class).unbindBankCard(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<ResponseBindCardBean>(getView()) {
+        addSubscribe(create(APIService.class).unbindBankCard(entry), new BaseObserver<ResponseBindCardBean>(getView()) {
             @Override
             protected void onSuccess(ResponseBindCardBean data) {
                 if (getView() != null) {
-                    getView().unbindBankCardSuccess(data);
+                    getView().unbindBankCard(true);
                 }
             }
 
@@ -69,10 +74,8 @@ public class MyBankCardPresenter extends BasePresenter<MyBankCardContract.MyBank
             @Override
             public void onError(Throwable e) {
                 super.onError(e);
-                if (e instanceof ApiException) {
-                    ErrorParse.getInstance().parseError(e);
-                    ApiException apiException = (ApiException) e;
-                    ToastUtils.showShort(apiException.getErrmsg());
+                if (getView() != null) {
+                    getView().unbindBankCard(true);
                 }
             }
         });

+ 6 - 8
teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentDetailActivity.java

@@ -22,6 +22,7 @@ import androidx.annotation.Nullable;
 
 /**
  * Author by pq, Date on 2022/5/5.
+ * 老师端-陪练课详情
  */
 @Route(path = RouterPath.CommentCenter.TEACHER_COURSE_COMMENT_DETAIL)
 public class CourseCommentDetailActivity extends BaseMVPActivity<ActivityCourseCommentDetailLayoutBinding, CourseCommentDetailPresenter> implements CourseCommentDetailContract.CourseCommentDetailView, View.OnClickListener {
@@ -83,14 +84,11 @@ public class CourseCommentDetailActivity extends BaseMVPActivity<ActivityCourseC
     private void showSetCommentDialog() {
         if (mSetCommentDialog == null) {
             mSetCommentDialog = new CourseSetCommentDialog(this);
-            mSetCommentDialog.setOnSubmitClickListener(new CourseSetCommentDialog.OnSubmitClickListener() {
-                @Override
-                public void onSubmit(String content, int type) {
-                    //提交
-                    viewBinding.tvTeacherAppraisalEmptyText.setVisibility(View.GONE);
-                    viewBinding.tvTeacherAppraisalContent.setVisibility(View.VISIBLE);
-                    viewBinding.tvTeacherAppraisalContent.setText(content);
-                }
+            mSetCommentDialog.setOnSubmitClickListener((content, type) -> {
+                //提交
+                viewBinding.tvTeacherAppraisalEmptyText.setVisibility(View.GONE);
+                viewBinding.tvTeacherAppraisalContent.setVisibility(View.VISIBLE);
+                viewBinding.tvTeacherAppraisalContent.setText(content);
             });
         }
         if (!mSetCommentDialog.isShowing()) {

+ 11 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/course/SparringCourseDetailActivity.java

@@ -9,6 +9,7 @@ import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.SizeUtils;
+import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.base.utils.ToastUtil;
 import com.cooleshow.base.widgets.VideoThumbnailView;
 import com.cooleshow.teacher.R;
@@ -95,8 +96,6 @@ public class SparringCourseDetailActivity extends BaseMVPActivity<ActivitySparri
         if (infoBean == null) {
             return;
         }
-        //时间
-        viewBinding.tvCourseTime.setText(infoBean.classDate);
         //学生头像
         GlideUtils.INSTANCE.loadImage(this, infoBean.studentAvatar, viewBinding.ivAvatar, R.drawable.icon_teacher_default_head);
         //title
@@ -104,6 +103,16 @@ public class SparringCourseDetailActivity extends BaseMVPActivity<ActivitySparri
         //subjectName
         viewBinding.tvCourseName.setText(infoBean.subjectName);
 
+        String startTime = TimeUtils.date2String(TimeUtils.getDate(infoBean.startTime), "yyyy-MM-dd");
+        String endTime = TimeUtils.date2String(TimeUtils.getDate(infoBean.endTime), "yyyy-MM-dd");
+        if (TextUtils.equals(startTime, endTime)) {
+            String startTimeText = TimeUtils.date2String(TimeUtils.getDate(infoBean.startTime), "HH:mm");
+            String endTimeText = TimeUtils.date2String(TimeUtils.getDate(infoBean.endTime), "HH:mm");
+            viewBinding.tvCourseTime.setText(startTime + " " + startTimeText + "-" + endTimeText);
+        } else {
+            viewBinding.tvCourseTime.setText(infoBean.startTime + "-" + infoBean.endTime);
+        }
+
         String status = infoBean.courseStatus;
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, status)) {
             //课程未开始

+ 28 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/homepage/MineStyleFragment.java

@@ -4,6 +4,9 @@ import android.text.TextUtils;
 import android.view.View;
 
 import com.alibaba.android.arouter.launcher.ARouter;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.listener.OnItemClickListener;
+import com.common.im.bean.ContactRoomListBean;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.SizeUtils;
@@ -17,9 +20,14 @@ import com.cooleshow.teacher.presenter.homePage.MineStylePresenter;
 import com.cooleshow.teacher.widgets.MineStyleVideoListItemDecoration;
 import com.cooleshow.teacher.widgets.StyleEmptyView;
 
+import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.GridLayoutManager;
 import androidx.recyclerview.widget.LinearLayoutManager;
 
+import java.util.List;
+
+import io.rong.imkit.RongIM;
+
 /**
  * Author by pq, Date on 2022/5/9.
  */
@@ -46,7 +54,7 @@ public class MineStyleFragment extends BaseMVPFragment<FragmentMineStyleLayoutBi
                 });
         mStyleVideoListAdapter.setEmptyView(styleEmptyView);
 
-        mFansGroupListAdapter = new MineStyleFansGroupListAdapter(R.layout.item_mine_style_fans_group_layout);
+        mFansGroupListAdapter = new MineStyleFansGroupListAdapter();
         mViewBinding.recyclerViewFans.setLayoutManager(new LinearLayoutManager(getContext()));
         mViewBinding.recyclerViewFans.setAdapter(mFansGroupListAdapter);
         mViewBinding.recyclerView.setNestedScrollingEnabled(false);
@@ -60,6 +68,10 @@ public class MineStyleFragment extends BaseMVPFragment<FragmentMineStyleLayoutBi
                             .navigation();
                 });
         mFansGroupListAdapter.setEmptyView(fansEmptyView);
+        mFansGroupListAdapter.setOnItemClickListener((adapter, view, position) -> {
+            ContactRoomListBean item = (ContactRoomListBean) adapter.getItem(position);
+            goChat(item.getId() + "", item.getName());
+        });
     }
 
     @Override
@@ -70,6 +82,7 @@ public class MineStyleFragment extends BaseMVPFragment<FragmentMineStyleLayoutBi
     public void onResume() {
         super.onResume();
         presenter.getTeacherSelfStyle();
+        presenter.getTeaGroupList();
     }
 
     @Override
@@ -109,4 +122,18 @@ public class MineStyleFragment extends BaseMVPFragment<FragmentMineStyleLayoutBi
         }
 
     }
+
+    /**
+     * 获取粉丝群
+     *
+     * @param list
+     */
+    @Override
+    public void getFunGroupList(List<ContactRoomListBean> list) {
+        mFansGroupListAdapter.setNewInstance(list);
+    }
+
+    private void goChat(String groupId, String groupName) {
+        RongIM.getInstance().startGroupChat(getContext(), groupId, groupName);
+    }
 }

+ 75 - 19
teacher/src/main/java/com/cooleshow/teacher/ui/homepage/SheetMusicPageFragment.java

@@ -8,9 +8,12 @@ import com.cooleshow.base.constanst.Constants;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.helper.WebStartHelper;
 import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.base.widgets.poplist.PopMenuBean;
+import com.cooleshow.base.widgets.poplist.PopupListWindow;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.HomePageSheetMusicAdapter;
 import com.cooleshow.teacher.bean.HomePageSheetMusicListBean;
+import com.cooleshow.teacher.bean.QuerySubjectBean;
 import com.cooleshow.teacher.constants.TeacherInfoConstants;
 import com.cooleshow.teacher.contract.SheetMusicPageContract;
 import com.cooleshow.teacher.databinding.FragmentSheetMusicPageLayoutBinding;
@@ -21,6 +24,9 @@ import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
 import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.LinearLayoutManager;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Author by pq, Date on 2022/5/9.
  * 老师个人主页->曲谱列表
@@ -33,36 +39,32 @@ public class SheetMusicPageFragment extends BaseMVPFragment<FragmentSheetMusicPa
     private EmptyViewLayout mEmptyView;
     private View mCertTipView;
     private String musicPersonCertStatus = TeacherInfoConstants.MUSICIAN_STATUS_UNPAALY;
+    private List<QuerySubjectBean> subjectBeanList = new ArrayList<>();
+    private int currentSubjectId = 0;
+    private String mIdNames;
 
     @Override
     protected void initView(View rootView) {
         mViewBinding.viewUploadBg.setOnClickListener(this);
+        presenter.querySubjectItem();
     }
 
     @Override
     protected void initData() {
         mAdapter = new HomePageSheetMusicAdapter(R.layout.item_home_page_sheet_music_layout);
-        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                currentPage = 1;
-                queryList(true);
-            }
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            currentPage = 1;
+            queryList(true);
         });
 
-        mAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
-            @Override
-            public void onLoadMore() {
-                //上拉加载
-                if (hasNext) {
-                    currentPage++;
-                    queryList(false);
-                } else {
-                    mAdapter.getLoadMoreModule().loadMoreEnd();
-                }
+        mAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
+            //上拉加载
+            if (hasNext) {
+                currentPage++;
+                queryList(false);
+            } else {
+                mAdapter.getLoadMoreModule().loadMoreEnd();
             }
-
-
         });
         mViewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
         mViewBinding.recyclerView.setAdapter(mAdapter);
@@ -81,6 +83,12 @@ public class SheetMusicPageFragment extends BaseMVPFragment<FragmentSheetMusicPa
         }
         if (TextUtils.equals(musicPersonCertStatus, TeacherInfoConstants.MUSICIAN_STATUS_PASS)) {
             mViewBinding.groupContent.setVisibility(View.VISIBLE);
+            mViewBinding.searchView.setOnLeftClickListener(v -> {
+                selectVocalPart();
+            });
+            mViewBinding.searchView.setOnSearchListener(v -> {
+                musicSearch();
+            });
             queryList(true);
             if (mCertTipView != null) {
                 mCertTipView.setVisibility(View.GONE);
@@ -96,8 +104,49 @@ public class SheetMusicPageFragment extends BaseMVPFragment<FragmentSheetMusicPa
         }
     }
 
+    /**
+     * 乐谱搜索
+     */
+    private void musicSearch() {
+        mIdNames = mViewBinding.searchView.getSearchEdit().getText().toString();
+        queryList(true);
+    }
+
+    /**
+     * 选择声部
+     */
+    private void selectVocalPart() {
+        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.searchView, popList, position -> {
+            QuerySubjectBean bean = subjectBeanList.get(position);
+            currentSubjectId = bean.id;
+            mViewBinding.searchView.getLeftText().setText(bean.name);
+            queryList(true);
+        });
+    }
+
+    /**
+     * 选择声部pop
+     *
+     * @param targetView
+     * @param popList
+     * @param listener
+     */
+    private void initCoursePop(View targetView, List<PopMenuBean> popList, PopupListWindow.PopupListListener listener) {
+        PopupListWindow popWindow = new PopupListWindow(getContext());
+        popWindow.showListPop(targetView, popList, position -> listener.onPopupListClick(position));
+    }
+
     private void queryList(boolean isShowLoading) {
-        presenter.getSheetMusicList(isShowLoading, currentPage);
+        presenter.getSheetMusicList(isShowLoading, currentPage, mIdNames, String.valueOf(currentSubjectId));
     }
 
     @Override
@@ -179,6 +228,13 @@ public class SheetMusicPageFragment extends BaseMVPFragment<FragmentSheetMusicPa
         }
     }
 
+    @Override
+    public void querySubjectItemSuccess(List<QuerySubjectBean> data) {
+        subjectBeanList.clear();
+        subjectBeanList.add(new QuerySubjectBean("声部", 0));
+        subjectBeanList.addAll(data);
+    }
+
     /**
      * 设置音乐人认证状态
      *

+ 42 - 36
teacher/src/main/java/com/cooleshow/teacher/ui/main/CourseTableFragment.kt

@@ -106,7 +106,7 @@ class CourseTableFragment :
             }
         })
 
-        adapter.setOnItemChildClickListener(OnItemChildClickListener { adapter, view, position ->
+        adapter.setOnItemChildClickListener { adapter, view, position ->
             var data: CourseTableDataBean.StudentListBean =
                 adapter.data[position] as CourseTableDataBean.StudentListBean;
             if (view.id == R.id.tv_course_status_bt) {
@@ -114,50 +114,56 @@ class CourseTableFragment :
                 if (TextUtils.equals(data.status, CourseTableListAdapter.NOT_START)) {
                     var targetDate: Date = TimeUtils.getDate(data.startTime)
                     showCourseTimeSelectView(targetDate, data.courseId);
+                } else {
+                    gotoCourseDetail(position);
                 }
             }
-        })
+        }
 
-        adapter.setOnItemClickListener(OnItemClickListener() { adapter, view, position ->
-            var data: CourseTableDataBean.StudentListBean =
-                adapter.data[position] as CourseTableDataBean.StudentListBean;
-            if (TextUtils.equals(CourseTableListAdapter.OTHER_COURSE, data?.courseType)) {
-                //陪练课 跳转详情页
-                ARouter.getInstance()
-                    .build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
-                    .withString(SparringCourseDetailActivity.COURSE_ID, data.courseId)
-                    .withString(
-                        SparringCourseDetailActivity.COURSE_GROUP_ID,
-                        data.courseGoupId
-                    )
-                    .withString(SparringCourseDetailActivity.STUDENT_ID, data.userId)
-                    .navigation()
-            } else if (TextUtils.equals(
-                    CourseTableListAdapter.PIANO_ROOM_COURSE,
-                    data?.courseType
-                )
-            ) {
-                //琴房课 跳转详情页
-                ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
-                    .withString("course_id", data.courseId)
-                    .navigation()
-            } else {
-                //直播课
-                ARouter.getInstance()
-                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                    .withString(
-                        WebConstants.WEB_URL,
-                        WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + data.courseGoupId
-                    )
-                    .navigation()
-            }
-        })
+        adapter.setOnItemClickListener { adapter, view, position ->
+            gotoCourseDetail(position);
+        }
         mViewBinding.refreshLayout.setOnRefreshListener {
             queryCurrentDataCourse()
         }
         mViewBinding.refreshLayout.isEnabled = false
     }
 
+    private fun gotoCourseDetail(position: Int) {
+        var data: CourseTableDataBean.StudentListBean =
+            adapter.data[position] as CourseTableDataBean.StudentListBean;
+        if (TextUtils.equals(CourseTableListAdapter.OTHER_COURSE, data?.courseType)) {
+            //陪练课 跳转详情页
+            ARouter.getInstance()
+                .build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
+                .withString(SparringCourseDetailActivity.COURSE_ID, data.courseId)
+                .withString(
+                    SparringCourseDetailActivity.COURSE_GROUP_ID,
+                    data.courseGoupId
+                )
+                .withString(SparringCourseDetailActivity.STUDENT_ID, data.userId)
+                .navigation()
+        } else if (TextUtils.equals(
+                CourseTableListAdapter.PIANO_ROOM_COURSE,
+                data?.courseType
+            )
+        ) {
+            //琴房课 跳转详情页
+            ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
+                .withString("course_id", data.courseId)
+                .navigation()
+        } else {
+            //直播课
+            ARouter.getInstance()
+                .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                .withString(
+                    WebConstants.WEB_URL,
+                    WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + data.courseGoupId
+                )
+                .navigation()
+        }
+    }
+
     override fun initData() {
         lazyLoad()
     }

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

@@ -1,5 +1,6 @@
 package com.cooleshow.teacher.ui.main
 
+import android.text.TextUtils
 import android.util.Log
 import android.view.View
 import com.alibaba.android.arouter.launcher.ARouter
@@ -8,6 +9,7 @@ import com.cooleshow.base.ext.setVisible
 import com.cooleshow.base.router.RouterPath
 import com.cooleshow.base.ui.fragment.BaseMVPFragment
 import com.cooleshow.base.utils.GlideUtils.loadImage
+import com.cooleshow.base.utils.TimeUtils
 import com.cooleshow.base.utils.Utils
 import com.cooleshow.teacher.R
 import com.cooleshow.teacher.bean.*
@@ -17,6 +19,7 @@ import com.cooleshow.teacher.databinding.FragmentHomeLayoutBinding
 import com.cooleshow.teacher.presenter.main.HomePresenter
 import com.cooleshow.teacher.ui.course.SparringCourseDetailActivity
 import com.cooleshow.usercenter.helper.UserHelper
+import java.util.*
 
 
 /**
@@ -251,6 +254,14 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         if(recentCourses != null){
             mViewBinding.tvLiveTitle.setText(recentCourses.courseGroupName)
             mViewBinding.tvLiveTime.setText(recentCourses.courseStartTime)
+            val currentTime = TimeUtils.date2String(Date(System.currentTimeMillis()), "yyyy-MM-dd")
+            val startTime = TimeUtils.date2String(TimeUtils.getDate(recentCourses.courseStartTime), "yyyy-MM-dd")
+            if (TextUtils.equals(currentTime, startTime)) {
+                val timeText = TimeUtils.date2String(TimeUtils.getDate(recentCourses.courseStartTime), "HH:mm")
+                mViewBinding.tvLiveTime.text = "今日 $timeText"
+            } else {
+                mViewBinding.tvLiveTime.text = TimeUtils.date2String(TimeUtils.getDate(recentCourses.courseStartTime), "yyyy-MM-dd HH:mm")
+            }
             mViewBinding.tvGoLive.setOnClickListener { v ->
                 //进入直播
                 ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)

+ 6 - 6
teacher/src/main/java/com/cooleshow/teacher/ui/mine/FeedBackActivity.java

@@ -37,15 +37,15 @@ public class FeedBackActivity extends BaseMVPActivity<ActivityFeedbackBinding, F
                     ToastUtils.showShort("请输入您的反馈意见");
                     break;
                 }
-                String mobileNo = viewBinding.etConnect.getText().toString().trim();
-                if (TextUtils.isEmpty(mobileNo)){
-                    ToastUtils.showShort("请输入您的邮箱或手机号");
-                    break;
-                }
+//                String mobileNo = viewBinding.etConnect.getText().toString().trim();
+//                if (TextUtils.isEmpty(mobileNo)){
+//                    ToastUtils.showShort("请输入您的邮箱或手机号");
+//                    break;
+//                }
                 JSONObject jsonObject = new JSONObject();
                 try {
                     jsonObject.putOpt("content", content);
-                    jsonObject.putOpt("mobileNo", mobileNo);
+//                    jsonObject.putOpt("mobileNo", mobileNo);
                 } catch (JSONException e) {
                     e.printStackTrace();
                 }

+ 11 - 10
teacher/src/main/java/com/cooleshow/teacher/ui/mine/MyBankCardActivity.java

@@ -15,6 +15,8 @@ import com.cooleshow.base.widgets.DialogUtil;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.ResponseBankCardBean;
 import com.cooleshow.teacher.bean.ResponseBindCardBean;
+import com.cooleshow.teacher.constants.TeacherConfig;
+import com.cooleshow.teacher.constants.TeacherInfoConstants;
 import com.cooleshow.teacher.contract.MyBankCardContract;
 import com.cooleshow.teacher.databinding.ActivityMyBankCardBinding;
 import com.cooleshow.teacher.presenter.mine.MyBankCardPresenter;
@@ -22,6 +24,8 @@ import com.cooleshow.teacher.presenter.mine.MyBankCardPresenter;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import io.rong.imkit.utils.StatusBarUtil;
+
 /**
  * 创建日期:2022/5/18 16:57
  *
@@ -51,15 +55,11 @@ public class MyBankCardActivity extends BaseMVPActivity<ActivityMyBankCardBindin
                         })
                         .setConfirm(getString(R.string.sure), v -> {
                             CommonTipDialog.dismissDialog();
-                            JSONObject jsonObject = new JSONObject();
-                            try {
-                                jsonObject.putOpt("id", rowsBean.id);
-                                jsonObject.putOpt("idCardNo", rowsBean.bankCard);
-                                jsonObject.putOpt("name", rowsBean.name);
-                            } catch (JSONException e) {
-                                e.printStackTrace();
-                            }
-                            presenter.unBindBankCard(jsonObject.toString());
+                            ARouter.getInstance().build(RouterPath.MineCenter.MINE_UNBIND_BANKCARD)
+                                    .withString(TeacherConfig.BANK_CARD_ID, String.valueOf(rowsBean.id))
+                                    .withString(TeacherConfig.BANK_NAME, rowsBean.bankName)
+                                    .withString(TeacherConfig.BANK_CARD, rowsBean.bankCard)
+                                    .navigation();
                         })
                         .show();
                 break;
@@ -72,6 +72,7 @@ public class MyBankCardActivity extends BaseMVPActivity<ActivityMyBankCardBindin
 
     @Override
     protected void initView() {
+        StatusBarUtil.setStatusBarDarkTheme(this, true);
         initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "我的银行卡");
         viewBinding.toolbarInclude.tvRightText.setTextColor(getResources().getColor(com.cooleshow.base.R.color.common_black));
         viewBinding.toolbarInclude.tvRightText.setVisibility(View.GONE);
@@ -118,7 +119,7 @@ public class MyBankCardActivity extends BaseMVPActivity<ActivityMyBankCardBindin
     }
 
     @Override
-    public void unbindBankCardSuccess(ResponseBindCardBean data) {
+    public void unbindBankCard(boolean isSuccess) {
 
     }
 }

+ 98 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/mine/UnBindBankCardActivity.java

@@ -0,0 +1,98 @@
+package com.cooleshow.teacher.ui.mine;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.TextUtils;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.bean.ResponseBankCardBean;
+import com.cooleshow.teacher.bean.ResponseBindCardBean;
+import com.cooleshow.teacher.constants.TeacherConfig;
+import com.cooleshow.teacher.contract.MyBankCardContract;
+import com.cooleshow.teacher.databinding.ActivityUnBindBankCardBinding;
+import com.cooleshow.teacher.presenter.mine.MyBankCardPresenter;
+import com.cooleshow.usercenter.constants.UserConstants;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import io.rong.imkit.utils.StatusBarUtil;
+
+@Route(path = RouterPath.MineCenter.MINE_UNBIND_BANKCARD)
+public class UnBindBankCardActivity extends BaseMVPActivity<ActivityUnBindBankCardBinding, MyBankCardPresenter> implements MyBankCardContract.MyBankCardView {
+    private String bankCardId;
+
+    @Override
+    protected void initView() {
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+        viewBinding.titleView.setLeftClickListener(v -> {
+            finish();
+        });
+        viewBinding.unbindView.setOnClickListener(v -> {
+            unbindBank();
+        });
+
+        Intent intent = getIntent();
+        bankCardId = intent.getStringExtra(TeacherConfig.BANK_CARD_ID);
+        String bankName = intent.getStringExtra(TeacherConfig.BANK_NAME);
+        String bankCard = intent.getStringExtra(TeacherConfig.BANK_CARD);
+        String temCard = bankCard.substring(0, 4) + "**** ****" + bankCard.substring(bankCard.length() - 4);
+        String bankString = bankName + "(" + temCard + ")银行卡";
+        viewBinding.bankText.setText(bankString);
+    }
+
+
+    @Override
+    protected ActivityUnBindBankCardBinding getLayoutView() {
+        return ActivityUnBindBankCardBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected MyBankCardPresenter createPresenter() {
+        return new MyBankCardPresenter();
+    }
+
+    /**
+     * 解绑
+     */
+    private void unbindBank() {
+        String realName = viewBinding.etRealName.getText().toString();
+        String realIdCard = viewBinding.etRealIdcard.getText().toString();
+        if (TextUtils.isEmpty(realName)) {
+            ToastUtil.getInstance().show(this, "请输入您的真实姓名");
+            return;
+        }
+        if (TextUtils.isEmpty(realIdCard)) {
+            ToastUtils.showShort("请输入您的身份证号");
+            return;
+        }
+        presenter.unBindBankCard(bankCardId, realName, realIdCard);
+    }
+
+    @Override
+    public void querySuccess(int page, ResponseBankCardBean data) {
+
+    }
+
+    /**
+     * 解绑成功
+     */
+    @Override
+    public void unbindBankCard(boolean isSuccess) {
+        ARouter.getInstance().build(RouterPath.UserCenter.COMMON_EMPTY_ACTIVITY)
+                .withString(UserConstants.PAGE_TITLE, isSuccess ? "解绑成功" : "解绑失败")
+                .withInt(UserConstants.EMPTY_ICON_RESID, R.drawable.icon_bind_card_success)
+                .withString(UserConstants.EMPTY_BTN_TEXT, isSuccess ? "我知道了" : "重新解绑")
+                .navigation();
+        if (isSuccess) finish();
+    }
+}

+ 4 - 3
teacher/src/main/java/com/cooleshow/teacher/ui/web/HtmlActivity.java

@@ -1048,15 +1048,16 @@ public class HtmlActivity extends BaseActivity<ActivityHtml1Binding> implements
         } else if (requestCode == PictureConfig.CHOOSE_REQUEST && mUploadCallbackAboveL != null) {
             // 图片、视频、音频选择结果回调
             List<LocalMedia> selectList = PictureSelector.obtainMultipleResult(data);
-            String avatar = selectList.get(0).getCompressPath();
-
+            String avatar = null;
+            if (selectList != null && selectList.size() > 0) {
+                avatar = selectList.get(0).getCompressPath();
+            }
             if (avatar != null) {
                 mUploadCallbackAboveL.onReceiveValue(new Uri[]{PictureFileUtils.parUri(getApplicationContext(), new File(avatar))});
             } else {
                 mUploadCallbackAboveL.onReceiveValue(new Uri[]{});
             }
             mUploadCallbackAboveL = null;
-
         } else if (requestCode == 1000) {
             if (data != null) {
                 try {

+ 175 - 5
teacher/src/main/java/com/cooleshow/teacher/ui/work/AssignHomeworkActivity.java

@@ -1,30 +1,85 @@
 package com.cooleshow.teacher.ui.work;
 
+import android.text.TextUtils;
 import android.view.View;
+import android.widget.LinearLayout;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.SizeUtils;
+import com.cooleshow.base.utils.TimeUtils;
+import com.cooleshow.base.utils.VibrateUtils;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.base.widgets.VideoThumbnailView;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.bean.SparringCourseHomeworkBean;
 import com.cooleshow.teacher.constants.AssignHomeworkContract;
+import com.cooleshow.teacher.constants.CourseConstants;
+import com.cooleshow.teacher.constants.TeacherConfig;
 import com.cooleshow.teacher.databinding.ActivityAssignHomeworkBinding;
 import com.cooleshow.teacher.presenter.homework.AssignHomeworkPresenter;
+import com.cooleshow.teacher.ui.course.SparringCourseDetailActivity;
+import com.cooleshow.teacher.widgets.CourseSetCommentDialog;
+import com.cooleshow.usercenter.helper.UserHelper;
 
 /**
  * 创建日期:2022/5/31 15:26
  *
  * @author Ryan
- * 类说明:
+ * 类说明:布置作业
  */
 @Route(path = RouterPath.WorkCenter.TEACHER_WORK_ASSIGN_HOMEWORK)
-public class AssignHomeworkActivity extends BaseMVPActivity<ActivityAssignHomeworkBinding, AssignHomeworkPresenter> implements AssignHomeworkContract.AssignHomeworkView, View.OnClickListener {
+public class AssignHomeworkActivity extends BaseMVPActivity<ActivityAssignHomeworkBinding, AssignHomeworkPresenter> implements AssignHomeworkContract.AssignHomeworkView {
+    private String mCourseId;
+    private String studentId;
+    private CourseSetCommentDialog mSetCommentDialog;
+
     @Override
-    public void onClick(View view) {
+    protected void initView() {
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+        viewBinding.titleView.setLeftClickListener(v -> {
+            finish();
+        });
+        mCourseId = getIntent().getStringExtra(TeacherConfig.COURSE_ID);
+        studentId = getIntent().getStringExtra(TeacherConfig.STUDENT_ID);
 
+        viewBinding.tvSetHomework.setOnClickListener(v -> {
+            //布置作业
+            showSetCommentDialog(CourseSetCommentDialog.TYPE_SET_HOMEWORK);
+        });
+        viewBinding.tvHomeworkSetComment.setOnClickListener(v -> {
+            //布置作业
+            showSetCommentDialog(CourseSetCommentDialog.TYPE_SET_HOMEWORK);
+        });
     }
 
-    @Override
-    protected void initView() {
+    private void showSetCommentDialog(int typeSetHomework) {
+        if (mSetCommentDialog == null) {
+            mSetCommentDialog = new CourseSetCommentDialog(this);
+            mSetCommentDialog.setOnSubmitClickListener((content, type) -> {
+                //提交
+                if (type == CourseSetCommentDialog.TYPE_SET_HOMEWORK) {
+                    //提交布置作业
+                    presenter.submitSparringCourseHomework(content, mCourseId);
+                }
+                if (type == CourseSetCommentDialog.TYPE_SET_HOMEWORK_COMMENT) {
+                    //提交作业点评
+                    presenter.submitSparringCourseHomeworkComment(content, mCourseId, studentId);
+                }
+            });
+        }
+        if (!mSetCommentDialog.isShowing()) {
+            mSetCommentDialog.show();
+        }
+        mSetCommentDialog.showMethod(typeSetHomework);
+    }
 
+    @Override
+    public void initData() {
+        super.initData();
+        presenter.getCourseDetail(mCourseId, studentId);
     }
 
     @Override
@@ -36,4 +91,119 @@ public class AssignHomeworkActivity extends BaseMVPActivity<ActivityAssignHomewo
     protected AssignHomeworkPresenter createPresenter() {
         return new AssignHomeworkPresenter();
     }
+
+    @Override
+    public void getSparringCourseHomework(SparringCourseHomeworkBean bean) {
+        if (bean == null) {
+            return;
+        }
+        //学生头像
+        GlideUtils.INSTANCE.loadImage(this, bean.studentAvatar, viewBinding.imHeader, R.drawable.icon_teacher_default_head);
+        //subjectName
+        viewBinding.tvCourseName.setText(bean.subjectName);
+        viewBinding.tvName.setText(bean.studentName);
+
+        String startTime = TimeUtils.date2String(TimeUtils.getDate(bean.startTime), "yyyy-MM-dd");
+        String endTime = TimeUtils.date2String(TimeUtils.getDate(bean.endTime), "yyyy-MM-dd");
+        if (TextUtils.equals(startTime, endTime)) {
+            String startTimeText = TimeUtils.date2String(TimeUtils.getDate(bean.startTime), "HH:mm");
+            String endTimeText = TimeUtils.date2String(TimeUtils.getDate(bean.endTime), "HH:mm");
+            viewBinding.tvDate.setText(startTime + " " + startTimeText + "-" + endTimeText);
+        } else {
+            viewBinding.tvDate.setText(bean.startTime + "-" + bean.endTime);
+        }
+
+        String status = bean.courseStatus;
+        if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, status)) {
+            //课程未开始
+            viewBinding.tvState.setText(getString(R.string.course_not_start_str));
+            viewBinding.tvState.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
+        }
+        if (TextUtils.equals(CourseConstants.COURSE_STATUS_ING, status)) {
+            //课程进行中
+            viewBinding.tvState.setText(R.string.course_ing_str);
+            viewBinding.tvState.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+        }
+        if (TextUtils.equals(CourseConstants.COURSE_STATUS_COMPLETE, status)) {
+            //课程已结束
+            viewBinding.tvState.setText(R.string.course_is_completed);
+            viewBinding.tvState.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_999999));
+        }
+
+        if (bean.decorateHomework == CourseConstants.COURSE_HOMEWORK_SET) {
+            //已布置课后作业
+            viewBinding.tvHomeworkEmptyText.setVisibility(View.GONE);
+            viewBinding.tvHomeworkContent.setVisibility(View.VISIBLE);
+            viewBinding.tvHomeworkContent.setText(bean.content);
+            viewBinding.tvSetHomework.setVisibility(View.GONE);
+        } else {
+            //未布置课后作业
+            viewBinding.tvHomeworkEmptyText.setVisibility(View.VISIBLE);
+            viewBinding.tvHomeworkContent.setVisibility(View.GONE);
+            viewBinding.tvSetHomework.setVisibility(View.VISIBLE);
+        }
+        //tv_homework_video_empty_text
+        if (bean.submitHomework == CourseConstants.COURSE_HOMEWORK_STU_SUBMIT) {
+            //学员已提交课后作业
+            viewBinding.tvHomeworkVideoEmptyText.setVisibility(View.GONE);
+            viewBinding.llHomeworkVideoContent.removeAllViews();
+            addVideoThumbnailView(bean.studentAttachments);
+        } else {
+            //学员未提交课后作业
+            if (bean.decorateHomework == CourseConstants.COURSE_HOMEWORK_SET) {
+                viewBinding.homeWordVideoView.setVisibility(View.VISIBLE);
+            } else {
+                viewBinding.homeWordVideoView.setVisibility(View.GONE);
+            }
+            viewBinding.tvHomeworkVideoEmptyText.setVisibility(View.VISIBLE);
+        }
+        //作业点评
+        if (!TextUtils.isEmpty(bean.teacherReplied)) {
+            //老师已点评作业
+            viewBinding.tvHomeworkCommentEmptyText.setVisibility(View.GONE);
+            viewBinding.tvHomeworkSetComment.setVisibility(View.GONE);
+            viewBinding.tvHomeworkCommentContent.setVisibility(View.VISIBLE);
+            viewBinding.tvHomeworkCommentContent.setText(bean.teacherReplied);
+        } else {
+            if (bean.submitHomework == CourseConstants.COURSE_HOMEWORK_STU_SUBMIT) {
+                viewBinding.commentView.setVisibility(View.VISIBLE);
+            } else {
+                viewBinding.commentView.setVisibility(View.GONE);
+            }
+            viewBinding.tvHomeworkCommentEmptyText.setVisibility(View.VISIBLE);
+            viewBinding.tvHomeworkSetComment.setVisibility(View.VISIBLE);
+            viewBinding.tvHomeworkCommentContent.setVisibility(View.GONE);
+        }
+    }
+
+
+    private void addVideoThumbnailView(String videoUrls) {
+        try {
+            if (!TextUtils.isEmpty(videoUrls)) {
+                String[] results = TextUtils.split(videoUrls, ",");
+                for (int i = 0; i < results.length; i++) {
+                    VideoThumbnailView videoThumbnailView = new VideoThumbnailView(this);
+                    videoThumbnailView.setData(results[i]);
+                    LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+                    int left = i == 0 ? 0 : SizeUtils.dp2px(6);
+                    layoutParams.setMargins(left, 0, 0, 0);
+                    layoutParams.weight = 1;
+                    viewBinding.llHomeworkVideoContent.addView(videoThumbnailView, layoutParams);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            viewBinding.llHomeworkVideoContent.removeAllViews();
+        }
+    }
+
+    @Override
+    public void submitSparringCourseHomeworkSuccess() {
+        presenter.getCourseDetail(mCourseId, studentId);
+    }
+
+    @Override
+    public void submitSparringCourseHomeworkCommentSuccess() {
+        presenter.getCourseDetail(mCourseId, studentId);
+    }
 }

+ 21 - 21
teacher/src/main/java/com/cooleshow/teacher/ui/work/HomeWorkFragment.java

@@ -10,6 +10,7 @@ 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.TimePickerBuilder;
 import com.bigkoo.pickerview.listener.CustomListener;
 import com.bigkoo.pickerview.view.TimePickerView;
@@ -17,11 +18,13 @@ 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.constanst.Constants;
+import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.TimeUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.HomeworkAdapter;
 import com.cooleshow.teacher.bean.HomeworkListBean;
+import com.cooleshow.teacher.constants.TeacherConfig;
 import com.cooleshow.teacher.contract.HomeWorkContract;
 import com.cooleshow.teacher.databinding.FragmentHomeworkBinding;
 import com.cooleshow.teacher.presenter.homework.HomeWorkPresenter;
@@ -80,15 +83,18 @@ public class HomeWorkFragment extends BaseMVPFragment<FragmentHomeworkBinding, H
         LinearLayoutManager manager = new LinearLayoutManager(getContext());
         rvAddress.setLayoutManager(manager);
         homeworkAdapter = new HomeworkAdapter(dataList);
+        homeworkAdapter.setDecorate(decorate);
         LayoutInflater inflater = LayoutInflater.from(getContext());
         View emptyLayout = inflater.inflate(R.layout.layout_empty_conent, null);
         homeworkAdapter.setEmptyView(emptyLayout);
         rvAddress.setAdapter(homeworkAdapter);
-        homeworkAdapter.setOnItemClickListener(new OnItemClickListener() {
-            @Override
-            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
-
-            }
+        homeworkAdapter.setOnItemClickListener((adapter, view, position) -> {
+            List<HomeworkListBean.RowsBean> data = (List<HomeworkListBean.RowsBean>) adapter.getData();
+            HomeworkListBean.RowsBean rowsBean = data.get(position);
+            ARouter.getInstance().build(RouterPath.WorkCenter.TEACHER_WORK_ASSIGN_HOMEWORK)
+                    .withString(TeacherConfig.COURSE_ID,rowsBean.courseId)
+                    .withString(TeacherConfig.STUDENT_ID,rowsBean.studentId)
+                    .navigation();
         });
     }
 
@@ -96,23 +102,17 @@ public class HomeWorkFragment extends BaseMVPFragment<FragmentHomeworkBinding, H
 
     @Override
     protected void initData() {
-        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                currentPage = 1;
-                queryCourse(true);
-            }
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            currentPage = 1;
+            queryCourse(true);
         });
-        homeworkAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
-            @Override
-            public void onLoadMore() {
-                //上拉加载
-                if (hasNext) {
-                    currentPage++;
-                    queryCourse(false);
-                } else {
-                    homeworkAdapter.getLoadMoreModule().loadMoreEnd();
-                }
+        homeworkAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
+            //上拉加载
+            if (hasNext) {
+                currentPage++;
+                queryCourse(false);
+            } else {
+                homeworkAdapter.getLoadMoreModule().loadMoreEnd();
             }
         });
         currentPage = 1;

+ 91 - 0
teacher/src/main/java/com/cooleshow/teacher/widgets/CourseSearchView.java

@@ -0,0 +1,91 @@
+package com.cooleshow.teacher.widgets;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.FrameLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.cooleshow.teacher.R;
+
+/**
+ * @author dengqw
+ * @time 2022/6/30 18:37
+ * @describe:
+ **/
+public class CourseSearchView extends FrameLayout {
+
+    private TextView mTvAgency;
+    private EditText mSearchEdit;
+    private TextView mSearchBtn;
+    private String mLeftSearchText;
+    private String mSearchHintText;
+    private String mSearchBtnText;
+
+    public CourseSearchView(@NonNull Context context) {
+        this(context, null);
+    }
+
+    public CourseSearchView(@NonNull Context context, @Nullable AttributeSet attrs) {
+        this(context, attrs, -1);
+    }
+
+    public CourseSearchView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.course_search_style);
+        mLeftSearchText = array.getString(R.styleable.course_search_style_left_search_text);
+        mSearchHintText = array.getString(R.styleable.course_search_style_search_edit_hint);
+        mSearchBtnText = array.getString(R.styleable.course_search_style_search_btn_text);
+        array.recycle();
+
+        initView();
+    }
+
+    private void initView() {
+        View view = View.inflate(getContext(), R.layout.course_search_view, this);
+        mTvAgency = view.findViewById(R.id.tv_agency);
+        mSearchEdit = view.findViewById(R.id.search_edit);
+        mSearchBtn = view.findViewById(R.id.search_btn);
+
+        setLeftText(mLeftSearchText);
+        setSearchHint(mSearchHintText);
+        setBtnText(mSearchBtnText);
+    }
+
+    public void setLeftText(String text) {
+        mTvAgency.setText(text);
+    }
+
+    public void setSearchHint(String hintText) {
+        mSearchEdit.setHint(hintText);
+    }
+
+    public void setBtnText(String btnText) {
+        mSearchBtn.setHint(btnText);
+    }
+
+    public TextView getLeftText() {
+        return mTvAgency;
+    }
+
+    public EditText getSearchEdit() {
+        return mSearchEdit;
+    }
+
+    public TextView getSearchBtn() {
+        return mSearchBtn;
+    }
+
+    public void setOnSearchListener(View.OnClickListener listener) {
+        mSearchBtn.setOnClickListener(listener);
+    }
+
+    public void setOnLeftClickListener(View.OnClickListener listener) {
+        mTvAgency.setOnClickListener(listener);
+    }
+}

binární
teacher/src/main/res/drawable-xhdpi/icon_group_fans.png


binární
teacher/src/main/res/drawable-xxhdpi/icon_group_fans.png


+ 38 - 24
teacher/src/main/res/layout/activity_assign_homework.xml

@@ -8,9 +8,11 @@
     android:orientation="vertical"
     tools:ignore="MissingDefaultResource">
 
-    <include
-        android:id="@+id/toolbar_include"
-        layout="@layout/common_toolbar_layout" />
+    <com.cooleshow.base.widgets.ComTitleBar
+        android:id="@+id/title_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:title_text="布置作业" />
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
@@ -25,6 +27,7 @@
             android:layout_width="@dimen/dp_16"
             android:layout_height="@dimen/dp_16"
             android:layout_marginLeft="11dp"
+            android:layout_marginTop="@dimen/dp_12"
             android:background="@drawable/icon_clock"
             app:layout_constraintLeft_toLeftOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
@@ -86,14 +89,23 @@
             app:layout_constraintLeft_toRightOf="@+id/im_header"
             app:layout_constraintTop_toTopOf="@+id/im_header" />
 
-        <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/rv_mark"
+        <TextView
+            android:id="@+id/tv_course_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="10dp"
-            android:visibility="gone"
-            app:layout_constraintBottom_toBottomOf="@+id/im_header"
-            app:layout_constraintLeft_toRightOf="@+id/im_header" />
+            android:layout_marginTop="@dimen/dp_11"
+            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_11"
+            app:layout_constraintLeft_toLeftOf="@+id/tv_name"
+            app:layout_constraintTop_toBottomOf="@+id/tv_name"
+            tools:text="单簧管" />
     </androidx.constraintlayout.widget.ConstraintLayout>
 
     <androidx.constraintlayout.widget.ConstraintLayout
@@ -181,13 +193,15 @@
     </androidx.constraintlayout.widget.ConstraintLayout>
 
     <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/home_word_video_view"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginLeft="14dp"
         android:layout_marginTop="12dp"
         android:layout_marginRight="14dp"
         android:background="@drawable/bg_white_10dp"
-        android:paddingBottom="10dp">
+        android:paddingBottom="10dp"
+        android:visibility="gone">
 
         <View
             android:id="@+id/view_video_work_line"
@@ -236,29 +250,29 @@
                 android:text="学员尚未上传作业视频"
                 android:textColor="@color/color_999999"
                 android:textSize="@dimen/sp_13" />
-        </FrameLayout>
-
-        <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/rv_video"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_5"
-            android:layout_marginTop="@dimen/dp_38"
-            android:layout_marginRight="@dimen/dp_5"
-            android:layout_marginBottom="@dimen/dp_8"
-            android:visibility="visible"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
 
+            <LinearLayout
+                android:id="@+id/ll_homework_video_content"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:orientation="horizontal"
+                android:weightSum="3"
+                tools:text="每个音的指法比较熟练,但是遇到指法变换比较频繁的小节熟练度不足,建议平时可以选择指法变换较大的曲目多加练习!" />
+        </FrameLayout>
 
     </androidx.constraintlayout.widget.ConstraintLayout>
 
     <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/comment_view"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/dp_14"
         android:layout_marginTop="12dp"
+        android:layout_marginEnd="@dimen/dp_14"
         android:background="@drawable/bg_white_10dp"
-        android:paddingBottom="10dp">
+        android:paddingBottom="10dp"
+        android:visibility="gone">
 
         <View
             android:id="@+id/view_title_line_homework_comment"

+ 0 - 1
teacher/src/main/res/layout/activity_bind_bankcard.xml

@@ -101,7 +101,6 @@
             android:background="@null"
             android:gravity="left"
             android:hint="请输入您的身份证号"
-            android:inputType="number"
             android:paddingTop="8dp"
             android:textColor="@color/black_333"
             android:textColorHint="@color/color_ffc1c1c1"

+ 1 - 0
teacher/src/main/res/layout/activity_feedback.xml

@@ -44,6 +44,7 @@
         android:paddingTop="14dp"
         android:paddingRight="12dp"
         android:paddingBottom="14dp"
+        android:visibility="gone"
         android:textColor="@color/black_333"
         android:textColorHint="@color/color_999999"
         android:textSize="@dimen/sp_16" />

+ 8 - 7
teacher/src/main/res/layout/activity_home_page_layout.xml

@@ -93,13 +93,13 @@
 
     <LinearLayout
         android:id="@+id/ll_subject_container"
-        android:layout_width="match_parent"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginTop="8dp"
-        android:orientation="horizontal"
-        android:layout_marginLeft="@dimen/dp_80"
         android:layout_marginRight="@dimen/dp_30"
+        android:orientation="horizontal"
         app:layout_constraintLeft_toLeftOf="@+id/tv_nickname"
+        app:layout_constraintRight_toRightOf="@+id/view_top_bg"
         app:layout_constraintTop_toBottomOf="@+id/tv_nickname" />
 
     <RatingBar
@@ -108,22 +108,23 @@
         android:layout_width="wrap_content"
         android:layout_height="19dp"
         android:layout_marginTop="20dp"
+        android:isIndicator="true"
         android:numStars="5"
         android:rating="0"
-        android:isIndicator="true"
         android:stepSize="1"
         app:layout_constraintLeft_toLeftOf="@+id/iv_avatar"
         app:layout_constraintTop_toBottomOf="@+id/iv_avatar" />
+
     <TextView
         android:id="@+id/tv_no_score"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:textSize="@dimen/sp_13"
         android:layout_marginTop="20dp"
+        android:text="暂无评分"
+        android:textSize="@dimen/sp_13"
         android:visibility="gone"
         app:layout_constraintLeft_toLeftOf="@+id/iv_avatar"
-        app:layout_constraintTop_toBottomOf="@+id/iv_avatar"
-        android:text="暂无评分"/>
+        app:layout_constraintTop_toBottomOf="@+id/iv_avatar" />
 
     <LinearLayout
         android:id="@+id/ll_fans"

+ 184 - 0
teacher/src/main/res/layout/activity_un_bind_bank_card.xml

@@ -0,0 +1,184 @@
+<?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"
+    android:background="@color/color_f6f8f9"
+    android:focusableInTouchMode="true"
+    android:focusable="true"
+    tools:context=".ui.mine.UnBindBankCardActivity">
+
+    <com.cooleshow.base.widgets.ComTitleBar
+        android:id="@+id/title_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:layout_constraintTop_toTopOf="parent"
+        app:title_text="解绑银行卡" />
+
+    <TextView
+        android:id="@+id/unbind_tip_text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/dp_25"
+        android:layout_marginTop="@dimen/dp_15"
+        android:text="您正在解绑"
+        android:textColor="@color/black"
+        android:textSize="@dimen/sp_16"
+        android:textStyle="bold"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/title_view" />
+
+    <TextView
+        android:id="@+id/bank_text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/dp_25"
+        android:layout_marginTop="@dimen/dp_5"
+        android:layout_marginEnd="@dimen/dp_25"
+        android:textColorHint="@color/black"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/unbind_tip_text"
+        tools:text="中国工商银行(6222 **** **** 19177)银行卡" />
+
+    <View
+        android:id="@+id/root_view"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_marginStart="@dimen/dp_14"
+        android:layout_marginTop="@dimen/dp_15"
+        android:layout_marginEnd="@dimen/dp_14"
+        android:background="@drawable/bg_white_10dp"
+        app:layout_constraintBottom_toBottomOf="@+id/view_line2"
+        app:layout_constraintTop_toBottomOf="@+id/bank_text" />
+
+    <TextView
+        android:id="@+id/tv_star_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="21dp"
+        android:layout_marginTop="25dp"
+        android:text="*"
+        android:textColor="@color/color_ff4e19"
+        android:textSize="@dimen/sp_17"
+        app:layout_constraintLeft_toLeftOf="@+id/root_view"
+        app:layout_constraintTop_toTopOf="@+id/root_view" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="真实姓名"
+        android:textColor="@color/black"
+        android:textSize="@dimen/sp_17"
+        android:textStyle="bold"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_star_name"
+        app:layout_constraintLeft_toRightOf="@+id/tv_star_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_star_name" />
+
+    <EditText
+        android:id="@+id/et_real_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="21dp"
+        android:layout_marginRight="21dp"
+        android:background="@null"
+        android:gravity="left"
+        android:hint="请输入您的真实姓名"
+        android:inputType="text"
+        android:paddingTop="@dimen/dp_10"
+        android:paddingBottom="@dimen/dp_15"
+        android:textColor="@color/black_333"
+        android:textColorHint="@color/color_ffc1c1c1"
+        android:textSize="@dimen/sp_16"
+        app:layout_constraintLeft_toLeftOf="@+id/root_view"
+        app:layout_constraintRight_toRightOf="@+id/root_view"
+        app:layout_constraintTop_toBottomOf="@+id/tv_star_name" />
+
+    <View
+        android:id="@+id/view_line1"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/dp_0_5"
+        android:layout_marginStart="@dimen/dp_21"
+        android:layout_marginEnd="@dimen/dp_20"
+        android:background="@color/color_ebebeb"
+        app:layout_constraintLeft_toLeftOf="@+id/root_view"
+        app:layout_constraintRight_toRightOf="@+id/root_view"
+        app:layout_constraintTop_toBottomOf="@+id/et_real_name" />
+
+    <TextView
+        android:id="@+id/tv_star_idcard"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="21dp"
+        android:layout_marginTop="13dp"
+        android:text="*"
+        android:textColor="@color/color_ff4e19"
+        android:textSize="@dimen/sp_17"
+        app:layout_constraintLeft_toLeftOf="@+id/root_view"
+        app:layout_constraintTop_toBottomOf="@+id/view_line1" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="持卡人身份证号"
+        android:textColor="@color/black"
+        android:textSize="@dimen/sp_17"
+        android:textStyle="bold"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_star_idcard"
+        app:layout_constraintLeft_toRightOf="@+id/tv_star_idcard"
+        app:layout_constraintTop_toTopOf="@+id/tv_star_idcard" />
+
+    <EditText
+        android:id="@+id/et_real_idcard"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="21dp"
+        android:layout_marginRight="21dp"
+        android:background="@null"
+        android:gravity="left"
+        android:hint="请输入您的身份证号"
+        android:paddingTop="@dimen/dp_10"
+        android:paddingBottom="@dimen/dp_15"
+        android:textColor="@color/black_333"
+        android:textColorHint="@color/color_ffc1c1c1"
+        android:textSize="@dimen/sp_16"
+        app:layout_constraintLeft_toLeftOf="@+id/root_view"
+        app:layout_constraintRight_toRightOf="@+id/root_view"
+        app:layout_constraintTop_toBottomOf="@+id/tv_star_idcard" />
+
+
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/dp_0_5"
+        android:layout_marginLeft="20dp"
+        android:layout_marginRight="21dp"
+        android:background="@color/color_ebebeb"
+        app:layout_constraintLeft_toLeftOf="@+id/root_view"
+        app:layout_constraintRight_toRightOf="@+id/root_view"
+        app:layout_constraintTop_toBottomOf="@+id/et_real_idcard" />
+
+    <View
+        android:id="@+id/view_line2"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_16"
+        android:layout_marginLeft="20dp"
+        android:layout_marginRight="21dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_line" />
+
+    <TextView
+        android:id="@+id/unbind_view"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_44"
+        android:layout_marginStart="@dimen/dp_28"
+        android:layout_marginTop="@dimen/dp_23"
+        android:layout_marginEnd="@dimen/dp_28"
+        android:textSize="@dimen/sp_18"
+        android:text="@string/confirm_unbind"
+        android:gravity="center"
+        android:textColor="@color/white"
+        android:background="@drawable/shape_click_btn"
+        app:layout_constraintTop_toBottomOf="@+id/root_view" />
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 70 - 0
teacher/src/main/res/layout/course_search_view.xml

@@ -0,0 +1,70 @@
+<?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">
+
+    <TextView
+        android:id="@+id/tv_agency"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
+        android:drawableRight="@drawable/icon_arrow_down"
+        android:drawablePadding="6dp"
+        android:layout_marginLeft="@dimen/dp_17"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:text="声部"
+        android:textColor="@color/color_666666"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintBottom_toBottomOf="@+id/search_view"
+        app:layout_constraintTop_toTopOf="@+id/search_view" />
+
+    <View
+        android:id="@+id/search_view"
+        android:layout_width="@dimen/dp_280"
+        android:layout_height="@dimen/dp_36"
+        android:layout_marginRight="@dimen/dp_14"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="@dimen/dp_16"
+        android:layout_height="@dimen/dp_16"
+        android:layout_marginLeft="@dimen/dp_17"
+        android:src="@mipmap/small_search_icon"
+        app:layout_constraintBottom_toBottomOf="@+id/search_view"
+        app:layout_constraintLeft_toLeftOf="@+id/search_view"
+        app:layout_constraintTop_toTopOf="@+id/search_view" />
+
+    <EditText
+        android:id="@+id/search_edit"
+        android:layout_width="0dp"
+        android:layout_height="@dimen/dp_36"
+        android:background="@color/transparent"
+        android:hint="请输入曲目名称"
+        android:paddingLeft="@dimen/dp_41"
+        android:textColor="@color/color_333333"
+        android:textColorHint="@color/color_999999"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintLeft_toLeftOf="@+id/search_view"
+        app:layout_constraintRight_toLeftOf="@+id/search_btn"
+        app:layout_constraintTop_toTopOf="@+id/search_view" />
+
+    <TextView
+        android:id="@+id/search_btn"
+        android:layout_width="@dimen/dp_56"
+        android:layout_height="@dimen/dp_28"
+        android:layout_marginRight="@dimen/dp_4"
+        android:background="@drawable/shape_click_btn"
+        android:gravity="center"
+        android:text="@string/search"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/search_view"
+        app:layout_constraintRight_toRightOf="@id/search_view"
+        app:layout_constraintTop_toTopOf="@+id/search_view" />
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 3 - 2
teacher/src/main/res/layout/fragment_home_layout.xml

@@ -326,7 +326,8 @@
                 android:layout_marginLeft="@dimen/dp_19"
                 android:src="@mipmap/small_alarm_clock"
                 app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toBottomOf="@+id/tv_live_title" />
+                app:layout_constraintBottom_toBottomOf="@+id/tv_live_time"
+                app:layout_constraintTop_toTopOf="@+id/tv_live_time" />
 
             <TextView
                 android:id="@+id/tv_live_title"
@@ -354,7 +355,7 @@
                 android:layout_marginBottom="@dimen/dp_5"
                 android:textColor="@color/color_FF806F"
                 android:textSize="@dimen/sp_13"
-                app:layout_constraintLeft_toLeftOf="@+id/alarm_icon"
+                app:layout_constraintLeft_toRightOf="@+id/alarm_icon"
                 app:layout_constraintTop_toBottomOf="@+id/tv_live_title"
                 tools:text="今日 16:30-17:05" />
 

+ 1 - 0
teacher/src/main/res/layout/fragment_mine_style_layout.xml

@@ -179,6 +179,7 @@
             android:layout_height="wrap_content"
             android:overScrollMode="never"
             android:scrollbars="none"
+            android:layout_marginTop="@dimen/dp_8"
             app:layout_constraintLeft_toLeftOf="@+id/view_fans_group_bg"
             app:layout_constraintRight_toRightOf="@+id/view_fans_group_bg"
             app:layout_constraintTop_toBottomOf="@+id/iv_fans_group" />

+ 16 - 5
teacher/src/main/res/layout/fragment_sheet_music_page_layout.xml

@@ -3,18 +3,27 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingStart="14dp"
-    android:paddingTop="14dp"
-    android:paddingEnd="14dp">
+    android:paddingTop="14dp">
+
+    <com.cooleshow.teacher.widgets.CourseSearchView
+        android:id="@+id/search_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:layout_constraintTop_toTopOf="parent"
+        app:left_search_text="声部"
+        app:search_edit_hint="请输入曲目名称" />
 
     <View
         android:id="@+id/view_upload_bg"
         android:layout_width="match_parent"
         android:layout_height="40dp"
+        android:layout_marginStart="@dimen/dp_14"
+        android:layout_marginTop="@dimen/dp_15"
+        android:layout_marginEnd="@dimen/dp_14"
         android:background="@drawable/bg_white_10dp_border_e5e5e5"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        app:layout_constraintTop_toBottomOf="@+id/search_view" />
 
     <TextView
         android:id="@+id/tv_upload_sheet_music"
@@ -55,6 +64,8 @@
             android:id="@+id/recyclerView"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
+            android:layout_marginStart="@dimen/dp_14"
+            android:layout_marginRight="@dimen/dp_14"
             android:overScrollMode="never"
             android:scrollbars="none" />
     </com.scwang.smart.refresh.layout.SmartRefreshLayout>
@@ -64,7 +75,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:visibility="gone"
-        app:constraint_referenced_ids="refreshLayout,view_upload_bg,iv_icon_upload,tv_upload_sheet_music,view_upload_bg" />
+        app:constraint_referenced_ids="search_view,refreshLayout,view_upload_bg,iv_icon_upload,tv_upload_sheet_music,view_upload_bg" />
 
     <ViewStub
         android:id="@+id/vs_no_cert"

+ 32 - 1
teacher/src/main/res/layout/item_mine_style_fans_group_layout.xml

@@ -1,6 +1,37 @@
 <?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_height="wrap_content"
+    android:padding="@dimen/dp_12">
 
+    <de.hdodenhof.circleimageview.CircleImageView
+        android:id="@+id/group_aver"
+        android:layout_width="@dimen/dp_42"
+        android:layout_height="@dimen/dp_42"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/group_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingLeft="@dimen/dp_15"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_16"
+        app:layout_constraintLeft_toRightOf="@+id/group_aver"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="竖笛学习" />
+
+    <TextView
+        android:id="@+id/group_desc"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingLeft="@dimen/dp_14"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_16"
+        app:layout_constraintLeft_toRightOf="@+id/group_aver"
+        app:layout_constraintTop_toBottomOf="@+id/group_name"
+        tools:text="竖笛学习" />
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 1
teacher/src/main/res/layout/layout_item_homework.xml

@@ -17,6 +17,7 @@
             android:layout_width="@dimen/dp_16"
             android:layout_height="@dimen/dp_16"
             android:layout_marginLeft="11dp"
+            android:layout_marginTop="@dimen/dp_12"
             android:background="@drawable/icon_clock"
             app:layout_constraintLeft_toLeftOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
@@ -38,7 +39,6 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginRight="11dp"
-            android:text="已结束"
             android:textColor="@color/color_999999"
             android:textSize="@dimen/sp_14"
             app:layout_constraintBottom_toBottomOf="@+id/im_clock"

binární
teacher/src/main/res/mipmap-xhdpi/small_search_icon.png


binární
teacher/src/main/res/mipmap-xxhdpi/small_search_icon.png


+ 0 - 0
teacher/src/main/res/small_alarm_clock.png/small_alarm_clock.png → teacher/src/main/res/mipmap-xxxhdpi/small_alarm_clock.png


binární
teacher/src/main/res/mipmap-xxxhdpi/small_search_icon.png


+ 2 - 0
teacher/src/main/res/values/strings.xml

@@ -45,4 +45,6 @@
     <string name="fans_empty_text">暂无粉丝群~</string>
     <string name="goto_upload">去上传</string>
     <string name="goto_create">去创建</string>
+    <string name="confirm_unbind">确认解绑</string>
+    <string name="search">搜索</string>
 </resources>

+ 6 - 0
teacher/src/main/res/values/styles.xml

@@ -87,4 +87,10 @@
         <attr name="empty_text" format="string" />
         <attr name="ope_btn" format="string" />
     </declare-styleable>
+
+    <declare-styleable name="course_search_style">
+        <attr name="left_search_text" format="string" />
+        <attr name="search_edit_hint" format="string" />
+        <attr name="search_btn_text" format="string" />
+    </declare-styleable>
 </resources>

+ 14 - 8
usercenter/src/main/AndroidManifest.xml

@@ -10,24 +10,30 @@
 
         <activity
             android:name=".ui.activity.LoginActivity"
-            android:launchMode="singleTask"
             android:configChanges="orientation|screenSize|keyboardHidden"
-            android:screenOrientation="portrait"
-            android:exported="false" />
+            android:exported="false"
+            android:launchMode="singleTask"
+            android:screenOrientation="portrait" />
 
         <activity
             android:name=".ui.activity.VerifyCodeLoginActivity"
-            android:launchMode="singleTask"
             android:configChanges="orientation|screenSize|keyboardHidden"
+            android:launchMode="singleTask"
             android:screenOrientation="portrait" />
         <activity
             android:name=".ui.activity.VerifyCodeInputActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
-            android:windowSoftInputMode="adjustPan"
-            android:screenOrientation="portrait" />
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan" />
 
-        <activity android:name=".ui.activity.BindPasswordActivity"
+        <activity
+            android:name=".ui.activity.BindPasswordActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
-            android:screenOrientation="portrait"/>
+            android:screenOrientation="portrait" />
+
+        <activity
+            android:name=".ui.activity.CommEmptyActivity"
+            android:exported="false"
+            android:screenOrientation="portrait" />
     </application>
 </manifest>

+ 4 - 0
usercenter/src/main/java/com/cooleshow/usercenter/constants/UserConstants.java

@@ -13,4 +13,8 @@ public class UserConstants {
     public static final String TEMP_TOKEN="temp_token";
     public static final String LOGIN_STATUS="login_status";
     public static final String LOGIN_STATUS_SUCCESS="login_success";
+    public static final String PAGE_TITLE="page_title";
+    public static final String EMPTY_ICON_RESID="empty_icon_resid";
+    public static final String EMPTY_BTN_TEXT="empty_btn_text";
+
 }

+ 37 - 0
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/CommEmptyActivity.java

@@ -0,0 +1,37 @@
+package com.cooleshow.usercenter.ui.activity;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseActivity;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.usercenter.R;
+import com.cooleshow.usercenter.constants.UserConstants;
+import com.cooleshow.usercenter.databinding.ActivityCommEmptyBinding;
+
+@Route(path = RouterPath.UserCenter.COMMON_EMPTY_ACTIVITY)
+public class CommEmptyActivity extends BaseActivity<ActivityCommEmptyBinding> {
+
+    @Override
+    protected void initView() {
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+        String pageTitle = getIntent().getStringExtra(UserConstants.PAGE_TITLE);
+        int emptyResId = getIntent().getIntExtra(UserConstants.EMPTY_ICON_RESID, com.cooleshow.base.R.drawable.icon_empty_course);
+        String emptyBtnText = getIntent().getStringExtra(UserConstants.EMPTY_BTN_TEXT);
+        viewBinding.emptyBtn.setText(emptyBtnText);
+        viewBinding.emptyIcon.setImageResource(emptyResId);
+        viewBinding.titleView.setTitleText(pageTitle);
+
+        viewBinding.titleView.setLeftClickListener(v->{
+            finish();
+        });
+        viewBinding.emptyBtn.setOnClickListener(v->{
+            finish();
+        });
+
+    }
+
+    @Override
+    protected ActivityCommEmptyBinding getLayoutView() {
+        return ActivityCommEmptyBinding.inflate(getLayoutInflater());
+    }
+}

+ 0 - 0
usercenter/src/main/res/drawable-v24/ic_launcher_foreground.xml → usercenter/src/main/res/drawable/ic_launcher_foreground.xml


+ 50 - 0
usercenter/src/main/res/layout/activity_comm_empty.xml

@@ -0,0 +1,50 @@
+<?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"
+    android:background="@color/color_f6f8f9"
+    tools:context="com.cooleshow.usercenter.ui.activity.CommEmptyActivity">
+
+    <com.cooleshow.base.widgets.ComTitleBar
+        android:id="@+id/title_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/empty_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/dp_35"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/title_view" />
+
+    <TextView
+        android:id="@+id/empty_text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/dp_12"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_15"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/empty_icon"
+        tools:text="我知道了" />
+
+    <TextView
+        android:id="@+id/empty_btn"
+        android:layout_width="@dimen/dp_196"
+        android:layout_height="@dimen/dp_44"
+        android:layout_marginTop="@dimen/dp_53"
+        android:background="@drawable/shape_click_btn"
+        android:gravity="center"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_18"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/empty_icon"
+        tools:text="我知道了" />
+</androidx.constraintlayout.widget.ConstraintLayout>