Sfoglia il codice sorgente

1,App图标logo调整
2,启动图调整(尺寸还是不对,需要设计修改)

Ryan8057 2 anni fa
parent
commit
d18e333573
100 ha cambiato i file con 3240 aggiunte e 421 eliminazioni
  1. 2 0
      BaseLibrary/build.gradle
  2. 1 1
      BaseLibrary/src/main/java/com/cooleshow/base/common/WebConstants.java
  3. 1047 0
      BaseLibrary/src/main/java/com/cooleshow/base/utils/DateUtil.java
  4. 12 1
      BaseLibrary/src/main/java/com/cooleshow/base/utils/Utils.java
  5. 80 0
      BaseLibrary/src/main/java/com/cooleshow/base/widgets/AgentWebClient.java
  6. 0 5
      BaseLibrary/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  7. 0 5
      BaseLibrary/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  8. 3 0
      BaseLibrary/src/main/res/values/colors.xml
  9. 2 1
      BaseLibrary/src/main/res/values/dimens.xml
  10. 5 12
      BaseLibrary/src/main/res/values/styles.xml
  11. 3 0
      gradle.properties
  12. 7 3
      student/src/main/AndroidManifest.xml
  13. 17 0
      student/src/main/java/com/cooleshow/student/contract/AgentWebContract.java
  14. 14 0
      student/src/main/java/com/cooleshow/student/presenter/web/AgentWebPresenter.java
  15. 9 2
      student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java
  16. 45 112
      student/src/main/java/com/cooleshow/student/ui/main/ShopMallFragment.java
  17. 11 3
      student/src/main/java/com/cooleshow/student/ui/splash/SplashActivity.kt
  18. 122 0
      student/src/main/java/com/cooleshow/student/ui/web/AgentWebActivity.java
  19. 1 1
      student/src/main/java/com/cooleshow/student/ui/web/WebActivity.java
  20. 0 30
      student/src/main/res/drawable-v24/ic_launcher_foreground.xml
  21. BIN
      student/src/main/res/drawable-xhdpi/icon_splash_logo.png
  22. BIN
      student/src/main/res/drawable-xxhdpi/bg_splash.png
  23. BIN
      student/src/main/res/drawable-xxhdpi/ic_delete.png
  24. BIN
      student/src/main/res/drawable-xxhdpi/icon_splash_logo.png
  25. 12 0
      student/src/main/res/layout/activity_agent_web.xml
  26. 12 4
      student/src/main/res/layout/activity_splash_layout.xml
  27. 0 1
      student/src/main/res/layout/fragment_course_table_layout.xml
  28. 1 1
      student/src/main/res/layout/fragment_practice_course_layout.xml
  29. 1 28
      student/src/main/res/layout/fragment_shopmal.xml
  30. 0 5
      student/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  31. 0 5
      student/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  32. BIN
      student/src/main/res/mipmap-hdpi/ic_launcher.png
  33. BIN
      student/src/main/res/mipmap-hdpi/ic_launcher.webp
  34. BIN
      student/src/main/res/mipmap-hdpi/ic_launcher_round.webp
  35. BIN
      student/src/main/res/mipmap-mdpi/ic_launcher.png
  36. BIN
      student/src/main/res/mipmap-mdpi/ic_launcher.webp
  37. BIN
      student/src/main/res/mipmap-mdpi/ic_launcher_round.webp
  38. BIN
      student/src/main/res/mipmap-xhdpi/ic_launcher.png
  39. BIN
      student/src/main/res/mipmap-xhdpi/ic_launcher.webp
  40. BIN
      student/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
  41. BIN
      student/src/main/res/mipmap-xxhdpi/ic_launcher.png
  42. BIN
      student/src/main/res/mipmap-xxhdpi/ic_launcher.webp
  43. BIN
      student/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
  44. BIN
      student/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  45. BIN
      student/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
  46. BIN
      student/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
  47. 1 1
      student/src/main/res/values/strings.xml
  48. 11 0
      student/src/main/res/values/styles.xml
  49. 0 16
      student/src/main/res/values/themes.xml
  50. 6 3
      teacher/src/main/AndroidManifest.xml
  51. 0 0
      teacher/src/main/assets/echarts.min.js
  52. 46 0
      teacher/src/main/assets/stacked_line_chart.html
  53. 79 0
      teacher/src/main/java/com/cooleshow/teacher/adapter/BaseRecyclerAdapter.java
  54. 49 0
      teacher/src/main/java/com/cooleshow/teacher/adapter/BaseViewHolder.java
  55. 85 0
      teacher/src/main/java/com/cooleshow/teacher/adapter/EarningDoughnutListAdapter.java
  56. 93 0
      teacher/src/main/java/com/cooleshow/teacher/adapter/EarningStackedListAdapter.java
  57. 9 0
      teacher/src/main/java/com/cooleshow/teacher/api/APIService.java
  58. 53 0
      teacher/src/main/java/com/cooleshow/teacher/bean/AccountTotalBean.java
  59. 152 0
      teacher/src/main/java/com/cooleshow/teacher/bean/EarningDoughnutChartBean.java
  60. 298 0
      teacher/src/main/java/com/cooleshow/teacher/bean/EarningStackedLineBean.java
  61. 17 0
      teacher/src/main/java/com/cooleshow/teacher/contract/AgentWebContract.java
  62. 3 0
      teacher/src/main/java/com/cooleshow/teacher/contract/EarningStatisticsContract.java
  63. 37 1
      teacher/src/main/java/com/cooleshow/teacher/presenter/income/EarningStatisticsPresenter.java
  64. 1 1
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/InputBankVCodePresenter.java
  65. 14 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/web/AgentWebPresenter.java
  66. 471 2
      teacher/src/main/java/com/cooleshow/teacher/ui/income/EarningStatisticsActivity.java
  67. 1 0
      teacher/src/main/java/com/cooleshow/teacher/ui/main/MainActivity.java
  68. 8 1
      teacher/src/main/java/com/cooleshow/teacher/ui/main/MineFragment.java
  69. 47 115
      teacher/src/main/java/com/cooleshow/teacher/ui/main/ShopMallFragment.java
  70. 3 1
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/MyBankCardActivity.java
  71. 122 0
      teacher/src/main/java/com/cooleshow/teacher/ui/web/AgentWebActivity.java
  72. 0 1
      teacher/src/main/java/com/cooleshow/teacher/ui/web/WebActivity.java
  73. 33 0
      teacher/src/main/java/com/cooleshow/teacher/widgets/LollipopFixedWebView.java
  74. BIN
      teacher/src/main/res/drawable-xhdpi/bg_splash.png
  75. BIN
      teacher/src/main/res/drawable-xhdpi/icon_splash_logo.png
  76. BIN
      teacher/src/main/res/drawable-xxhdpi/bg_splash.png
  77. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_splash_logo.png
  78. 5 0
      teacher/src/main/res/drawable/cb_text_white_green_selector.xml
  79. 5 0
      teacher/src/main/res/drawable/cb_white_green_selector.xml
  80. 14 0
      teacher/src/main/res/layout/activity_agent_web.xml
  81. 19 16
      teacher/src/main/res/layout/activity_earning_statistics.xml
  82. 17 4
      teacher/src/main/res/layout/activity_splash_layout.xml
  83. 0 1
      teacher/src/main/res/layout/fragment_course_table_layout.xml
  84. 1 0
      teacher/src/main/res/layout/fragment_mine_layout.xml
  85. 1 28
      teacher/src/main/res/layout/fragment_shopmal.xml
  86. 132 0
      teacher/src/main/res/layout/pickerview_year_month.xml
  87. 0 5
      teacher/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  88. 0 5
      teacher/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  89. BIN
      teacher/src/main/res/mipmap-hdpi/ic_launcher.png
  90. BIN
      teacher/src/main/res/mipmap-hdpi/ic_launcher.webp
  91. BIN
      teacher/src/main/res/mipmap-hdpi/ic_launcher_round.webp
  92. BIN
      teacher/src/main/res/mipmap-mdpi/ic_launcher.png
  93. BIN
      teacher/src/main/res/mipmap-mdpi/ic_launcher.webp
  94. BIN
      teacher/src/main/res/mipmap-mdpi/ic_launcher_round.webp
  95. BIN
      teacher/src/main/res/mipmap-xhdpi/ic_launcher.png
  96. BIN
      teacher/src/main/res/mipmap-xhdpi/ic_launcher.webp
  97. BIN
      teacher/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
  98. BIN
      teacher/src/main/res/mipmap-xxhdpi/ic_launcher.png
  99. BIN
      teacher/src/main/res/mipmap-xxhdpi/ic_launcher.webp
  100. BIN
      teacher/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp

+ 2 - 0
BaseLibrary/build.gradle

@@ -154,4 +154,6 @@ dependencies {
     api 'com.makeramen:roundedimageview:2.3.0'
     //lottie动画
     api 'com.airbnb.android:lottie:5.0.3'
+    //webview
+    api 'com.just.agentweb:agentweb:4.1.4'
 }

+ 1 - 1
BaseLibrary/src/main/java/com/cooleshow/base/common/WebConstants.java

@@ -78,7 +78,7 @@ public abstract class WebConstants {
     public static final String TEACHER_VIDEO_MODIFY = getBaseUrlH5() + "/#/videoCreate?groupId=4";
     //创建直播课
     public static final String TEACHER_LIVE_CREATE = getBaseUrlH5() + "/#/liveCreate";
-    //直播课
+    //直播课详情
     public static final String TEACHER_LIVE_DETAIL = getBaseUrlH5() + "/#/liveDetail";
     //陪练课设置
     public static final String TEACHER_PRACTICE_SETTING = getBaseUrlH5() + "/#/practiceSetting";

+ 1047 - 0
BaseLibrary/src/main/java/com/cooleshow/base/utils/DateUtil.java

@@ -0,0 +1,1047 @@
+package com.cooleshow.base.utils;
+
+
+import android.annotation.SuppressLint;
+import android.text.TextUtils;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+@SuppressLint("SimpleDateFormat")
+public class DateUtil {
+
+    private static final String FORMAT = "yyyy-MM-dd HH:mm:ss";
+    private static final SimpleDateFormat datetimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+    private static final SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm");
+    private static String mYear;
+    private static String mMonth;
+    private static String mDay;
+    private static String mWay;
+
+    public static Date str2Date(String str) {
+        return str2Date(str, null);
+    }
+
+
+    public static String getDate() {
+        final Calendar mCalendar = Calendar.getInstance();
+        String s = new SimpleDateFormat("yyyy年MM月dd日").format(mCalendar.getTime());
+        String time = new SimpleDateFormat("HH:mm").format(mCalendar.getTime());
+        int apm = mCalendar.get(Calendar.AM_PM);
+        //        apm=0 表示上午,apm=1表示下午。
+        return apm == 0 ? (s + "  上午" + time) : (s + "  下午" + time);
+    }
+
+    public static String getTodayDate() {
+        final Calendar mCalendar = Calendar.getInstance();
+        String s = new SimpleDateFormat("yyyy-MM-dd").format(mCalendar.getTime());
+        return s;
+    }
+
+
+    /**
+     * 字符串转换到时间格式
+     *
+     * @param dateStr 需要转换的字符串
+     *                需要格式的目标字符串  yyyy-MM-dd
+     * @return String 返回转换后的时间
+     * @throws ParseException 转换异常
+     */
+    public static String dateCurrencyFormat(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return dateFormat.format(date);
+    }
+
+    public static String getSevenDayTime() {
+        Calendar calendar = Calendar.getInstance();
+        calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) + 3);
+        String shur_time = dateFormat.format(calendar.getTime());
+        return shur_time;
+    }
+
+    /**
+     * 字符串转换到时间格式
+     *
+     * @param dateStr 需要转换的字符串
+     *                需要格式的目标字符串  yyyy-MM-dd
+     * @return String 返回转换后的时间
+     * @throws ParseException 转换异常
+     */
+    public static String dateFormatYear(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
+        return dateFormat.format(date);
+    }
+
+    public static String replaceHour(String dateStr, String hour) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        return dateFormat.format(date) + " " + hour;
+    }
+
+    /**
+     * 字符串转换到时间格式
+     *
+     * @param dateStr 需要转换的字符串
+     *                需要格式的目标字符串  yyyy/MM/dd
+     * @return String 返回转换后的时间
+     * @throws ParseException 转换异常
+     */
+    public static String dateFormat(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
+        return dateFormat.format(date);
+    }
+
+    /**
+     * 字符串转换到时间格式
+     * <p>
+     * 需要格式的目标字符串  yyyy/MM/dd
+     *
+     * @return String 返回转换后的时间
+     * @throws ParseException 转换异常
+     */
+    public static String dateFormat(Date date) {
+        if (date == null) {
+            return "";
+        }
+
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
+        return dateFormat.format(date);
+    }
+
+    public static String dateFormatMM_dd(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new SimpleDateFormat("MM月dd日").format(date);
+    }
+
+    public static String dateFormatYYMM_dd(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new SimpleDateFormat("yyyy/MM-dd").format(date);
+    }
+
+    public static String dateFormatyyMMddDot(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new SimpleDateFormat("yyyy.MM.dd").format(date);
+    }
+
+    public static String dateFormatHH_mm(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new SimpleDateFormat("HH:mm").format(date);
+
+    }
+
+    public static String dateFormatmm_ss(int time) {
+        if (time <= 0) {
+            return "00:00";
+        }
+        Calendar calendar = Calendar.getInstance();
+        calendar.clear();
+        calendar.add(Calendar.MILLISECOND, time);
+
+        return new SimpleDateFormat("mm:ss").format(calendar.getTime());
+    }
+
+    public static String dateFormatNoSecond(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new SimpleDateFormat("yyyy年MM月dd日 HH:mm").format(date);
+    }
+
+    public static String dateFormatMMdd(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return new SimpleDateFormat("MM-dd").format(date);
+    }
+
+    /**
+     * 字符串获取周
+     * @param dateStr
+     *         需要转换的字符串
+     * @param formatStr
+     *         需要格式的目标字符串 举例 yyyy-MM-dd
+     * @return Date 返回转换后的时间
+     * @throws ParseException
+     *         转换异常
+     */
+    /**
+     * 根据当前日期获得是星期几
+     *  
+     *
+     * @return
+     */
+    public static String dateCurrencyGetWeek(String time) {
+        if (TextUtils.isEmpty(time)) {
+            return "";
+        }
+        String Week = "";
+        SimpleDateFormat format = new SimpleDateFormat(FORMAT);
+        Calendar c = Calendar.getInstance();
+        try {
+            c.setTime(format.parse(time));
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        if (c.get(Calendar.DAY_OF_WEEK) == 1) {
+            Week += "七";
+        }
+        if (c.get(Calendar.DAY_OF_WEEK) == 2) {
+            Week += "一";
+        }
+        if (c.get(Calendar.DAY_OF_WEEK) == 3) {
+            Week += "二";
+        }
+        if (c.get(Calendar.DAY_OF_WEEK) == 4) {
+            Week += "三";
+        }
+        if (c.get(Calendar.DAY_OF_WEEK) == 5) {
+            Week += "四";
+        }
+        if (c.get(Calendar.DAY_OF_WEEK) == 6) {
+            Week += "五";
+        }
+        if (c.get(Calendar.DAY_OF_WEEK) == 7) {
+            Week += "六";
+        }
+        return Week;
+    }
+
+    public static String dateCurrencyGetHH_mm(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return timeFormat.format(date);
+
+    }
+
+    public static String dateCurrencyGetMM(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return "";
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        SimpleDateFormat timeFormat = new SimpleDateFormat("MM");
+        return timeFormat.format(date);
+
+    }
+
+    /**
+     * 格式化时间
+     * @param dateStr  yyyy-MM-dd HH:mm:ss
+     * @return yyyy-MM-dd HH:mm:ss
+     */
+    public static Date getDate(String dateStr) {
+        if (TextUtils.isEmpty(dateStr)) {
+            return new Date();
+        }
+        DateFormat sdf = new SimpleDateFormat(FORMAT);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return date;
+    }
+
+    /**
+     * 转化时间输入时间与当前时间的间隔
+     *
+     * @param time
+     * @return
+     */
+    public static String converDataTime(String time) {
+        if (TextUtils.isEmpty(time)) {
+            return "";
+        }
+        long currentSeconds = System.currentTimeMillis() / 1000;
+        long timestamp = 0;
+        try {
+            timestamp = datetimeFormat.parse(time).getTime() / 1000;
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        long timeGap = timestamp - currentSeconds;// 与现在时间相差秒数
+        if (timeGap < 0) {
+            return "";
+        }
+        String timeStr = null;
+        long days = timeGap / (60 * 60 * 24);
+        long hours = (timeGap - days * (60 * 60 * 24)) / (60 * 60);
+        long minutes = (timeGap - days * (60 * 60 * 24) - hours * (60 * 60)) / (60);
+        if (days > 0) {
+            timeStr = days + "天" + hours + "小时" + minutes + "分";
+        } else if (hours > 0) {
+            timeStr = hours + "小时" + minutes + "分";
+        } else {
+            timeStr = minutes + "分";
+        }
+
+        return timeStr;
+    }
+
+    /**
+     * 字符串转时间
+     *
+     * @param str
+     * @param format
+     * @return
+     */
+    public static Date str2Date(String str, String format) {
+        if (str == null || str.length() == 0) {
+            return null;
+        }
+        if (format == null || format.length() == 0) {
+            format = FORMAT;
+        }
+        Date date = null;
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat(format);
+            date = sdf.parse(str);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return date;
+
+    }
+
+    public static Calendar str2Calendar(String str) {
+        return str2Calendar(str, null);
+
+    }
+
+    public static Calendar str2Calendar(String str, String format) {
+        Date date = str2Date(str, format);
+        if (date == null) {
+            return null;
+        }
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+
+        return c;
+
+    }
+
+    public static String date2Str(Calendar c) {// yyyy-MM-dd HH:mm:ss
+        return date2Str(c, null);
+    }
+
+    public static String date2Str(Calendar c, String format) {
+        if (c == null) {
+            return null;
+        }
+        return date2Str(c.getTime(), format);
+    }
+
+    public static String date2Str(Date d) {// yyyy-MM-dd HH:mm:ss
+        return date2Str(d, null);
+    }
+
+    public static String date2Str(Date d, String format) {// yyyy-MM-dd HH:mm:ss
+        if (d == null) {
+            return null;
+        }
+        if (format == null || format.length() == 0) {
+            format = FORMAT;
+        }
+        SimpleDateFormat sdf = new SimpleDateFormat(format);
+        String s = sdf.format(d);
+        return s;
+    }
+
+    public static String getCurDateStr() {
+
+        return new SimpleDateFormat(FORMAT).format(new Date());
+    }
+
+    public static String getCurYearStr(Date date) {
+        if (date == null) {
+            date = new Date();
+        }
+        return new SimpleDateFormat("yyyy").format(date);
+    }
+
+    public static String getCurMonthStr(Date date) {
+        if (date == null) {
+            date = new Date();
+        }
+        return new SimpleDateFormat("MM").format(date);
+    }
+
+    public static String getCurDayStr(Date date) {
+        if (date == null) {
+            date = new Date();
+        }
+        return new SimpleDateFormat("dd").format(date);
+    }
+
+    public static String getCurDateyyyy_MMStr(Date date) {
+        if (date == null) {
+            date = new Date();
+        }
+        return new SimpleDateFormat("yyyy-MM").format(date);
+    }
+
+    /**
+     * 获得当前日期的字符串格式
+     *
+     * @param format
+     * @return
+     */
+    public static String getCurDateStr(String format) {
+        Calendar c = Calendar.getInstance();
+        return date2Str(c, format);
+    }
+
+    /**
+     * 格式到秒
+     *
+     * @param time
+     * @return
+     */
+    public static String getMillon(long time) {
+
+        return datetimeFormat.format(time);
+
+    }
+
+    /**
+     * 格式到天
+     *
+     * @param time
+     * @return
+     */
+    public static String getDay(long time) {
+        return new SimpleDateFormat("yyyy-MM-dd").format(time);
+    }
+
+    /**
+     * 格式到毫秒
+     *
+     * @param time
+     * @return
+     */
+    public static String getSMillon(long time) {
+        return new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss-SSS").format(time);
+
+    }
+
+    /**
+     * 字符串转换到时间格式
+     *
+     * @param dateStr   需要转换的字符串
+     * @param formatStr 需要格式的目标字符串 举例 yyyy-MM-dd
+     * @return Date 返回转换后的时间
+     * @throws ParseException 转换异常
+     */
+    public static Date StringToDate(String dateStr, String formatStr) {
+        DateFormat sdf = new SimpleDateFormat(formatStr);
+        Date date = null;
+        try {
+            date = sdf.parse(dateStr);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return date;
+    }
+
+
+    /**
+     * 转化时间输入时间与当前时间的间隔
+     *
+     * @param time
+     * @return
+     */
+    public static String converTime(String time) {
+        if (TextUtils.isEmpty(time)) {
+            return "";
+        }
+        long currentSeconds = System.currentTimeMillis() / 1000;
+        long timestamp = 0;
+        try {
+            timestamp = datetimeFormat.parse(time).getTime() / 1000;
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        long timeGap = currentSeconds - timestamp;// 与现在时间相差秒数
+        String timeStr = null;
+        if (timeGap > 24 * 60 * 60) {// 1天以上
+            timeStr = timeGap / (24 * 60 * 60) + "天前";
+        } else if (timeGap > 60 * 60) {// 1小时-24小时
+            timeStr = timeGap / (60 * 60) + "小时前";
+        } else if (timeGap > 60) {// 1分钟-59分钟
+            timeStr = timeGap / 60 + "分钟前";
+        } else {// 1秒钟-59秒钟
+            timeStr = "刚刚";
+        }
+        return timeStr;
+    }
+
+    /**
+     * 把字符串转化为时间格式
+     *
+     * @param timestamp
+     * @return
+     */
+    public static String getStandardTime(long timestamp) {
+        SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日 HH:mm");
+        Date date = new Date(timestamp * 1000);
+        sdf.format(date);
+        return sdf.format(date);
+    }
+
+    /**
+     * 获得当前日期时间 日期时间格式yyyy-MM-dd HH:mm:ss
+     *
+     * @return
+     */
+    public static String currentDatetime() {
+        return datetimeFormat.format(now());
+    }
+
+    /**
+     * 格式化日期时间 日期时间格式yyyy-MM-dd HH:mm:ss
+     *
+     * @return
+     */
+    public static String formatDatetime(Date date) {
+        return datetimeFormat.format(date);
+    }
+
+    /**
+     * 获得当前时间 时间格式HH:mm:ss
+     *
+     * @return
+     */
+    public static String currentTime() {
+        return timeFormat.format(now());
+    }
+
+    /**
+     * 格式化时间 时间格式HH:mm:ss
+     *
+     * @return
+     */
+    public static String formatTime(Date date) {
+        return timeFormat.format(date);
+    }
+
+    /**
+     * 获得当前时间的<code>java.util.Date</code>对象
+     *
+     * @return
+     */
+    public static Date now() {
+        return new Date();
+    }
+
+    public static Calendar calendar() {
+        Calendar cal = GregorianCalendar.getInstance(Locale.CHINESE);
+        cal.setFirstDayOfWeek(Calendar.MONDAY);
+        return cal;
+    }
+
+    /**
+     * 获得当前时间的毫秒数
+     * 详见{@link System#currentTimeMillis()}
+     *
+     * @return
+     */
+    public static long millis() {
+        return System.currentTimeMillis();
+    }
+
+    /**
+     * 获得当前Chinese月份
+     *
+     * @return
+     */
+    public static int month() {
+        return calendar().get(Calendar.MONTH) + 1;
+    }
+
+    /**
+     * 获得月份中的第几天
+     *
+     * @return
+     */
+    public static int dayOfMonth() {
+        return calendar().get(Calendar.DAY_OF_MONTH);
+    }
+
+    /**
+     * 今天是星期的第几天
+     *
+     * @return
+     */
+    public static int dayOfWeek() {
+        return calendar().get(Calendar.DAY_OF_WEEK);
+    }
+
+    /**
+     * 今天是年中的第几天
+     *
+     * @return
+     */
+    public static int dayOfYear() {
+        return calendar().get(Calendar.DAY_OF_YEAR);
+    }
+
+    /**
+     * 判断原日期是否在目标日期之前
+     *
+     * @param src
+     * @param dst
+     * @return
+     */
+    public static boolean isBefore(Date src, Date dst) {
+        return src.before(dst);
+    }
+
+    /**
+     * 判断原日期是否在目标日期之后
+     *
+     * @param src
+     * @param dst
+     * @return
+     */
+    public static boolean isAfter(Date src, Date dst) {
+        return src.after(dst);
+    }
+
+    /**
+     * 判断两日期是否相同
+     *
+     * @param date1
+     * @param date2
+     * @return
+     */
+    public static boolean isEqual(Date date1, Date date2) {
+        return date1.compareTo(date2) == 0;
+    }
+
+    /**
+     * 判断某个日期是否在某个日期范围
+     *
+     * @param beginDate 日期范围开始
+     * @param endDate   日期范围结束
+     * @param src       需要判断的日期
+     * @return
+     */
+    public static boolean between(Date beginDate, Date endDate, Date src) {
+        return beginDate.before(src) && endDate.after(src);
+    }
+
+    /**
+     * 获得当前月的最后一天
+     * HH:mm:ss为0,毫秒为999
+     *
+     * @return
+     */
+    public static Date lastDayOfMonth() {
+        Calendar cal = calendar();
+        cal.set(Calendar.DAY_OF_MONTH, 0); // M月置零
+        cal.set(Calendar.HOUR_OF_DAY, 0);// H置零
+        cal.set(Calendar.MINUTE, 0);// m置零
+        cal.set(Calendar.SECOND, 0);// s置零
+        cal.set(Calendar.MILLISECOND, 0);// S置零
+        cal.set(Calendar.MONTH, cal.get(Calendar.MONTH) + 1);// 月份+1
+        cal.set(Calendar.MILLISECOND, -1);// 毫秒-1
+        return cal.getTime();
+    }
+
+    /**
+     * 获得当前月的第一天
+     * HH:mm:ss SS为零
+     *
+     * @return
+     */
+    public static Date firstDayOfMonth() {
+        Calendar cal = calendar();
+        cal.set(Calendar.DAY_OF_MONTH, 1); // M月置1
+        cal.set(Calendar.HOUR_OF_DAY, 0);// H置零
+        cal.set(Calendar.MINUTE, 0);// m置零
+        cal.set(Calendar.SECOND, 0);// s置零
+        cal.set(Calendar.MILLISECOND, 0);// S置零
+        return cal.getTime();
+    }
+
+    private static Date weekDay(int week) {
+        Calendar cal = calendar();
+        cal.set(Calendar.DAY_OF_WEEK, week);
+        return cal.getTime();
+    }
+
+    /**
+     * 获得周五日期
+     * 注:日历工厂方法{@link #calendar()}设置类每个星期的第一天为Monday,US等每星期第一天为sunday
+     *
+     * @return
+     */
+    public static Date friday() {
+        return weekDay(Calendar.FRIDAY);
+    }
+
+    /**
+     * 获得周六日期
+     * 注:日历工厂方法{@link #calendar()}设置类每个星期的第一天为Monday,US等每星期第一天为sunday
+     *
+     * @return
+     */
+    public static Date saturday() {
+        return weekDay(Calendar.SATURDAY);
+    }
+
+    /**
+     * 获得周日日期 注:日历工厂方法{@link #calendar()}设置类每个星期的第一天为Monday,US等每星期第一天为sunday
+     *
+     * @return
+     */
+    public static Date sunday() {
+        return weekDay(Calendar.SUNDAY);
+    }
+
+    /**
+     * 将字符串日期时间转换成java.util.Date类型 日期时间格式yyyy-MM-dd HH:mm:ss
+     *
+     * @param datetime
+     * @return
+     */
+    public static Date parseDatetime(String datetime) throws ParseException {
+        return datetimeFormat.parse(datetime);
+    }
+
+    /**
+     * 将字符串日期转换成java.util.Date类型 日期时间格式yyyy-MM-dd
+     *
+     * @param date
+     * @return
+     * @throws ParseException
+     */
+    public static Date parseDate(String date) throws ParseException {
+        return dateFormat.parse(date);
+    }
+
+    /**
+     * 将字符串日期转换成java.util.Date类型 时间格式 HH:mm:ss
+     *
+     * @param time
+     * @return
+     * @throws ParseException
+     */
+    public static Date parseTime(String time) throws ParseException {
+        return timeFormat.parse(time);
+    }
+
+    /**
+     * 根据自定义pattern将字符串日期转换成java.util.Date类型
+     *
+     * @param datetime
+     * @param pattern
+     * @return
+     * @throws ParseException
+     */
+    public static Date parseDatetime(String datetime, String pattern) throws ParseException {
+        SimpleDateFormat format = (SimpleDateFormat) datetimeFormat.clone();
+        format.applyPattern(pattern);
+        return format.parse(datetime);
+    }
+
+    /**
+     * 把秒格式化为分种小时
+     *
+     * @param second
+     * @return
+     */
+    public static String parseSecond(int second) {
+        if (second >= 60) {
+            return second / 60 + "分";
+        } else if (second >= 60 * 60) {
+            return second / 60 * 60 + "时";
+        } else if (second >= 60 * 60 * 24) {
+            return second / 60 * 60 + "天";
+        } else {
+            return second + "秒";
+        }
+    }
+
+
+    /**
+     * 比较时间大小
+     *
+     * @param begin
+     * @param end
+     * @return
+     */
+    public static int compareDate(String begin, String end) {
+        DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm");
+        try {
+            Date beginDate = df.parse(begin);
+            Date endDate = df.parse(end);
+            if (beginDate.getTime() < endDate.getTime()) {
+                return 1;
+            } else if (beginDate.getTime() > endDate.getTime()) {
+                return -1;
+            } else {
+                return 0;
+            }
+        } catch (Exception exception) {
+            exception.printStackTrace();
+        }
+        return 0;
+    }
+
+
+    /**
+     * 获得年份
+     *
+     * @param date
+     * @return
+     */
+    public static int getYear(Date date) {
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        return c.get(Calendar.YEAR);
+    }
+
+    /**
+     * 获得月份
+     *
+     * @param date
+     * @return
+     */
+    public static int getMonth(Date date) {
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        return c.get(Calendar.MONTH) + 1;
+    }
+
+    /**
+     * 获得星期几
+     *
+     * @param
+     * @return
+     */
+    public static int getWeek() {
+        Calendar c = Calendar.getInstance();
+        c.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
+        return c.get(Calendar.DAY_OF_WEEK) - 1;
+    }
+
+    /**
+     * 获得日期
+     *
+     * @param date
+     * @return
+     */
+    public static int getDay(Date date) {
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        return c.get(Calendar.DATE);
+    }
+
+    /**
+     * 获得天数差
+     *
+     * @param begin
+     * @param end
+     * @return
+     */
+    public static double getDayDiff(Date begin, Date end) {
+        double day = 0;
+        if (end.getTime() < begin.getTime()) {
+            day = -1;
+        } else if (end.getTime() == begin.getTime()) {
+            day = 0;
+        } else {
+            day += (end.getTime() - begin.getTime()) / (24 * 60 * 60 * 1000d);
+        }
+        return day;
+    }
+
+    /**
+     * 获得天数差
+     *
+     * @param begin
+     * @param end
+     * @return
+     */
+    public static int getDayDiffInt(Date begin, Date end) {
+        int day = 1;
+        if (end.getTime() < begin.getTime()) {
+            day = -1;
+        } else if (end.getTime() == begin.getTime()) {
+            day = 0;
+        } else {
+            day += (end.getTime() - begin.getTime()) / (24 * 60 * 60 * 1000d);
+        }
+        return day;
+    }
+
+    /**
+     * 获得分钟差
+     * 如果结束时间还没到 返回时间差
+     * @param begin 当前时间
+     * @param end 课程结束时间
+     * @return -2 课程已经结束  0  时间一致  课程还没结束 返回时间差
+     */
+    public static long getMinuteDiff(Date begin, Date end) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+        long beginTime = getDate(sdf.format(begin) + ":00").getTime();
+        long endTime = getDate(sdf.format(end) + ":00").getTime();
+        long day = 0;
+        if (endTime < beginTime) {
+            day = -2;
+        } else if (endTime == beginTime) {
+            day = 0;
+        } else {
+            long time = endTime - beginTime;
+            day += time / (60 * 1000);
+        }
+        return day;
+    }
+
+    /**
+     * 判断给定字符串时间是否为今日
+     *
+     * @param sdate
+     * @return boolean
+     */
+    public static boolean isToday(String sdate) {
+        boolean b = false;
+        Date time = getDate(sdate);
+        Date today = new Date();
+        if (time != null) {
+            String nowDate = dateFormat.format(today);
+            String timeDate = dateFormat.format(time);
+            if (nowDate.equals(timeDate)) {
+                b = true;
+            }
+        }
+        return b;
+    }
+
+
+    public static long forMatLong(String time) {
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
+            sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+            Date date = sdf.parse(time);
+            return date.getTime();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return 0;
+    }
+
+}

+ 12 - 1
BaseLibrary/src/main/java/com/cooleshow/base/utils/Utils.java

@@ -166,9 +166,20 @@ public final class Utils {
     }
 
     public static void setHeadView(View view, Context context, int height) {
-        int statusBarHeight = QMUIDisplayHelper.getStatusBarHeight(context);
+//        int statusBarHeight = QMUIDisplayHelper.getStatusBarHeight(context);
+        int statusBarHeight = getStatusBarHeight(context);
         ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
         layoutParams.height = statusBarHeight + SizeUtils.dp2px(height);
         view.setLayoutParams(layoutParams);
     }
+
+
+    public static int getStatusBarHeight(Context context) {
+        int result = 0;
+        int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
+        if (resourceId > 0) {
+            result = context.getResources().getDimensionPixelSize(resourceId);
+        }
+        return result;
+    }
 }

+ 80 - 0
BaseLibrary/src/main/java/com/cooleshow/base/widgets/AgentWebClient.java

@@ -0,0 +1,80 @@
+package com.cooleshow.base.widgets;
+
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.net.Uri;
+import android.os.Build;
+import android.text.TextUtils;
+import android.webkit.WebResourceError;
+import android.webkit.WebResourceRequest;
+import android.webkit.WebView;
+
+import com.cooleshow.base.utils.LogUtils;
+import com.just.agentweb.WebViewClient;
+
+/**
+ * 创建日期:2022/6/5 13:48
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class AgentWebClient extends WebViewClient {
+    public String webViewUrl = "";
+    public String authorization = "";
+
+    public void setAuthorization(String authorization) {
+        this.authorization = authorization;
+    }
+
+    //页面开始载入时调用
+    @Override
+    public void onPageStarted(WebView view, String url, Bitmap favicon) {
+        super.onPageStarted(view, url, favicon);
+        webViewUrl = url;
+        LogUtils.i("onPageStarted:" + url);
+    }
+
+    //页面载入结束时调用
+    @Override
+    public void onPageFinished(WebView view, String url) {
+        super.onPageFinished(view, url);
+        webViewUrl = url;
+        if (!TextUtils.isEmpty(authorization)) {
+            String js = "window.localStorage.setItem('Authorization','" + authorization + "');";
+            String jsUrl = "javascript:(function({var localStorage = window.localStorage; localStorage.setItem('Authorization','" + authorization + "') })()";
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+                view.evaluateJavascript(js, null);
+            } else {
+                view.loadUrl(jsUrl);
+                view.reload();
+            }
+        }
+        LogUtils.e("onPageFinished:" + url);
+        LogUtils.e("Authorization:" + authorization);
+    }
+
+    //截取url请求,在当前视图加载,避免在跳转到自带浏览器
+    @Override
+    public boolean shouldOverrideUrlLoading(WebView view, String request) {
+        if (!(request.startsWith("http://") || request.startsWith("https://"))) {
+            try {
+                Intent intent = new Intent();
+                intent.setAction(Intent.ACTION_VIEW);
+                intent.setData(Uri.parse(request));
+                view.getContext().startActivity(intent);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            return true;
+        } else {
+            view.loadUrl(request);
+            return true;
+        }
+    }
+
+    //处理报错信息
+    @Override
+    public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
+        super.onReceivedError(view, request, error);
+    }
+}

+ 0 - 5
BaseLibrary/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

+ 0 - 5
BaseLibrary/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

+ 3 - 0
BaseLibrary/src/main/res/values/colors.xml

@@ -95,6 +95,7 @@
     <color name="color_f97215">#F97215</color>
     <color name="color_ff4444">#FF4444</color>
     <color name="color_808080">#808080</color>
+
     <color name="color_25292e">#25292E</color>
     <color name="color_F8F8F8">#F8F8F8</color>
     <color name="color_d1d1d1">#D1D1D1</color>
@@ -106,4 +107,6 @@
     <color name="white_50">#50ffffff</color>
     <color name="color_b2b2b2">#B2B2B2</color>
     <color name="color_90ffffff">#90ffffff</color>
+    <color name="color_e2e2e2">#e2e2e2</color>
+
 </resources>

+ 2 - 1
BaseLibrary/src/main/res/values/dimens.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
+
+    <dimen name="statusbar_view_height">0dp</dimen>
     <dimen name="common_divider_height">1px</dimen>
     <dimen name="common_divider_width">1px</dimen>
     <dimen name="common_header_bar_height">50dp</dimen>
@@ -14,7 +16,6 @@
     <dimen name="common_padding_small">5dp</dimen>
     <dimen name="common_radius">6dp</dimen>
     <dimen name="common_border_size">1px</dimen>
-    <dimen name="statusbar_view_height">0dp</dimen>
 
     <dimen name="text_small_size">12sp</dimen>
     <dimen name="text_middle_size">14sp</dimen>

+ 5 - 12
BaseLibrary/src/main/res/values/styles.xml

@@ -1,20 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <!-- 主题样式 -->
-    <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
-        <item name="android:windowContentOverlay">@null</item>
-        <item name="android:textSize">@dimen/text_middle_size</item>
-        <item name="windowActionBar">false</item>
-        <item name="windowNoTitle">true</item>
-        <item name="colorPrimary">@color/common_black</item>
-        <item name="colorPrimaryDark">@color/common_black</item>
-        <item name="colorAccent">@color/colorAccent</item>
-    </style>
-    <!-- Window黑色背景主题 -->
-    <style name="AppTheme.Black" parent="@style/AppTheme">
-        <item name="android:windowBackground">@color/common_black</item>
+    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimary</item>
+        <item name="colorAccent">@color/colorPrimary</item>
     </style>
 
+
     <!-- 多状态视图样式-->
     <style name="MultiStateStyle">
         <item name="android:layout_width">match_parent</item>

+ 3 - 0
gradle.properties

@@ -26,6 +26,8 @@ kapt.use.worker.api=false
 kapt.incremental.apt=false
 
 isUserModule = true
+android.injected.testOnly=false
+
 
 TEST_BASE_URL ="https://dev.colexiu.com/"
 RELEASE_BASE_URL ="https://dev.colexiu.com/"
@@ -36,3 +38,4 @@ RELEASE_BASE_URL_H5 ="https://dev.colexiu.com/teacher"
 
 TEST_BASE_URL_H5_STUDENT ="https://dev.colexiu.com/student"
 RELEASE_BASE_URL_H5_STUDENT ="https://dev.colexiu.com/student"
+

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

@@ -11,13 +11,13 @@
         android:label="@string/app_name"
         android:networkSecurityConfig="@xml/network_security_config"
         android:requestLegacyExternalStorage="true"
-        android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
-        android:theme="@style/Theme.CooleShow">
+        android:theme="@style/AppTheme">
 
         <activity
             android:name=".ui.splash.SplashActivity"
-            android:exported="true">
+            android:exported="true"
+            android:screenOrientation="portrait">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -50,6 +50,10 @@
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
         <activity
+            android:name=".ui.web.AgentWebActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
+        <activity
             android:name=".ui.mine.SettingActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />

+ 17 - 0
student/src/main/java/com/cooleshow/student/contract/AgentWebContract.java

@@ -0,0 +1,17 @@
+package com.cooleshow.student.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/6/5 13:35
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface AgentWebContract {
+    interface AgentWebView extends BaseView {
+
+    }
+    interface Presenter {
+    }
+}

+ 14 - 0
student/src/main/java/com/cooleshow/student/presenter/web/AgentWebPresenter.java

@@ -0,0 +1,14 @@
+package com.cooleshow.student.presenter.web;
+
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.student.contract.AgentWebContract;
+
+/**
+ * 创建日期:2022/6/5 13:34
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class AgentWebPresenter extends BasePresenter<AgentWebContract.AgentWebView> implements AgentWebContract.Presenter {
+
+}

+ 9 - 2
student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java

@@ -378,7 +378,11 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         homeLiveCourseAdapter.setOnItemClickListener(new OnItemClickListener() {
             @Override
             public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
-
+                HomeLiveAndVideoBean.CourseBean item = (HomeLiveAndVideoBean.CourseBean) adapter.getItem(position);
+                ARouter.getInstance()
+                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + item.courseGroupId)
+                        .navigation();
             }
         });
     }
@@ -399,7 +403,10 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
             @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();
             }
         });
     }

+ 45 - 112
student/src/main/java/com/cooleshow/student/ui/main/ShopMallFragment.java

@@ -1,23 +1,16 @@
 package com.cooleshow.student.ui.main;
 
-import android.os.Build;
 import android.view.View;
-import android.webkit.GeolocationPermissions;
-import android.webkit.WebChromeClient;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.widget.FrameLayout;
+import android.widget.LinearLayout;
 
-import com.cooleshow.base.BuildConfig;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
-import com.cooleshow.base.utils.LogUtils;
-import com.cooleshow.base.widgets.LollipopFixedWebView;
-import com.cooleshow.base.widgets.WebClient;
+import com.cooleshow.base.widgets.AgentWebClient;
 import com.cooleshow.student.contract.ShopMallContract;
 import com.cooleshow.student.databinding.FragmentShopmalBinding;
 import com.cooleshow.student.presenter.main.ShopMallPresenter;
 import com.cooleshow.usercenter.helper.UserHelper;
+import com.just.agentweb.AgentWeb;
 
 /**
  * 创建日期:2022/5/26 10:10
@@ -26,9 +19,10 @@ import com.cooleshow.usercenter.helper.UserHelper;
  * 类说明:
  */
 public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, ShopMallPresenter> implements ShopMallContract.ShopMallView {
-    private WebView webView;
-    private String url;
-    private WebClient mWebClient;
+
+    private AgentWeb mAgentWeb;
+    private LinearLayout container;
+    private AgentWebClient mWebClient;
 
     @Override
     protected FragmentShopmalBinding getLayoutView() {
@@ -45,32 +39,27 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
     @Override
     protected void initView(View rootView) {
         view_status_bar = mViewBinding.viewStatusBar;
-        try {
-            if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
-                webView = new LollipopFixedWebView(getContext());
-            } else {
-                webView = new WebView(getContext());
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        if (null == webView) {
 
-            return;
-        }
-        url = WebConstants.TEACHER_SHOPMALL;
-
-        mViewBinding.viewParent.addView(webView, new FrameLayout.LayoutParams(
-                FrameLayout.LayoutParams.MATCH_PARENT,
-                FrameLayout.LayoutParams.MATCH_PARENT));
-        initWebView();
-        mWebClient = new WebClient();
-        webView.setWebViewClient(mWebClient);
-        webView.setWebChromeClient(new MyWebChromeClient());
-        loadUrl();
+        container = mViewBinding.container;
+
+        String linkurl = WebConstants.TEACHER_SHOPMALL;
+        mWebClient = new AgentWebClient();
+        mWebClient = new AgentWebClient();
+        linkurl = loadUrl(linkurl);
+
+        mAgentWeb = AgentWeb.with(this)
+                .setAgentWebParent((LinearLayout) container, new LinearLayout.LayoutParams(-1, -1))
+                .useDefaultIndicator()
+//                .setWebChromeClient(mWebChromeClient)
+                .setWebViewClient(mWebClient)
+                .createAgentWeb()
+                .ready()
+                .go(linkurl);
+
+
     }
 
-    private void loadUrl() {
+    private String loadUrl(String url) {
         String userToken = UserHelper.getUserToken();
         mWebClient.setAuthorization(userToken);
         boolean status = url.contains("?");
@@ -79,96 +68,40 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
         } else {
             url = (url + "?Authorization=" + userToken);
         }
-        webView.loadUrl(url);
+        return url;
     }
 
-    private void initWebView() {
-        //声明WebSettings子类
-        WebSettings webSettings = webView.getSettings();
-        webSettings.setUserAgentString(webSettings.getUserAgentString() + WebConstants.WEB_UA_PARAMS);
-        webSettings.setGeolocationDatabasePath(getActivity().getApplicationContext().getFilesDir().getPath());
-        webSettings.setGeolocationEnabled(true);
-        webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
-        //如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
-        webSettings.setJavaScriptEnabled(true);
-        webSettings.setMediaPlaybackRequiresUserGesture(false);//false允许自动播放音视频
-        //是否启用缓存
-        webSettings.setAppCacheEnabled(true);
-
-        // 开启DOM缓存,默认状态下是不支持LocalStorage的
-        webSettings.setDomStorageEnabled(true);
-        // 开启数据库缓存
-        webSettings.setDatabaseEnabled(true);
-        // 地址跨域导致视频预览图片加载不出来 无法播放:
-        webSettings.setAllowUniversalAccessFromFileURLs(false);
-        webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
-
-        //设置自适应屏幕,两者合用
-        webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小
-        webSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小
-        //缩放操作
-        webSettings.setSupportZoom(false); //支持缩放,默认为true。是下面那个的前提。
-        // 设置允许JS弹窗
-        webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
-        //其他细节操作
-        webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE); //关闭webview中缓存
-        webSettings.setAllowFileAccess(true); //设置可以访问文件
-        webSettings.setJavaScriptCanOpenWindowsAutomatically(true); //支持通过JS打开新窗口
-        webSettings.setLoadsImagesAutomatically(true); //支持自动加载图片
-        webSettings.setDefaultTextEncodingName("UTF-8");//设置编码格式
-
-        webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);  //富文本适配
-        webSettings.setAppCacheMaxSize(Long.MAX_VALUE);
-        webSettings.setAppCachePath(getContext().getDir("appcache", 0).getPath());
-        webSettings.setDatabasePath(getContext().getDir("databases", 0).getPath());
-        webSettings.setGeolocationDatabasePath(getContext().getDir("geolocation", 0)
-                .getPath());
-        webSettings.setPluginState(WebSettings.PluginState.ON_DEMAND);
-        if (BuildConfig.DEBUG) {
-            webView.setWebContentsDebuggingEnabled(true);
-        }
-        webSettings.setTextZoom(100);//设置字体默认的缩放比例,以避免手机系统的字体修改对页面字体及布局造成影响。
-        webView.setHorizontalScrollBarEnabled(false);
-        webView.setVerticalScrollBarEnabled(false);
+
+    @Override
+    protected void initData() {
+
     }
 
 
-    private class MyWebChromeClient extends WebChromeClient {
-        public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
-            callback.invoke(origin, true, false);
+    public void clickBack() {
+        if (!mAgentWeb.back()) {
+            ((MainActivity) getActivity()).clickBackPressed();
         }
 
-        @Override
-        public void onProgressChanged(WebView view, int newProgress) {
-            LogUtils.e(newProgress + "");
-            if (newProgress == 100 && null != mViewBinding.progressBar) {
-                mViewBinding.progressBar.setVisibility(View.GONE);//加载完网页进度条消失
-            } else {
-                if (null != mViewBinding.progressBar) {
-                    mViewBinding.progressBar.setVisibility(View.VISIBLE);//开始加载网页时显示进度条
-                    mViewBinding.progressBar.setProgress(newProgress);//设置进度值
-                }
-
-            }
-        }
+    }
 
-        @Override
-        public void onReceivedTitle(WebView view, String title) {
-            super.onReceivedTitle(view, title);
-        }
 
+    @Override
+    public void onResume() {
+        mAgentWeb.getWebLifeCycle().onResume();
+        super.onResume();
     }
 
     @Override
-    protected void initData() {
+    public void onPause() {
+        mAgentWeb.getWebLifeCycle().onPause();
+        super.onPause();
 
     }
 
-    public void clickBack() {
-        if (webView.canGoBack()) {
-            webView.goBack();
-        } else {
-            ((MainActivity) getActivity()).clickBackPressed();
-        }
+    @Override
+    public void onDestroy() {
+        mAgentWeb.getWebLifeCycle().onDestroy();
+        super.onDestroy();
     }
 }

+ 11 - 3
student/src/main/java/com/cooleshow/student/ui/splash/SplashActivity.kt

@@ -1,6 +1,8 @@
 package com.cooleshow.student.ui.splash
 
 import android.net.Uri
+import android.os.Bundle
+import android.util.Log
 import com.alibaba.android.arouter.launcher.ARouter
 import com.cooleshow.base.common.ConstantKey
 import com.cooleshow.base.common.WebConstants
@@ -9,6 +11,7 @@ import com.cooleshow.base.ui.activity.BaseActivity
 import com.cooleshow.base.utils.SPUtils
 import com.cooleshow.student.databinding.ActivitySplashLayoutBinding
 import com.cooleshow.usercenter.helper.UserHelper
+import io.rong.imkit.utils.StatusBarUtil
 
 
 /**
@@ -19,14 +22,19 @@ class SplashActivity : BaseActivity<ActivitySplashLayoutBinding>() {
         return ActivitySplashLayoutBinding.inflate(layoutInflater)
     }
 
-    override fun initView() {
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        StatusBarUtil.setStatusBarDarkTheme(this, true)
+    }
 
+    override fun initView() {
+        Log.e("asdfasdfadsf", "initView: " )
     }
 
     override fun initData() {
         super.initData()
         val isFirstLaunch = SPUtils.getInstance().getBoolean(ConstantKey.IS_FIRST_LAUNCH, false)
-        if (isFirstLaunch){
+        if (isFirstLaunch) {
             if (UserHelper.isLogin()) {
                 //接收h5跳转意图
                 val uri: Uri? = intent.data
@@ -44,7 +52,7 @@ class SplashActivity : BaseActivity<ActivitySplashLayoutBinding>() {
             } else {
                 jumpLogin()
             }
-        }else{
+        } else {
             goGuide();
         }
 

+ 122 - 0
student/src/main/java/com/cooleshow/student/ui/web/AgentWebActivity.java

@@ -0,0 +1,122 @@
+package com.cooleshow.student.ui.web;
+
+import static com.cooleshow.base.common.WebConstants.WEB_URL;
+
+import android.view.KeyEvent;
+import android.view.View;
+import android.webkit.WebView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+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.widgets.AgentWebClient;
+import com.cooleshow.student.databinding.ActivityAgentWebBinding;
+import com.cooleshow.student.presenter.web.AgentWebPresenter;
+import com.cooleshow.usercenter.helper.UserHelper;
+import com.just.agentweb.AgentWeb;
+import com.just.agentweb.WebChromeClient;
+
+/**
+ * 创建日期:2022/6/5 13:32
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
+public class AgentWebActivity extends BaseMVPActivity<ActivityAgentWebBinding, AgentWebPresenter> {
+    private AgentWeb mAgentWeb;
+    private LinearLayout container;
+    private TextView tv_title;
+    private AgentWebClient mWebClient;
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "酷乐秀");
+        container = viewBinding.container;
+        tv_title = viewBinding.toolbarInclude.title;
+        viewBinding.toolbarInclude.ivBack.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                goBack();
+            }
+        });
+        String linkurl = getIntent().getStringExtra(WEB_URL);
+        mWebClient = new AgentWebClient();
+        linkurl=loadUrl(linkurl);
+        mAgentWeb = AgentWeb.with(this)
+                .setAgentWebParent((LinearLayout) container, new LinearLayout.LayoutParams(-1, -1))
+                .useDefaultIndicator()
+                .setWebChromeClient(mWebChromeClient)
+                .setWebViewClient(mWebClient)
+                .createAgentWeb()
+                .ready()
+                .go(linkurl);
+
+    }
+
+    private String loadUrl(String url) {
+        String userToken = UserHelper.getUserToken();
+        mWebClient.setAuthorization(userToken);
+        boolean status = url.contains("?");
+        if (status) {
+            url = (url + "&Authorization=" + userToken);
+        } else {
+            url = (url + "?Authorization=" + userToken);
+        }
+        return url;
+    }
+
+
+    private void goBack() {
+        if (!mAgentWeb.back()) {
+            finish();
+        }
+    }
+
+    @Override
+    protected void onPause() {
+        mAgentWeb.getWebLifeCycle().onPause();
+        super.onPause();
+
+    }
+
+    @Override
+    protected void onResume() {
+        mAgentWeb.getWebLifeCycle().onResume();
+        super.onResume();
+    }
+
+    @Override
+    public void onDestroy() {
+        mAgentWeb.getWebLifeCycle().onDestroy();
+        super.onDestroy();
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (mAgentWeb.handleKeyEvent(keyCode, event)) {
+            return true;
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
+    private WebChromeClient mWebChromeClient = new WebChromeClient() {
+        @Override
+        public void onReceivedTitle(WebView view, String title) {
+            super.onReceivedTitle(view, title);
+            tv_title.setText(title);
+        }
+    };
+
+    @Override
+    protected ActivityAgentWebBinding getLayoutView() {
+        return ActivityAgentWebBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected AgentWebPresenter createPresenter() {
+        return new AgentWebPresenter();
+    }
+}

+ 1 - 1
student/src/main/java/com/cooleshow/student/ui/web/WebActivity.java

@@ -55,7 +55,7 @@ import java.util.List;
 /**
  * Author by pq, Date on 2022/4/24.
  */
-@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
+
 public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements JsInterfaceHelper.OnJsMethodCallListener, View.OnClickListener {
     private static final int REQUEST_CODE_FILE_CHOOSER = 500;
     private WebView webView;

+ 0 - 30
student/src/main/res/drawable-v24/ic_launcher_foreground.xml

@@ -1,30 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:aapt="http://schemas.android.com/aapt"
-    android:width="108dp"
-    android:height="108dp"
-    android:viewportHeight="108"
-    android:viewportWidth="108">
-    <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
-        <aapt:attr name="android:fillColor">
-            <gradient
-                android:endX="85.84757"
-                android:endY="92.4963"
-                android:startX="42.9492"
-                android:startY="49.59793"
-                android:type="linear">
-                <item
-                    android:color="#44000000"
-                    android:offset="0.0" />
-                <item
-                    android:color="#00000000"
-                    android:offset="1.0" />
-            </gradient>
-        </aapt:attr>
-    </path>
-    <path
-        android:fillColor="#FFFFFF"
-        android:fillType="nonZero"
-        android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
-        android:strokeColor="#00000000"
-        android:strokeWidth="1" />
-</vector>

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


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


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


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


+ 12 - 0
student/src/main/res/layout/activity_agent_web.xml

@@ -0,0 +1,12 @@
+<?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:id="@+id/container"
+    android:orientation="vertical">
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+
+</LinearLayout>

+ 12 - 4
student/src/main/res/layout/activity_splash_layout.xml

@@ -1,7 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="@color/white">
 
-</LinearLayout>
+
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true"
+        android:background="@drawable/bg_splash" />
+
+
+</RelativeLayout>

+ 0 - 1
student/src/main/res/layout/fragment_course_table_layout.xml

@@ -10,7 +10,6 @@
         android:layout_width="match_parent"
         android:layout_height="20dp"
         app:layout_constrainedHeight="true"
-        app:layout_constraintHeight_default="wrap"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 

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

@@ -52,7 +52,7 @@
         android:includeFontPadding="false"
         android:textColor="@color/color_666666"
         android:textSize="@dimen/sp_13"
-        android:text="声部"
+        android:text="全部声部"
         app:layout_constraintBottom_toBottomOf="@+id/tv_time"
         app:layout_constraintLeft_toRightOf="@+id/tv_course_status"
         app:layout_constraintRight_toRightOf="parent"

+ 1 - 28
student/src/main/res/layout/fragment_shopmal.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/rl_activity_html"
+    android:id="@+id/container"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
@@ -11,35 +11,8 @@
         android:layout_height="20dp"
         app:layout_constrainedHeight="true"
         android:background="@color/color_59e5d5"
-        app:layout_constraintHeight_default="wrap"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <LinearLayout
-        android:id="@+id/ll_activity_html"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical">
-
-        <View
-            android:id="@+id/view_statusbar"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:background="@color/white"
-            android:visibility="gone" />
 
-        <ProgressBar
-            android:id="@+id/progressBar"
-            style="?android:attr/progressBarStyleHorizontal"
-            android:layout_width="match_parent"
-            android:layout_height="2dip"
-            android:progressDrawable="@drawable/pg_stu" />
-    </LinearLayout>
-
-    <FrameLayout
-        android:id="@+id/view_parent"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_below="@+id/ll_activity_html"
-        android:scrollbars="none" />
 </LinearLayout>

+ 0 - 5
student/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

+ 0 - 5
student/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

BIN
student/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
student/src/main/res/mipmap-hdpi/ic_launcher.webp


BIN
student/src/main/res/mipmap-hdpi/ic_launcher_round.webp


BIN
student/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
student/src/main/res/mipmap-mdpi/ic_launcher.webp


BIN
student/src/main/res/mipmap-mdpi/ic_launcher_round.webp


BIN
student/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
student/src/main/res/mipmap-xhdpi/ic_launcher.webp


BIN
student/src/main/res/mipmap-xhdpi/ic_launcher_round.webp


BIN
student/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
student/src/main/res/mipmap-xxhdpi/ic_launcher.webp


BIN
student/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp


BIN
student/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
student/src/main/res/mipmap-xxxhdpi/ic_launcher.webp


BIN
student/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp


+ 1 - 1
student/src/main/res/values/strings.xml

@@ -1,5 +1,5 @@
 <resources>
-    <string name="app_name">student</string>
+    <string name="app_name">酷乐秀</string>
     <string name="menu_home">首页</string>
     <string name="menu_course_table">课表</string>
     <string name="menu_chat">聊天</string>

+ 11 - 0
student/src/main/res/values/styles.xml

@@ -1,6 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
+    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+    </style>
+
+    <style name="SplashTheme" parent="AppTheme">
+        <item name="android:windowBackground">@drawable/bg_splash</item>
+        <item name="android:statusBarColor">@color/colorPrimary</item>
+    </style>
+
 
     <style name="NavPage">
         <item name="android:layout_width">fill_parent</item>

+ 0 - 16
student/src/main/res/values/themes.xml

@@ -1,16 +0,0 @@
-<resources xmlns:tools="http://schemas.android.com/tools">
-    <!-- Base application theme. -->
-    <style name="Theme.CooleShow" parent="BaseAppThemeLight">
-    </style>
-
-    <style name="BaseAppThemeLight" parent="Theme.AppCompat.Light.NoActionBar">
-        <item name="android:windowNoTitle">true</item>
-        <item name="android:windowFullscreen">false</item>
-        <item name="android:windowActionBar">false</item>
-        <item name="colorPrimary">@color/colorPrimary</item>
-        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
-        <item name="colorAccent">@color/colorAccent</item>
-        <item name="windowActionModeOverlay">true</item>
-        <item name="android:windowBackground">@color/color_f8f9fc</item>
-    </style>
-</resources>

+ 6 - 3
teacher/src/main/AndroidManifest.xml

@@ -10,12 +10,12 @@
         android:label="@string/app_name"
         android:networkSecurityConfig="@xml/network_security_config"
         android:requestLegacyExternalStorage="true"
-        android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
-        android:theme="@style/Theme.CooleShow">
+        android:theme="@style/AppTheme">
 
         <activity
             android:name="com.cooleshow.teacher.ui.splash.SplashActivity"
+            android:screenOrientation="portrait"
             android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -51,7 +51,10 @@
             android:name=".ui.web.WebActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
-
+        <activity
+            android:name=".ui.web.AgentWebActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
         <activity
             android:name=".ui.course.SparringCourseDetailActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"

File diff suppressed because it is too large
+ 0 - 0
teacher/src/main/assets/echarts.min.js


+ 46 - 0
teacher/src/main/assets/stacked_line_chart.html

@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>ECharts</title>
+    <!-- 引入 echarts.js -->
+    <script src="echarts.min.js"></script>
+    <meta name="viewport"
+          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <style>
+        html,body{margin:0;padding:0}
+        body{width: 100%;height:100vh;padding-bottom:10pt;box-sizing: border-box;}
+
+
+    </style>
+</head>
+<body>
+<div id="main" style="width: 100%;height:calc(100vh - 10pt);"></div>
+<script type="text/javascript">
+            // 基于准备好的dom,初始化echarts实例
+            var myChart = echarts.init(document.getElementById('main'));
+
+             function loadEcharts(echartJson){
+                var option = JSON.parse(echartJson);
+                    myChart.setOption(option,true);
+            }
+
+
+
+
+//           指定图表的配置项和数据
+//          var option = {"color":["#01C1B5"],"dataZoom":[{"throttle":100,"type":"inside"}],"grid":{"bottom":"3%","containLabel":true,"left":"3%","right":"5%"},"legend":{"show":false},"series":[{"data":[355.0,710.0],"emphasis":{"lineStyle":{"width":1}},"lineStyle":{"width":1},"name":"课酬","symbol":"circle","type":"line"}],"title":{"show":false},"toolbox":{"feature":{"saveAsImage":{"show":false}}},"tooltip":{"trigger":"axis"},"xAxis":{"axisLine":{"lineStyle":{"color":"#8C8C8C"}},"boundaryGap":false,"data":["03月","04月"],"type":"category"},"yAxis":{"splitLine":{"axisLine":{"lineStyle":{"color":"#8C8C8C"}},"lineStyle":{"color":["#E2E2E2"]}},"type":"value"}}
+
+//       myChart.setOption(option);
+
+
+
+
+
+
+
+
+
+</script>
+</body>
+</html>

+ 79 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/BaseRecyclerAdapter.java

@@ -0,0 +1,79 @@
+package com.cooleshow.teacher.adapter;
+
+import android.view.View;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+public abstract class BaseRecyclerAdapter<V extends BaseViewHolder> extends RecyclerView.Adapter<BaseViewHolder>
+        implements View.OnClickListener
+        , View.OnLongClickListener {
+
+    public OnItemClickListener onItemClickListener;
+    public OnItemLongClickListener onItemLongClickListener;
+    public OnSubViewClickListener onSubViewClickListener;
+
+    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
+        this.onItemClickListener = onItemClickListener;
+    }
+
+    public void setOnItemLongClickListener(OnItemLongClickListener listener) {
+        this.onItemLongClickListener = listener;
+    }
+
+    public void setOnSubViewClickListener(OnSubViewClickListener listener) {
+        this.onSubViewClickListener = listener;
+    }
+
+    @Override
+    public void onBindViewHolder(BaseViewHolder holder, int position) {
+        holder.itemView.setTag(position);
+        holder.onBind(position);
+        if (onItemClickListener != null) {
+            holder.itemView.setOnClickListener(this);
+        }
+        if (onItemLongClickListener != null) {
+            holder.itemView.setOnLongClickListener(this);
+        }
+        if (onSubViewClickListener != null) {
+            holder.setSubViewClickListener(onSubViewClickListener, position);
+        }
+    }
+
+    private long tempTime;
+
+    @Override
+    public void onClick(View v) {
+        if (v.getTag() != null) {
+            int position = (int) v.getTag();
+            long newTime = System.currentTimeMillis();
+            if ((newTime - tempTime) > 1000) {
+                onItemClickListener.onItemClick(position);
+                tempTime = newTime;
+            }
+
+        }
+    }
+
+    @Override
+    public boolean onLongClick(View v) {
+        if (v.getTag() != null) {
+            int position = (int) v.getTag();
+            onItemLongClickListener.onItemLongClick(position);
+        }
+        return true;
+    }
+
+
+    public interface OnItemClickListener {
+        void onItemClick(int position);
+    }
+
+    public interface OnSubViewClickListener {
+        void onSubViewClick(View v, int position);
+    }
+
+    public interface OnItemLongClickListener {
+        void onItemLongClick(int position);
+    }
+
+}

+ 49 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/BaseViewHolder.java

@@ -0,0 +1,49 @@
+package com.cooleshow.teacher.adapter;
+
+import android.view.View;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+public abstract class BaseViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
+ private BaseRecyclerAdapter.OnSubViewClickListener onSubViewClickListener;
+ public BaseViewHolder(View itemView) {
+  super(itemView);
+ }
+ 
+ /**
+  * 传入子项点击事件所需参数
+  * @param listener 自定义的接口
+  * @param tagPosition tag
+  */
+ public void setSubViewClickListener(BaseRecyclerAdapter.OnSubViewClickListener listener, int tagPosition){
+  this.onSubViewClickListener = listener;
+  initSubViewClick(tagPosition);
+ }
+ 
+
+ /**
+  * 用于装载数据(开发者自行实现)
+  * @param position 当前位置
+  */
+ abstract protected void onBind(int position);
+ 
+ /**
+  * 初始化子项的点击事件(为子项设置tag)
+  * @param tagPosition tag
+  */
+ protected void initSubViewClick(int tagPosition){
+ 
+ }
+ 
+ /**
+  * 实现子项点击事件的转发
+  * @param v
+  */
+ @Override
+ public void onClick(View v) {
+  if (v.getTag() != null) {
+   int position = (int) v.getTag();
+   onSubViewClickListener.onSubViewClick(v,position);
+  }
+ }
+}

+ 85 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/EarningDoughnutListAdapter.java

@@ -0,0 +1,85 @@
+package com.cooleshow.teacher.adapter;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+
+
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.bean.EarningDoughnutChartBean;
+import com.cooleshow.teacher.widgets.RoundView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Description:
+ * Copyright  : Copyright (c) 2019
+ * Company    : 大雅乐盟
+ * Author     : r
+ * Date       : 2019/9/18 19:49
+ */
+public class EarningDoughnutListAdapter extends BaseRecyclerAdapter<EarningDoughnutListAdapter.ViewHolder> {
+
+
+    private Context mContext;
+    private double total;
+    List<EarningDoughnutChartBean.SeriesBean.DataBean> doughuntDataList = new ArrayList<>();
+    private List<String> color = new ArrayList<>();
+
+    public EarningDoughnutListAdapter(Context mContex) {
+        this.mContext = mContex;
+    }
+
+
+    @NonNull
+    @Override
+    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        View inflater = LayoutInflater.from(mContext).inflate(R.layout.earnings_structure_doughnut_list_item, parent, false);
+        return new ViewHolder(inflater);
+    }
+
+    @Override
+    public int getItemCount() {
+        return doughuntDataList.size();
+    }
+
+    public void setData(List<EarningDoughnutChartBean.SeriesBean.DataBean> doughuntDataList, Double total, List<String> color) {
+        this.total = total;
+        this.doughuntDataList = doughuntDataList;
+        this.color = color;
+        notifyDataSetChanged();
+
+    }
+
+
+    public class ViewHolder extends BaseViewHolder {
+        RoundView ivIcon;
+        TextView tvTitle;
+        TextView tvPercent;
+
+        public ViewHolder(View itemView) {
+            super(itemView);
+            ivIcon=itemView.findViewById(R.id.iv_icon);
+            tvTitle=itemView.findViewById(R.id.tv_title);
+            tvPercent=itemView.findViewById(R.id.tv_percent);
+
+        }
+
+        @Override
+        protected void onBind(int position) {
+            EarningDoughnutChartBean.SeriesBean.DataBean bean = doughuntDataList.get(position);
+            if (position < color.size()) {
+                ivIcon.setBgColor(Color.parseColor(color.get(position)));
+            }
+            tvTitle.setText(bean.getName());
+            tvPercent.setText("| " + Math.round(bean.getValue() / total * 100) + "%");
+        }
+    }
+}

+ 93 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/EarningStackedListAdapter.java

@@ -0,0 +1,93 @@
+package com.cooleshow.teacher.adapter;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+
+
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.bean.EarningDoughnutChartBean;
+import com.cooleshow.teacher.widgets.LineView;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Description:
+ * Copyright  : Copyright (c) 2019
+ * Company    : 大雅乐盟
+ * Author     : r
+ * Date       : 2019/9/18 19:49
+ */
+public class EarningStackedListAdapter extends BaseRecyclerAdapter<EarningStackedListAdapter.ViewHolder> {
+
+
+    private Context mContext;
+    private double total;
+    List<EarningDoughnutChartBean.SeriesBean.DataBean> doughuntDataList = new ArrayList<>();
+    private List<String> color = new ArrayList<>();
+
+    public EarningStackedListAdapter(Context mContex) {
+        this.mContext = mContex;
+    }
+
+
+    @NonNull
+    @Override
+    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        View inflater = LayoutInflater.from(mContext).inflate(R.layout.earnings_structure_stacked_list_item, parent, false);
+        return new ViewHolder(inflater);
+    }
+
+    @Override
+    public int getItemCount() {
+        return doughuntDataList.size();
+    }
+
+    public void setData(List<EarningDoughnutChartBean.SeriesBean.DataBean> doughuntDataList, Double total, List<String> color) {
+        this.total = total;
+        this.doughuntDataList = doughuntDataList;
+        this.color = color;
+        notifyDataSetChanged();
+
+    }
+
+
+    public class ViewHolder extends BaseViewHolder {
+        View line;
+        LineView ivIcon;
+        TextView tvTitle;
+        TextView tvPercent;
+
+        public ViewHolder(View itemView) {
+            super(itemView);
+            line=itemView.findViewById(R.id.line);
+            ivIcon=itemView.findViewById(R.id.iv_icon);
+            tvTitle=itemView.findViewById(R.id.tv_title);
+            tvPercent=itemView.findViewById(R.id.tv_percent);
+        }
+
+        @Override
+        protected void onBind(int position) {
+            EarningDoughnutChartBean.SeriesBean.DataBean bean = doughuntDataList.get(position);
+            if (position < color.size()) {
+                ivIcon.setBgColor(Color.parseColor(color.get(position)));
+            }
+            if (position == 0) {
+                line.setVisibility(View.GONE);
+            } else {
+                line.setVisibility(View.VISIBLE);
+            }
+            tvTitle.setText(bean.getName() + "");
+            DecimalFormat df = new DecimalFormat("#,##0.00");
+            tvPercent.setText(df.format(bean.getValue()));
+        }
+    }
+}

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

@@ -2,6 +2,7 @@ package com.cooleshow.teacher.api;
 
 import com.cooleshow.base.data.net.BaseResponse;
 import com.cooleshow.teacher.bean.AccountDetailBean;
+import com.cooleshow.teacher.bean.AccountTotalBean;
 import com.cooleshow.teacher.bean.AddressBean;
 import com.cooleshow.teacher.bean.CountOfUnreadBean;
 import com.cooleshow.teacher.bean.CourseCommentListBean;
@@ -512,4 +513,12 @@ public interface APIService {
      */
     @POST(CMS_SERVER + "helpCenterContent/list")
     Observable<BaseResponse<HelpCenterContentBean>> helpCenterContentList(@Body RequestBody body);
+
+    /**
+     *
+     * @param body
+     * @return
+     */
+    @POST(TEACHER_GROUP + "userAccount/accountTotal")
+    Observable<BaseResponse<AccountTotalBean>> accountTotal(@Body RequestBody body);
 }

+ 53 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/AccountTotalBean.java

@@ -0,0 +1,53 @@
+package com.cooleshow.teacher.bean;
+
+import java.util.List;
+
+/**
+ * 创建日期:2022/6/2 9:49
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class AccountTotalBean {
+    /*
+    	"infoList": [
+			{
+				"infoList": [
+					{}
+				],
+				"liveAmount": 0,
+				"liveRate": 0,
+				"musicAmount": 0,
+				"musicRate": 0,
+				"practiceAmount": 0,
+				"practiceRate": 0,
+				"timeStr": "",
+				"totalInAmount": 0,
+				"videoAmount": 0,
+				"videoRate": 0
+			}
+		],
+		"liveAmount": 0,
+		"liveRate": 0,
+		"musicAmount": 0,
+		"musicRate": 0,
+		"practiceAmount": 0,
+		"practiceRate": 0,
+		"timeStr": "",
+		"totalInAmount": 0,
+		"videoAmount": 0,
+		"videoRate": 0
+     */
+    public List<AccountTotalBean> infoList;
+    public double liveAmount;
+    public double liveRate;
+    public double musicAmount;
+    public double musicRate;
+    public double practiceAmount;
+    public double practiceRate;
+    public String timeStr;
+    public double totalInAmount;
+    public double videoAmount;
+    public double videoRate;
+
+}

+ 152 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/EarningDoughnutChartBean.java

@@ -0,0 +1,152 @@
+package com.cooleshow.teacher.bean;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
+public class EarningDoughnutChartBean implements Serializable {
+
+    /**
+     * color : ["",]
+     * toolbox : {"feature":{"saveAsImage":{"show":false}}}
+     * tooltip : {"trigger":"item","formatter":"{b} : {c} ({d}%)"}
+     * series : [{"name":"收入结构","type":"pie","radius":["40%","70%"],"avoidLabelOverlap":false,"label":{"show":false},"data":[{"value":200,"name":"课酬"}]}]
+     */
+
+    private ToolboxBean toolbox = new ToolboxBean();
+    private TooltipBean tooltip = new TooltipBean();
+    private List<String> color;
+    private List<SeriesBean> series;
+
+    public List<String> getColor() {
+        return color;
+    }
+
+    public void setColor(List<String> color) {
+        this.color = color;
+    }
+
+    public List<SeriesBean> getSeries() {
+        return series;
+    }
+
+    public void setSeries(List<SeriesBean> series) {
+        this.series = series;
+    }
+
+    public static class ToolboxBean implements Serializable {
+        /**
+         * feature : {"saveAsImage":{"show":false}}
+         */
+
+        private FeatureBean feature = new FeatureBean();
+
+        public static class FeatureBean implements Serializable {
+            /**
+             * saveAsImage : {"show":false}
+             */
+
+            private SaveAsImageBean saveAsImage = new SaveAsImageBean();
+
+            public static class SaveAsImageBean implements Serializable {
+                /**
+                 * show : false
+                 */
+
+                private boolean show = false;
+            }
+        }
+    }
+
+    public static class TooltipBean implements Serializable {
+        /**
+         * trigger : item
+         * formatter : {b} : {c} ({d}%)
+         */
+
+        private String trigger = "item";
+        private String formatter = "{b} : {c} ({d}%)";
+        private int borderWidth = 0;
+        private int padding = 3;
+        private List<String> position = Arrays.asList("30%", "30%");
+
+        /**
+         * textStyle : {"fontSize":12}
+         */
+
+        private TextStyleBean textStyle = new TextStyleBean();
+
+        public static class TextStyleBean implements Serializable {
+            /**
+             * fontSize : 12
+             */
+
+            private int fontSize = 12;
+        }
+    }
+
+    public static class SeriesBean implements Serializable {
+        /**
+         * name : 收入结构
+         * type : pie
+         * radius : ["40%","70%"]
+         * avoidLabelOverlap : false
+         * label : {"show":false}
+         * data : [{"value":200,"name":"课酬"}]
+         */
+
+        private String name;
+        private String type = "pie";
+        private boolean avoidLabelOverlap = false;
+        private LabelBean label = new LabelBean();
+        private List<String> radius = Arrays.asList("50%", "80%");
+        private List<DataBean> data;
+
+        public List<DataBean> getData() {
+            return data;
+        }
+
+        public void setData(List<DataBean> data) {
+            this.data = data;
+        }
+
+        public static class LabelBean implements Serializable {
+            /**
+             * show : false
+             */
+
+            private boolean show = false;
+        }
+
+        public static class DataBean implements Serializable {
+            public DataBean(double value, String name) {
+                this.value = value;
+                this.name = name;
+            }
+
+            public double getValue() {
+                return value;
+            }
+
+            public void setValue(double value) {
+                this.value = value;
+            }
+
+            public String getName() {
+                return name;
+            }
+
+            public void setName(String name) {
+                this.name = name;
+            }
+
+            /**
+             * value : 200
+             * name : 课酬
+             */
+
+            private double value;
+            private String name;
+        }
+    }
+}

+ 298 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/EarningStackedLineBean.java

@@ -0,0 +1,298 @@
+package com.cooleshow.teacher.bean;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
+public class EarningStackedLineBean implements Serializable {
+
+    /**
+     * color : ["#14928A"]
+     * title : {"show":false}
+     * tooltip : {"trigger":"axis"}
+     * legend : {"show":false}
+     * grid : {"left":"3%","right":"3%","bottom":"3%","containLabel":true}
+     * toolbox : {"feature":{"saveAsImage":{}}}
+     * xAxis : {"type":"category","boundaryGap":false,"data":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"axisLine":{"lineStyle":{"color":"#8C8C8C"}}}
+     * yAxis : {"type":"value","splitLine":{"lineStyle":{"color":["#E2E2E2"]},"axisLine":{"lineStyle":{"color":"#8C8C8C"}}}}
+     * series : [{"symbol":"none","name":"月度","type":"line","lineStyle":{"width":1},"emphasis":{"lineStyle":{"width":1}},"data":[120,132,101,134,90,230,210,210,210,210,210,210]}]
+     * dataZoom : [{"type":"slider","show":true,"filterMode":"filter","start":0,"end":50,"bottom":0}]
+     */
+
+    private TitleBean title = new TitleBean();
+    private TooltipBean tooltip = new TooltipBean();
+    private LegendBean legend = new LegendBean();
+    private GridBean grid = new GridBean();
+    private ToolboxBean toolbox = new ToolboxBean();
+    private XAxisBean xAxis;
+    private YAxisBean yAxis = new YAxisBean();
+    private List<String> color = Arrays.asList("#01C1B5", "#5B8FF9", "#FFD02C", "#F97215", "#F85043");
+    private List<SeriesBean> series;
+    private List<DataZoomBean> dataZoom = Arrays.asList(new DataZoomBean());
+
+    public List<String> getColor() {
+        return color;
+    }
+
+    public void setColor(List<String> color) {
+        this.color = color;
+    }
+
+    public static class TitleBean implements Serializable {
+        /**
+         * show : false
+         */
+
+        private boolean show = false;
+    }
+
+
+    public static class TooltipBean implements Serializable {
+        /**
+         * trigger : axis
+         */
+
+        private String trigger = "axis";
+    }
+
+
+    public static class LegendBean implements Serializable {
+        /**
+         * show : false
+         */
+
+        private boolean show = false;
+    }
+
+
+    public static class GridBean implements Serializable {
+        /**
+         * left : 3%
+         * right : 3%
+         * bottom : 3%
+         * containLabel : true
+         */
+
+        private String left = "3%";
+        private String right = "5%";
+        private String bottom = "3%";
+        private boolean containLabel = true;
+    }
+
+
+    public static class ToolboxBean implements Serializable {
+        /**
+         * feature : {"saveAsImage":{}}
+         */
+
+        private FeatureBean feature = new FeatureBean();
+
+
+        public static class FeatureBean implements Serializable {
+            /**
+             * saveAsImage : {}
+             */
+
+            private SaveAsImageBean saveAsImage = new SaveAsImageBean();
+
+
+            public static class SaveAsImageBean implements Serializable {
+                private boolean show = false;
+            }
+        }
+    }
+
+    public XAxisBean getxAxis() {
+        return xAxis;
+    }
+
+    public void setxAxis(XAxisBean xAxis) {
+        this.xAxis = xAxis;
+    }
+
+    public List<SeriesBean> getSeries() {
+        return series;
+    }
+
+    public void setSeries(List<SeriesBean> series) {
+        this.series = series;
+    }
+
+    public List<DataZoomBean> getDataZoom() {
+        return dataZoom;
+    }
+
+    public void setDataZoom(List<DataZoomBean> dataZoom) {
+        this.dataZoom = dataZoom;
+    }
+
+    public static class XAxisBean implements Serializable {
+        /**
+         * type : category
+         * boundaryGap : false
+         * data : ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]
+         * axisLine : {"lineStyle":{"color":"#8C8C8C"}}
+         */
+
+        private String type = "category";
+        private boolean boundaryGap = false;
+        private AxisLineBean axisLine = new AxisLineBean();
+        private List<String> data;
+
+        public List<String> getData() {
+            return data;
+        }
+
+        public void setData(List<String> data) {
+            this.data = data;
+        }
+
+        public static class AxisLineBean implements Serializable {
+            /**
+             * lineStyle : {"color":"#8C8C8C"}
+             */
+
+            private LineStyleBean lineStyle = new LineStyleBean();
+
+
+            public static class LineStyleBean implements Serializable {
+                /**
+                 * color : #8C8C8C
+                 */
+
+                private String color = "#8C8C8C";
+            }
+        }
+    }
+
+
+    public static class YAxisBean implements Serializable {
+        /**
+         * type : value
+         * splitLine : {"lineStyle":{"color":["#E2E2E2"]},"axisLine":{"lineStyle":{"color":"#8C8C8C"}}}
+         */
+
+        private String type = "value";
+        private SplitLineBean splitLine = new SplitLineBean();
+
+
+        public static class SplitLineBean implements Serializable {
+            /**
+             * lineStyle : {"color":["#E2E2E2"]}
+             * axisLine : {"lineStyle":{"color":"#8C8C8C"}}
+             */
+
+            private LineStyleBeanX lineStyle = new LineStyleBeanX();
+            private AxisLineBeanX axisLine = new AxisLineBeanX();
+
+
+            public static class LineStyleBeanX implements Serializable {
+                private List<String> color = Arrays.asList("#E2E2E2");
+            }
+
+
+            public static class AxisLineBeanX implements Serializable {
+                /**
+                 * lineStyle : {"color":"#8C8C8C"}
+                 */
+
+                private LineStyleBeanXX lineStyle = new LineStyleBeanXX();
+
+
+                public static class LineStyleBeanXX implements Serializable {
+                    /**
+                     * color : #8C8C8C
+                     */
+
+                    private String color = "#8C8C8C";
+                }
+            }
+        }
+    }
+
+
+    public static class SeriesBean implements Serializable {
+        /**
+         * symbol : none
+         * name : 月度
+         * type : line
+         * lineStyle : {"width":1}
+         * emphasis : {"lineStyle":{"width":1}}
+         * data : [120,132,101,134,90,230,210,210,210,210,210,210]
+         */
+
+        private String symbol = "circle";
+        private String name;
+
+
+        private String type = "line";
+        private LineStyleBeanXXX lineStyle = new LineStyleBeanXXX();
+        private EmphasisBean emphasis = new EmphasisBean();
+        private List<Double> data;
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public List<Double> getData() {
+            return data;
+        }
+
+        public void setData(List<Double> data) {
+            this.data = data;
+        }
+
+        public static class LineStyleBeanXXX implements Serializable {
+            /**
+             * width : 1
+             */
+
+            private int width = 1;
+        }
+
+
+        public static class EmphasisBean implements Serializable {
+            /**
+             * lineStyle : {"width":1}
+             */
+
+            private LineStyleBeanXXXX lineStyle = new LineStyleBeanXXXX();
+
+
+            public static class LineStyleBeanXXXX implements Serializable {
+                /**
+                 * width : 1
+                 */
+
+                private int width = 1;
+            }
+        }
+    }
+
+
+    public static class DataZoomBean implements Serializable {
+        /**
+         * type : slider
+         * show : true
+         * filterMode : filter
+         * start : 0
+         * end : 50
+         * bottom : 0
+         */
+
+        private String type = "inside";
+        private int throttle = 50;
+
+        public int getThrottle() {
+            return throttle;
+        }
+
+        public void setThrottle(int throttle) {
+            this.throttle = throttle;
+        }
+    }
+}

+ 17 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/AgentWebContract.java

@@ -0,0 +1,17 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/6/5 13:35
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface AgentWebContract {
+    interface AgentWebView extends BaseView {
+
+    }
+    interface Presenter {
+    }
+}

+ 3 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/EarningStatisticsContract.java

@@ -1,6 +1,7 @@
 package com.cooleshow.teacher.contract;
 
 import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.teacher.bean.AccountTotalBean;
 
 /**
  * 创建日期:2022/6/1 18:00
@@ -10,8 +11,10 @@ import com.cooleshow.base.presenter.view.BaseView;
  */
 public interface EarningStatisticsContract {
     interface EarningStatisticsView extends BaseView {
+        void accountTotalSuccess(AccountTotalBean data);
 
     }
+
     interface Presenter {
     }
 }

+ 37 - 1
teacher/src/main/java/com/cooleshow/teacher/presenter/income/EarningStatisticsPresenter.java

@@ -1,8 +1,14 @@
 package com.cooleshow.teacher.presenter.income;
 
 import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.bean.AccountTotalBean;
 import com.cooleshow.teacher.contract.EarningStatisticsContract;
-import com.cooleshow.teacher.contract.MineIncomeContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
 
 /**
  * 创建日期:2022/6/1 18:00
@@ -11,4 +17,34 @@ import com.cooleshow.teacher.contract.MineIncomeContract;
  * 类说明:
  */
 public class EarningStatisticsPresenter extends BasePresenter<EarningStatisticsContract.EarningStatisticsView> implements EarningStatisticsContract.Presenter {
+
+    public void accountTotal(String dateTime,String timeType) {
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.putOpt("dateTime", dateTime);
+            jsonObject.putOpt("timeType", timeType);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(APIService.class).accountTotal(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<AccountTotalBean>(getView()) {
+            @Override
+            protected void onSuccess(AccountTotalBean data) {
+                if (getView() != null) {
+                    getView().accountTotalSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+
+            }
+        });
+    }
+
 }

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/InputBankVCodePresenter.java

@@ -52,7 +52,7 @@ public class InputBankVCodePresenter extends BasePresenter<InputBankVCodeContrac
         getView().showLoading();
         JSONObject jsonObject = new JSONObject();
         try {
-            jsonObject.putOpt("mobile", phone);
+            jsonObject.putOpt("phone", phone);
             jsonObject.putOpt("type", type);
             jsonObject.putOpt("code", code);
         } catch (JSONException e) {

+ 14 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/web/AgentWebPresenter.java

@@ -0,0 +1,14 @@
+package com.cooleshow.teacher.presenter.web;
+
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.teacher.contract.AgentWebContract;
+
+/**
+ * 创建日期:2022/6/5 13:34
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class AgentWebPresenter extends BasePresenter<AgentWebContract.AgentWebView> implements AgentWebContract.Presenter {
+
+}

+ 471 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/income/EarningStatisticsActivity.java

@@ -1,13 +1,58 @@
 package com.cooleshow.teacher.ui.income;
 
+import android.graphics.Bitmap;
+import android.os.Build;
+import android.os.Bundle;
+import android.text.TextUtils;
 import android.view.View;
+import android.webkit.ValueCallback;
+import android.webkit.WebResourceError;
+import android.webkit.WebResourceRequest;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+import android.widget.CheckBox;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.TextView;
+
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
+import com.bigkoo.pickerview.builder.TimePickerBuilder;
+import com.bigkoo.pickerview.listener.CustomListener;
+import com.bigkoo.pickerview.listener.OnTimeSelectListener;
+import com.bigkoo.pickerview.view.TimePickerView;
+import com.contrarywind.view.WheelView;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.DateUtil;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.adapter.EarningDoughnutListAdapter;
+import com.cooleshow.teacher.adapter.EarningStackedListAdapter;
+import com.cooleshow.teacher.bean.AccountTotalBean;
+import com.cooleshow.teacher.bean.EarningDoughnutChartBean;
+import com.cooleshow.teacher.bean.EarningStackedLineBean;
 import com.cooleshow.teacher.contract.EarningStatisticsContract;
 import com.cooleshow.teacher.databinding.ActivityEarningStatisticsBinding;
 import com.cooleshow.teacher.presenter.income.EarningStatisticsPresenter;
+import com.cooleshow.teacher.widgets.LollipopFixedWebView;
+import com.google.gson.Gson;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import io.rong.imkit.utils.StatusBarUtil;
 
 /**
  * 创建日期:2022/6/1 17:58
@@ -18,15 +63,50 @@ import com.cooleshow.teacher.presenter.income.EarningStatisticsPresenter;
 @Route(path = RouterPath.IncomeCenter.TEACHER_MINE_EARNING_STATISTICS)
 public class EarningStatisticsActivity extends BaseMVPActivity<ActivityEarningStatisticsBinding, EarningStatisticsPresenter> implements EarningStatisticsContract.EarningStatisticsView, View.OnClickListener {
     @Override
-    public void onClick(View view) {
-
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        StatusBarUtil.setStatusBarDarkTheme(this, true);
+        initViewState(savedInstanceState);
     }
 
+    TextView tvAllEarnings;
+    RecyclerView rvStacked;
+    CheckBox cbScreen;
+    FrameLayout viewParent;
+    LinearLayout rlNetErrorRoot;
+    FrameLayout doughnutParent;
+    RecyclerView rvDoughnut;
+    WebView webView;
+    private String stackedData;
+    private String doughnutData;
+    private TimePickerView pvCustomLunar;
+    private boolean isCheckMonth;
+    private String monthStr;
+    private String yearStr = DateUtil.getCurYearStr(null);
+    private List<String> color = Arrays.asList("#01C1B5", "#5B8FF9", "#FFD02C", "#F97215", "#F85043");
+    private EarningDoughnutListAdapter adapterDoughnut;
+    private EarningStackedListAdapter adapterStacked;
+    private WebView doughnutWebView;
+    static final String YEAR_STR = "yearStr";
+    static final String MONTH_STR = "monthStr";
+    static final String IS_CHECK_MONTH = "isCheckMonth";
+
     @Override
     protected void initView() {
 
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "收入统计");
+        tvAllEarnings=viewBinding.tvAllEarnings;
+        rvStacked=viewBinding.rvStacked;
+        cbScreen=viewBinding.cbScreen;
+        viewParent=viewBinding.viewParent;
+        rlNetErrorRoot=viewBinding.rlNetErrorRoot;
+        doughnutParent=viewBinding.doughnutParent;
+        rvDoughnut=viewBinding.rvDoughnut;
     }
+    @Override
+    public void onClick(View view) {
 
+    }
     @Override
     protected ActivityEarningStatisticsBinding getLayoutView() {
         return ActivityEarningStatisticsBinding.inflate(getLayoutInflater());
@@ -36,4 +116,393 @@ public class EarningStatisticsActivity extends BaseMVPActivity<ActivityEarningSt
     protected EarningStatisticsPresenter createPresenter() {
         return new EarningStatisticsPresenter();
     }
+
+    @Override
+    public void initData() {
+        super.initData();
+        getData(yearStr,"YEAR");
+    }
+
+    private void getData(String dataTime,String timeType){
+        presenter.accountTotal(dataTime,timeType);
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle savedInstanceState) {
+        savedInstanceState.putString(YEAR_STR, yearStr);
+        savedInstanceState.putString(MONTH_STR, monthStr);
+        savedInstanceState.putBoolean(IS_CHECK_MONTH, isCheckMonth);
+        super.onSaveInstanceState(savedInstanceState);
+    }
+
+    private void initViewState(Bundle savedInstanceState) {
+        if (savedInstanceState != null) {
+            yearStr = savedInstanceState.getString(YEAR_STR);
+            monthStr = savedInstanceState.getString(MONTH_STR);
+            isCheckMonth = savedInstanceState.getBoolean(IS_CHECK_MONTH);
+            if (isCheckMonth) {
+                cbScreen.setText(yearStr + "年" + monthStr + "月");
+            } else {
+                cbScreen.setText(yearStr + "年");
+                monthStr = null;
+            }
+        } else {
+            cbScreen.setText(yearStr + "年");
+        }
+        try {
+            if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
+                webView = new LollipopFixedWebView(this);
+            } else {
+                webView = new WebView(this);
+            }
+        } catch (Exception e) {
+
+        }
+        try {
+            if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
+                doughnutWebView = new LollipopFixedWebView(this);
+            } else {
+                doughnutWebView = new WebView(this);
+            }
+        } catch (Exception e) {
+
+        }
+        if (null == webView || null == doughnutWebView) {
+            return;
+        }
+
+        viewParent.addView(webView, new FrameLayout.LayoutParams(
+                FrameLayout.LayoutParams.MATCH_PARENT,
+                FrameLayout.LayoutParams.MATCH_PARENT));
+
+        doughnutParent.addView(doughnutWebView, new FrameLayout.LayoutParams(
+                FrameLayout.LayoutParams.MATCH_PARENT,
+                FrameLayout.LayoutParams.MATCH_PARENT));
+        initWebView();
+
+        cbScreen.setOnClickListener(v -> {
+            initLunarPicker();
+        });
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this) {
+            @Override
+            public boolean canScrollVertically() {
+                return false;
+            }
+        };
+        rvDoughnut.setLayoutManager(linearLayoutManager);
+        adapterDoughnut = new EarningDoughnutListAdapter(this);
+        rvDoughnut.setAdapter(adapterDoughnut);
+
+        GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 4) {
+            @Override
+            public boolean canScrollVertically() {
+                return false;
+            }
+        };
+        rvStacked.setLayoutManager(gridLayoutManager);
+        adapterStacked = new EarningStackedListAdapter(this);
+        rvStacked.setAdapter(adapterStacked);
+    }
+
+    private void initWebView() {
+
+        //声明WebSettings子类
+        WebSettings webSettings = webView.getSettings();
+        webSettings.setGeolocationDatabasePath(getApplicationContext().getFilesDir().getPath());
+        webSettings.setGeolocationEnabled(true);
+        webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
+        //如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
+        webSettings.setJavaScriptEnabled(true);
+
+        //设置自适应屏幕,两者合用
+        webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小
+        webSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小
+        //缩放操作
+        webSettings.setSupportZoom(false); //支持缩放,默认为true。是下面那个的前提。
+
+
+        webSettings.setLoadsImagesAutomatically(true); //支持自动加载图片
+        webSettings.setDefaultTextEncodingName("UTF-8");//设置编码格式
+
+
+        webSettings.setTextZoom(100);//设置字体默认的缩放比例,以避免手机系统的字体修改对页面字体及布局造成影响。
+        webView.setHorizontalScrollBarEnabled(false);
+        webView.setVerticalScrollBarEnabled(false);
+        webView.setWebViewClient(new WebViewClient() {
+                                     //页面开始载入时调用
+
+                                     @Override
+                                     public void onPageStarted(WebView view, String url, Bitmap favicon) {
+                                         super.onPageStarted(view, url, favicon);
+
+                                     }
+
+                                     //页面载入结束时调用
+                                     @Override
+                                     public void onPageFinished(WebView view, String url) {
+                                         super.onPageFinished(view, url);
+                                         if (!TextUtils.isEmpty(stackedData) && !isLoadFished) {
+                                             webView.evaluateJavascript("loadEcharts('" + stackedData + "')", new ValueCallback<String>() {
+                                                 @Override
+                                                 public void onReceiveValue(String s) {
+                                                 }
+                                             });
+                                         }
+                                         isLoadFished = true;
+                                     }
+
+                                     //处理报错信息
+                                     @Override
+                                     public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
+                                         super.onReceivedError(view, request, error);
+                                     }
+                                 }
+        );
+        webView.loadUrl("file:///android_asset/stacked_line_chart.html");
+
+
+        //声明WebSettings子类
+        WebSettings doughnutWebSettings = doughnutWebView.getSettings();
+        doughnutWebSettings.setGeolocationDatabasePath(getApplicationContext().getFilesDir().getPath());
+        doughnutWebSettings.setGeolocationEnabled(true);
+        doughnutWebSettings.setJavaScriptCanOpenWindowsAutomatically(true);
+        //如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
+        doughnutWebSettings.setJavaScriptEnabled(true);
+        //设置自适应屏幕,两者合用
+        doughnutWebSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小
+        doughnutWebSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小
+        //缩放操作
+        doughnutWebSettings.setSupportZoom(false); //支持缩放,默认为true。是下面那个的前提。
+
+        doughnutWebSettings.setLoadsImagesAutomatically(true); //支持自动加载图片
+        doughnutWebSettings.setDefaultTextEncodingName("UTF-8");//设置编码格式
+        doughnutWebSettings.setTextZoom(100);//设置字体默认的缩放比例,以避免手机系统的字体修改对页面字体及布局造成影响。
+        doughnutWebView.setHorizontalScrollBarEnabled(false);
+        doughnutWebView.setVerticalScrollBarEnabled(false);
+        doughnutWebView.setWebViewClient(new WebViewClient() {
+            //页面开始载入时调用
+
+            @Override
+            public void onPageStarted(WebView view, String url, Bitmap favicon) {
+                super.onPageStarted(view, url, favicon);
+
+            }
+
+            //页面载入结束时调用
+            @Override
+            public void onPageFinished(WebView view, String url) {
+                super.onPageFinished(view, url);
+                if (!TextUtils.isEmpty(doughnutData) && !isDoughnutLoadFished) {
+                    doughnutWebView.evaluateJavascript("loadEcharts('" + doughnutData + "')", new ValueCallback<String>() {
+                        @Override
+                        public void onReceiveValue(String s) {
+                        }
+                    });
+                }
+                isDoughnutLoadFished = true;
+            }
+
+            //处理报错信息
+            @Override
+            public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
+                super.onReceivedError(view, request, error);
+            }
+        });
+        doughnutWebView.loadUrl("file:///android_asset/stacked_line_chart.html");
+    }
+    boolean isLoadFished = false;
+    boolean isDoughnutLoadFished = false;
+
+    private WheelView month;
+
+    private void initLunarPicker() {
+        Calendar selectedDate = Calendar.getInstance();//系统当前时间
+        Calendar startDate = Calendar.getInstance();
+        startDate.set(2021, 2, 1);
+        Calendar endDate = Calendar.getInstance();
+        //时间选择器 ,自定义布局
+        pvCustomLunar = new TimePickerBuilder(this, new OnTimeSelectListener() {
+            @Override
+            public void onTimeSelect(Date date, View v) {//选中事件回调
+                if (isCheckMonth) {
+                    yearStr = DateUtil.getCurYearStr(date);
+                    monthStr = DateUtil.getCurMonthStr(date);
+                    cbScreen.setText(yearStr + "年" + monthStr + "月");
+                    getData(yearStr+"-"+monthStr,"MONTH");
+                } else {
+                    yearStr = DateUtil.getCurYearStr(date);
+                    cbScreen.setText(yearStr + "年");
+                    monthStr = null;
+                    getData(yearStr,"YEAR");
+                }
+                cbScreen.setChecked(false);
+
+            }
+        })
+                .setDate(selectedDate)
+                .setRangDate(startDate, endDate)
+                .setLayoutRes(R.layout.pickerview_year_month, new CustomListener() {
+
+
+                    @Override
+                    public void customLayout(final View v) {
+                        final TextView tvSubmit = (TextView) v.findViewById(R.id.tv_finish);
+                        TextView tvCancel = (TextView) v.findViewById(R.id.tv_cancel);
+                        RadioGroup radiogroup = v.findViewById(R.id.radiogroup);
+                        RadioButton rbMonth = v.findViewById(R.id.rb_month);
+                        RadioButton rbYear = v.findViewById(R.id.rb_year);
+                        month = (WheelView) v.findViewById(R.id.month);
+
+                        tvSubmit.setOnClickListener(new View.OnClickListener() {
+                            @Override
+                            public void onClick(View v) {
+                                isCheckMonth = rbMonth.isChecked();
+                                pvCustomLunar.returnData();
+                                pvCustomLunar.dismiss();
+                            }
+                        });
+                        tvCancel.setOnClickListener(new View.OnClickListener() {
+                            @Override
+                            public void onClick(View v) {
+                                pvCustomLunar.dismiss();
+                            }
+                        });
+
+                        //公农历切换
+
+                        if (isCheckMonth) {
+                            rbMonth.setChecked(true);
+                        } else {
+                            rbYear.setChecked(true);
+                        }
+                        month.setVisibility(isCheckMonth ? View.VISIBLE :
+                                View.GONE);
+                        radiogroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+                            @Override
+                            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                                month.setVisibility(checkedId == R.id.rb_month ? View.VISIBLE :
+                                        View.GONE);
+                            }
+                        });
+
+                    }
+
+
+                })
+                .setContentTextSize(18)
+                .isCyclic(false)//是否循环滚动
+                .setOutSideCancelable(true)//点击屏幕,点在控件外部范围时,是否取消显示
+                .setBgColor(getResources().getColor(R.color.white))//滚轮背景颜色 Night mode
+                .setTextColorCenter(getResources().getColor(com.cooleshow.base.R.color.color_1a1a1a))//设置选中项的颜色
+                .setType(new boolean[]{true, false, false, false, false, false})
+                .isCenterLabel(false) //是否只显示中间选中项的label文字,false则每项item全部都带有label。
+                .setDividerColor(getResources().getColor(com.cooleshow.base.R.color.color_e2e2e2))
+                .build();
+        pvCustomLunar.show();
+        if (month != null) {
+            month.setVisibility(isCheckMonth ? View.VISIBLE :
+                    View.GONE);
+        }
+
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        if (null != webView) {
+            webView.destroy();
+        }
+        if (null != doughnutWebView) {
+            doughnutWebView.destroy();
+        }
+
+    }
+
+    @Override
+    public void accountTotalSuccess(AccountTotalBean data) {
+        DecimalFormat df = new DecimalFormat("#,##0.00");
+        tvAllEarnings.setText(df.format(data.totalInAmount));
+        if (data.infoList == null || data.infoList.size() == 0) {
+            rlNetErrorRoot.setVisibility(View.VISIBLE);
+            viewParent.setVisibility(View.INVISIBLE);
+            return;
+        } else {
+            rlNetErrorRoot.setVisibility(View.GONE);
+            viewParent.setVisibility(View.VISIBLE);
+        }
+        EarningStackedLineBean bean = new EarningStackedLineBean();
+        List<String> xAxisData = new ArrayList<>();
+
+        for (AccountTotalBean accountTotalBean : data.infoList) {
+            if (!isCheckMonth) {
+                xAxisData.add(DateUtil.getCurMonthStr(DateUtil.getDate(accountTotalBean.timeStr)) + "月");
+            } else {
+                xAxisData.add(DateUtil.getCurDayStr(DateUtil.getDate(accountTotalBean.timeStr)) + "日");
+            }
+        }
+        EarningStackedLineBean.XAxisBean axisBean = new EarningStackedLineBean.XAxisBean();
+        axisBean.setData(xAxisData);
+        bean.setxAxis(axisBean);
+        List<EarningStackedLineBean.SeriesBean> series = new ArrayList<>();
+        List<EarningDoughnutChartBean.SeriesBean.DataBean> doughuntDataList = new ArrayList<>();
+        EarningStackedLineBean.SeriesBean seriesPBean = new EarningStackedLineBean.SeriesBean();
+        seriesPBean.setName("陪练课");
+        seriesPBean.setData(new ArrayList<>());
+        EarningStackedLineBean.SeriesBean seriesLBean = new EarningStackedLineBean.SeriesBean();
+        seriesLBean.setName("直播课");
+        seriesLBean.setData(new ArrayList<>());
+        EarningStackedLineBean.SeriesBean seriesVBean = new EarningStackedLineBean.SeriesBean();
+        seriesVBean.setName("视频课");
+        seriesVBean.setData(new ArrayList<>());
+        EarningStackedLineBean.SeriesBean seriesMBean = new EarningStackedLineBean.SeriesBean();
+        seriesMBean.setName("乐谱");
+        seriesMBean.setData(new ArrayList<>());
+
+        for (AccountTotalBean beanX : data.infoList) {
+            seriesPBean.getData().add(beanX.practiceAmount);
+            seriesLBean.getData().add(beanX.liveAmount);
+            seriesVBean.getData().add(beanX.videoAmount);
+            seriesMBean.getData().add(beanX.musicAmount);
+        }
+        series.add(seriesPBean);
+        series.add(seriesLBean);
+        series.add(seriesVBean);
+        series.add(seriesMBean);
+        doughuntDataList.add(new EarningDoughnutChartBean.SeriesBean.DataBean(data.practiceAmount, "陪练课"));
+        doughuntDataList.add(new EarningDoughnutChartBean.SeriesBean.DataBean(data.liveAmount, "直播课"));
+        doughuntDataList.add(new EarningDoughnutChartBean.SeriesBean.DataBean(data.videoAmount, "视频课"));
+        doughuntDataList.add(new EarningDoughnutChartBean.SeriesBean.DataBean(data.musicAmount, "乐谱"));
+
+        bean.setColor(color);
+        bean.setSeries(series);
+        bean.getDataZoom().get(0).setThrottle(series.size() > 15 ? 50 : 100);
+        stackedData = new Gson().toJson(bean);
+        adapterStacked.setData(doughuntDataList, data.totalInAmount, color);
+        if (isLoadFished) {
+            webView.evaluateJavascript("loadEcharts('" + stackedData + "')", new ValueCallback<String>() {
+                @Override
+                public void onReceiveValue(String s) {
+                }
+            });
+        }
+
+        EarningDoughnutChartBean earningDoughnutChartBean = new EarningDoughnutChartBean();
+        earningDoughnutChartBean.setColor(color);
+        EarningDoughnutChartBean.SeriesBean doughnutSeriesBean = new EarningDoughnutChartBean.SeriesBean();
+        doughnutSeriesBean.setData(doughuntDataList);
+        List<EarningDoughnutChartBean.SeriesBean> earningDoughnutSeriesDataList = new ArrayList<EarningDoughnutChartBean.SeriesBean>();
+        earningDoughnutSeriesDataList.add(doughnutSeriesBean);
+        earningDoughnutChartBean.setSeries(earningDoughnutSeriesDataList);
+        doughnutData = new Gson().toJson(earningDoughnutChartBean);
+
+        if (isDoughnutLoadFished) {
+            doughnutWebView.evaluateJavascript("loadEcharts('" + doughnutData + "')", new ValueCallback<String>() {
+                @Override
+                public void onReceiveValue(String s) {
+                }
+            });
+        }
+        adapterDoughnut.setData(doughuntDataList, data.totalInAmount, color);
+
+    }
 }

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

@@ -74,6 +74,7 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
         getViewBinding().viewPager.setAdapter(homePageAdapter);
         getViewBinding().viewPager.setOffscreenPageLimit(mFragments.size());
         getViewBinding().viewPager.setUserInputEnabled(false);
+        getViewBinding().navigation.setItemIconTintList(null);
         getViewBinding().navigation.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
             @Override
             public boolean onNavigationItemSelected(@NonNull MenuItem item) {

+ 8 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/main/MineFragment.java

@@ -11,7 +11,6 @@ import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.PermissionUtils;
-import com.cooleshow.base.utils.ToastUtil;
 import com.cooleshow.base.utils.Utils;
 import com.cooleshow.base.utils.helper.WebStartHelper;
 import com.cooleshow.base.widgets.DialogUtil;
@@ -55,6 +54,8 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
         mViewBinding.tvMyAccount.setOnClickListener(this);
         mViewBinding.tvNetworkMonitoring.setOnClickListener(this);
         mViewBinding.tvEquipmentTesting.setOnClickListener(this);
+        mViewBinding.llCourseNumCompleted.setOnClickListener(this);
+        mViewBinding.llCourseNumNotStart.setOnClickListener(this);
     }
 
     @Override
@@ -248,6 +249,12 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
                 //设备检测
                 checkPermission();
                 break;
+            case R.id.ll_course_num_completed:
+            case R.id.ll_course_num_not_start:
+                ARouter.getInstance().build(RouterPath.CourseCenter.TEACHER_MINE_COURSE)
+                        .navigation();
+                break;
+
 
         }
     }

+ 47 - 115
teacher/src/main/java/com/cooleshow/teacher/ui/main/ShopMallFragment.java

@@ -1,24 +1,15 @@
 package com.cooleshow.teacher.ui.main;
 
-import android.os.Build;
-import android.util.Log;
-import android.view.KeyEvent;
 import android.view.View;
-import android.webkit.GeolocationPermissions;
-import android.webkit.WebChromeClient;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.widget.FrameLayout;
+import android.widget.LinearLayout;
 
-import com.cooleshow.base.BuildConfig;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
-import com.cooleshow.base.utils.LogUtils;
-import com.cooleshow.base.widgets.LollipopFixedWebView;
-import com.cooleshow.base.widgets.WebClient;
+import com.cooleshow.base.widgets.AgentWebClient;
 import com.cooleshow.teacher.databinding.FragmentShopmalBinding;
 import com.cooleshow.teacher.presenter.main.ShopMallPresenter;
 import com.cooleshow.usercenter.helper.UserHelper;
+import com.just.agentweb.AgentWeb;
 
 /**
  * 创建日期:2022/5/23 15:59
@@ -27,10 +18,10 @@ import com.cooleshow.usercenter.helper.UserHelper;
  * 类说明:
  */
 public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, ShopMallPresenter> {
-    private WebView webView;
-    private String url;
-    private WebClient mWebClient;
 
+    private AgentWeb mAgentWeb;
+    private LinearLayout container;
+    private AgentWebClient mWebClient;
     @Override
     protected FragmentShopmalBinding getLayoutView() {
         return FragmentShopmalBinding.inflate(getLayoutInflater());
@@ -46,32 +37,27 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
     @Override
     protected void initView(View rootView) {
         view_status_bar = mViewBinding.viewStatusBar;
-        try {
-            if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
-                webView = new LollipopFixedWebView(getContext());
-            } else {
-                webView = new WebView(getContext());
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        if (null == webView) {
 
-            return;
-        }
-        url = WebConstants.TEACHER_SHOPMALL;
-
-        mViewBinding.viewParent.addView(webView, new FrameLayout.LayoutParams(
-                FrameLayout.LayoutParams.MATCH_PARENT,
-                FrameLayout.LayoutParams.MATCH_PARENT));
-        initWebView();
-        mWebClient = new WebClient();
-        webView.setWebViewClient(mWebClient);
-        webView.setWebChromeClient(new MyWebChromeClient());
-        loadUrl();
+        container = mViewBinding.container;
+
+        String linkurl = WebConstants.TEACHER_SHOPMALL;
+        mWebClient = new AgentWebClient();
+        mWebClient = new AgentWebClient();
+        linkurl=loadUrl(linkurl);
+
+        mAgentWeb = AgentWeb.with(this)
+                .setAgentWebParent((LinearLayout) container, new LinearLayout.LayoutParams(-1, -1))
+                .useDefaultIndicator()
+//                .setWebChromeClient(mWebChromeClient)
+                .setWebViewClient(mWebClient)
+                .createAgentWeb()
+                .ready()
+                .go(linkurl);
+
+
     }
 
-    private void loadUrl() {
+    private String loadUrl(String url) {
         String userToken = UserHelper.getUserToken();
         mWebClient.setAuthorization(userToken);
         boolean status = url.contains("?");
@@ -80,96 +66,42 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
         } else {
             url = (url + "?Authorization=" + userToken);
         }
-        webView.loadUrl(url);
-    }
-
-    private void initWebView() {
-        //声明WebSettings子类
-        WebSettings webSettings = webView.getSettings();
-        webSettings.setUserAgentString(webSettings.getUserAgentString() + WebConstants.WEB_UA_PARAMS);
-        webSettings.setGeolocationDatabasePath(getActivity().getApplicationContext().getFilesDir().getPath());
-        webSettings.setGeolocationEnabled(true);
-        webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
-        //如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
-        webSettings.setJavaScriptEnabled(true);
-        webSettings.setMediaPlaybackRequiresUserGesture(false);//false允许自动播放音视频
-        //是否启用缓存
-        webSettings.setAppCacheEnabled(true);
-
-        // 开启DOM缓存,默认状态下是不支持LocalStorage的
-        webSettings.setDomStorageEnabled(true);
-        // 开启数据库缓存
-        webSettings.setDatabaseEnabled(true);
-        // 地址跨域导致视频预览图片加载不出来 无法播放:
-        webSettings.setAllowUniversalAccessFromFileURLs(false);
-        webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
-
-        //设置自适应屏幕,两者合用
-        webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小
-        webSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小
-        //缩放操作
-        webSettings.setSupportZoom(false); //支持缩放,默认为true。是下面那个的前提。
-        // 设置允许JS弹窗
-        webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
-        //其他细节操作
-        webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE); //关闭webview中缓存
-        webSettings.setAllowFileAccess(true); //设置可以访问文件
-        webSettings.setJavaScriptCanOpenWindowsAutomatically(true); //支持通过JS打开新窗口
-        webSettings.setLoadsImagesAutomatically(true); //支持自动加载图片
-        webSettings.setDefaultTextEncodingName("UTF-8");//设置编码格式
-
-        webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);  //富文本适配
-        webSettings.setAppCacheMaxSize(Long.MAX_VALUE);
-        webSettings.setAppCachePath(getContext().getDir("appcache", 0).getPath());
-        webSettings.setDatabasePath(getContext().getDir("databases", 0).getPath());
-        webSettings.setGeolocationDatabasePath(getContext().getDir("geolocation", 0)
-                .getPath());
-        webSettings.setPluginState(WebSettings.PluginState.ON_DEMAND);
-        if (BuildConfig.DEBUG) {
-            webView.setWebContentsDebuggingEnabled(true);
-        }
-        webSettings.setTextZoom(100);//设置字体默认的缩放比例,以避免手机系统的字体修改对页面字体及布局造成影响。
-        webView.setHorizontalScrollBarEnabled(false);
-        webView.setVerticalScrollBarEnabled(false);
+        return url;
     }
 
 
-    private class MyWebChromeClient extends WebChromeClient {
-        public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
-            callback.invoke(origin, true, false);
-        }
 
-        @Override
-        public void onProgressChanged(WebView view, int newProgress) {
-            LogUtils.e(newProgress + "");
-            if (newProgress == 100 && null != mViewBinding.progressBar) {
-                mViewBinding.progressBar.setVisibility(View.GONE);//加载完网页进度条消失
-            } else {
-                if (null != mViewBinding.progressBar) {
-                    mViewBinding.progressBar.setVisibility(View.VISIBLE);//开始加载网页时显示进度条
-                    mViewBinding.progressBar.setProgress(newProgress);//设置进度值
-                }
-
-            }
-        }
 
-        @Override
-        public void onReceivedTitle(WebView view, String title) {
-            super.onReceivedTitle(view, title);
-        }
-
-    }
 
     @Override
     protected void initData() {
 
     }
 
+
     public void clickBack() {
-        if (webView.canGoBack()) {
-            webView.goBack();
-        } else {
+        if (!mAgentWeb.back()) {
             ((MainActivity) getActivity()).clickBackPressed();
         }
+
+    }
+
+    @Override
+    public void onResume() {
+        mAgentWeb.getWebLifeCycle().onResume();
+        super.onResume();
+    }
+
+    @Override
+    public void onPause() {
+        mAgentWeb.getWebLifeCycle().onPause();
+        super.onPause();
+
+    }
+
+    @Override
+    public void onDestroy() {
+        mAgentWeb.getWebLifeCycle().onDestroy();
+        super.onDestroy();
     }
 }

+ 3 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/mine/MyBankCardActivity.java

@@ -60,7 +60,7 @@ public class MyBankCardActivity extends BaseMVPActivity<ActivityMyBankCardBindin
     protected void initView() {
         initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "我的银行卡");
         viewBinding.toolbarInclude.tvRightText.setTextColor(getResources().getColor(com.cooleshow.base.R.color.common_black));
-        viewBinding.toolbarInclude.tvRightText.setVisibility(View.VISIBLE);
+        viewBinding.toolbarInclude.tvRightText.setVisibility(View.GONE);
         viewBinding.toolbarInclude.tvRightText.setText("更换绑定卡");
         viewBinding.toolbarInclude.tvRightText.setOnClickListener(this);
         viewBinding.tvUnbind.setOnClickListener(this);
@@ -92,9 +92,11 @@ public class MyBankCardActivity extends BaseMVPActivity<ActivityMyBankCardBindin
             viewBinding.clContent.setVisibility(View.VISIBLE);
             viewBinding.tvBankName.setText(rowsBean.bankName);
             viewBinding.tvCardNum.setText(rowsBean.bankCard);
+            viewBinding.toolbarInclude.tvRightText.setVisibility(View.VISIBLE);
         }else{
             viewBinding.includeEmpty.getRoot().setVisibility(View.VISIBLE);
             viewBinding.clContent.setVisibility(View.GONE);
+            viewBinding.toolbarInclude.tvRightText.setVisibility(View.GONE);
         }
     }
 

+ 122 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/web/AgentWebActivity.java

@@ -0,0 +1,122 @@
+package com.cooleshow.teacher.ui.web;
+
+import static com.cooleshow.base.common.WebConstants.WEB_URL;
+
+import android.view.KeyEvent;
+import android.view.View;
+import android.webkit.WebView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+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.widgets.AgentWebClient;
+import com.cooleshow.teacher.databinding.ActivityAgentWebBinding;
+import com.cooleshow.teacher.presenter.web.AgentWebPresenter;
+import com.cooleshow.usercenter.helper.UserHelper;
+import com.just.agentweb.AgentWeb;
+import com.just.agentweb.WebChromeClient;
+
+/**
+ * 创建日期:2022/6/5 13:32
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
+public class AgentWebActivity extends BaseMVPActivity<ActivityAgentWebBinding, AgentWebPresenter> {
+    private AgentWeb mAgentWeb;
+    private LinearLayout container;
+    private TextView tv_title;
+    private AgentWebClient mWebClient;
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "酷乐秀");
+        container = viewBinding.container;
+        tv_title = viewBinding.toolbarInclude.title;
+        viewBinding.toolbarInclude.ivBack.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                goBack();
+            }
+        });
+        String linkurl = getIntent().getStringExtra(WEB_URL);
+        mWebClient = new AgentWebClient();
+        linkurl=loadUrl(linkurl);
+        mAgentWeb = AgentWeb.with(this)
+                .setAgentWebParent((LinearLayout) container, new LinearLayout.LayoutParams(-1, -1))
+                .useDefaultIndicator()
+                .setWebChromeClient(mWebChromeClient)
+                .setWebViewClient(mWebClient)
+                .createAgentWeb()
+                .ready()
+                .go(linkurl);
+
+    }
+
+    private String loadUrl(String url) {
+        String userToken = UserHelper.getUserToken();
+        mWebClient.setAuthorization(userToken);
+        boolean status = url.contains("?");
+        if (status) {
+            url = (url + "&Authorization=" + userToken);
+        } else {
+            url = (url + "?Authorization=" + userToken);
+        }
+        return url;
+    }
+
+
+    private void goBack() {
+        if (!mAgentWeb.back()) {
+            finish();
+        }
+    }
+
+    @Override
+    protected void onPause() {
+        mAgentWeb.getWebLifeCycle().onPause();
+        super.onPause();
+
+    }
+
+    @Override
+    protected void onResume() {
+        mAgentWeb.getWebLifeCycle().onResume();
+        super.onResume();
+    }
+
+    @Override
+    public void onDestroy() {
+        mAgentWeb.getWebLifeCycle().onDestroy();
+        super.onDestroy();
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (mAgentWeb.handleKeyEvent(keyCode, event)) {
+            return true;
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
+    private WebChromeClient mWebChromeClient = new WebChromeClient() {
+        @Override
+        public void onReceivedTitle(WebView view, String title) {
+            super.onReceivedTitle(view, title);
+            tv_title.setText(title);
+        }
+    };
+
+    @Override
+    protected ActivityAgentWebBinding getLayoutView() {
+        return ActivityAgentWebBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected AgentWebPresenter createPresenter() {
+        return new AgentWebPresenter();
+    }
+}

+ 0 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/web/WebActivity.java

@@ -59,7 +59,6 @@ import static com.cooleshow.base.common.WebConstants.WEB_URL;
 /**
  * Author by pq, Date on 2022/4/24.
  */
-@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
 public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements JsInterfaceHelper.OnJsMethodCallListener, View.OnClickListener {
     private static final int REQUEST_CODE_FILE_CHOOSER = 500;
     private WebView webView;

+ 33 - 0
teacher/src/main/java/com/cooleshow/teacher/widgets/LollipopFixedWebView.java

@@ -0,0 +1,33 @@
+package com.cooleshow.teacher.widgets;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.webkit.WebView;
+
+public class LollipopFixedWebView extends WebView {
+    public LollipopFixedWebView(Context context) {
+        super(getFixedContext(context));
+    }
+
+    public LollipopFixedWebView(Context context, AttributeSet attrs) {
+        super(getFixedContext(context), attrs);
+    }
+
+    public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(getFixedContext(context), attrs, defStyleAttr);
+    }
+
+    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+    public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+        super(getFixedContext(context), attrs, defStyleAttr, defStyleRes);
+    }
+
+    public static Context getFixedContext(Context context) {
+        if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) // Android Lollipop 5.0 & 5.1
+            return context.createConfigurationContext(new Configuration());
+        return context;
+    }
+}

BIN
teacher/src/main/res/drawable-xhdpi/bg_splash.png


BIN
teacher/src/main/res/drawable-xhdpi/icon_splash_logo.png


BIN
teacher/src/main/res/drawable-xxhdpi/bg_splash.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_splash_logo.png


+ 5 - 0
teacher/src/main/res/drawable/cb_text_white_green_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/white" android:state_checked="true"/>
+    <item android:color="@color/colorPrimary" android:state_checked="false"/>
+</selector>

+ 5 - 0
teacher/src/main/res/drawable/cb_white_green_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@color/white" android:state_checked="false"/>
+    <item android:drawable="@color/colorPrimary" android:state_checked="true"/>
+</selector>

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

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:id="@+id/container"
+    android:orientation="vertical"
+    tools:ignore="MissingDefaultResource">
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+
+</LinearLayout>

+ 19 - 16
teacher/src/main/res/layout/activity_earning_statistics.xml

@@ -21,22 +21,7 @@
             android:layout_height="match_parent"
             android:orientation="vertical">
 
-            <CheckBox
-                android:id="@+id/cb_screen"
-                android:layout_width="wrap_content"
-                android:layout_height="@dimen/dp_44"
-                android:layout_marginTop="4dp"
-                android:button="@null"
-                android:drawableEnd="@drawable/icon_arrow_down"
-                android:drawablePadding="@dimen/dp_5"
-                android:gravity="center"
-                android:paddingStart="@dimen/dp_12"
-                android:paddingEnd="@dimen/dp_12"
-                android:text=""
-                android:textColor="@color/color_1a1a1a"
-                android:textSize="@dimen/dp_14"
-                app:layout_constraintStart_toStartOf="@id/cl_earning_card"
-                app:layout_constraintTop_toBottomOf="@id/cl_earning_card" />
+
 
             <androidx.constraintlayout.widget.ConstraintLayout
                 android:id="@+id/cl_earning_card"
@@ -70,7 +55,25 @@
                     android:textSize="@dimen/dp_26"
                     app:layout_constraintStart_toStartOf="@id/tv_all_earnings_title"
                     app:layout_constraintTop_toBottomOf="@id/tv_all_earnings_title" />
+                <CheckBox
+                    android:id="@+id/cb_screen"
+                    android:layout_width="wrap_content"
+                    android:layout_height="@dimen/dp_44"
+                    android:layout_marginRight="@dimen/dp_12"
+                    android:button="@null"
+                    android:drawableEnd="@drawable/icon_arrow_down"
+                    android:drawablePadding="@dimen/dp_5"
+                    android:gravity="center"
+                    android:paddingStart="@dimen/dp_12"
+                    android:paddingEnd="@dimen/dp_12"
+                    android:layout_marginTop="@dimen/dp_17"
 
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    android:text=""
+                    android:textColor="@color/color_1a1a1a"
+                    android:textSize="@dimen/dp_14"
+                   />
                 <View
                     android:layout_width="0dp"
                     android:layout_height="@dimen/dp_1"

+ 17 - 4
teacher/src/main/res/layout/activity_splash_layout.xml

@@ -1,7 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="@color/white">
 
-</LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true"
+        android:orientation="vertical">
+
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/bg_splash" />
+    </LinearLayout>
+
+</RelativeLayout>

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

@@ -10,7 +10,6 @@
         android:layout_width="match_parent"
         android:layout_height="20dp"
         app:layout_constrainedHeight="true"
-        app:layout_constraintHeight_default="wrap"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 

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

@@ -95,6 +95,7 @@
             android:numStars="5"
             android:rating="3"
             android:stepSize="1"
+            android:isIndicator="true"
             app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
             app:layout_constraintLeft_toLeftOf="@+id/tv_nickname"
             app:layout_constraintTop_toBottomOf="@+id/tv_nickname" />

+ 1 - 28
teacher/src/main/res/layout/fragment_shopmal.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/rl_activity_html"
+    android:id="@+id/container"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
@@ -11,35 +11,8 @@
         android:layout_height="20dp"
         app:layout_constrainedHeight="true"
         android:background="@color/color_59e5d5"
-        app:layout_constraintHeight_default="wrap"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <LinearLayout
-        android:id="@+id/ll_activity_html"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical">
-
-        <View
-            android:id="@+id/view_statusbar"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:background="@color/white"
-            android:visibility="gone" />
 
-        <ProgressBar
-            android:id="@+id/progressBar"
-            style="?android:attr/progressBarStyleHorizontal"
-            android:layout_width="match_parent"
-            android:layout_height="2dip"
-            android:progressDrawable="@drawable/pg_stu" />
-    </LinearLayout>
-
-    <FrameLayout
-        android:id="@+id/view_parent"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_below="@+id/ll_activity_html"
-        android:scrollbars="none" />
 </LinearLayout>

+ 132 - 0
teacher/src/main/res/layout/pickerview_year_month.xml

@@ -0,0 +1,132 @@
+<?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="wrap_content"
+    android:background="@drawable/bg_white_top_10dp"
+    android:orientation="vertical">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="50dp">
+
+
+        <TextView
+            android:id="@+id/tv_cancel"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="17dp"
+            android:text="取消"
+            android:textColor="@color/color_999999"
+            android:textSize="@dimen/dp_16" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:text="时间选择"
+            android:textColor="@color/color_1a1a1a"
+            android:textSize="18dp" />
+
+        <TextView
+            android:id="@+id/tv_finish"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:layout_marginRight="17dp"
+            android:padding="8dp"
+            android:text="确定"
+            android:textColor="@color/colorPrimary"
+            android:textSize="@dimen/dp_16" />
+
+    </RelativeLayout>
+
+    <View style="@style/line_style" />
+
+    <RadioGroup
+        android:id="@+id/radiogroup"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:layout_marginTop="@dimen/dp_36"
+        android:layout_marginBottom="@dimen/dp_8"
+        android:background="@color/colorPrimary"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        android:padding="@dimen/dp_1">
+
+        <RadioButton
+            android:id="@+id/rb_month"
+            android:layout_width="@dimen/dp_60"
+            android:layout_height="@dimen/dp_28"
+            android:background="@drawable/cb_white_green_selector"
+            android:button="@null"
+            android:gravity="center"
+            android:text="按月"
+            android:textColor="@drawable/cb_text_white_green_selector"
+            android:textSize="@dimen/dp_16" />
+
+        <RadioButton
+            android:id="@+id/rb_year"
+            android:layout_width="@dimen/dp_60"
+            android:layout_height="@dimen/dp_28"
+            android:background="@drawable/cb_white_green_selector"
+            android:button="@null"
+            android:checked="true"
+            android:gravity="center"
+            android:text="按年"
+            android:textColor="@drawable/cb_text_white_green_selector"
+            android:textSize="@dimen/dp_16" />
+    </RadioGroup>
+    <!--此部分需要完整复制过去,删减或者更改ID会导致初始化找不到内容而报空-->
+    <LinearLayout
+        android:id="@+id/timepicker"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginTop="@dimen/dp_36"
+        android:background="@android:color/white"
+        android:gravity="center"
+        android:minHeight="150dp"
+        android:orientation="horizontal">
+
+        <com.contrarywind.view.WheelView
+            android:id="@+id/year"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1" />
+
+        <com.contrarywind.view.WheelView
+
+            android:id="@+id/month"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1.1" />
+
+        <com.contrarywind.view.WheelView
+            android:id="@+id/day"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1.1" />
+
+        <com.contrarywind.view.WheelView
+            android:id="@+id/hour"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1.1" />
+
+        <com.contrarywind.view.WheelView
+            android:id="@+id/min"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1.1" />
+
+        <com.contrarywind.view.WheelView
+            android:id="@+id/second"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1.1" />
+    </LinearLayout>
+
+
+</LinearLayout>

+ 0 - 5
teacher/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

+ 0 - 5
teacher/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>

BIN
teacher/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
teacher/src/main/res/mipmap-hdpi/ic_launcher.webp


BIN
teacher/src/main/res/mipmap-hdpi/ic_launcher_round.webp


BIN
teacher/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
teacher/src/main/res/mipmap-mdpi/ic_launcher.webp


BIN
teacher/src/main/res/mipmap-mdpi/ic_launcher_round.webp


BIN
teacher/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
teacher/src/main/res/mipmap-xhdpi/ic_launcher.webp


BIN
teacher/src/main/res/mipmap-xhdpi/ic_launcher_round.webp


BIN
teacher/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
teacher/src/main/res/mipmap-xxhdpi/ic_launcher.webp


BIN
teacher/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp


Some files were not shown because too many files changed in this diff