Browse Source

解决bug

邓琴文 3 năm trước cách đây
mục cha
commit
c61b513ec3

+ 38 - 114
BaseLibrary/src/main/java/com/cooleshow/base/utils/ToastUtil.java

@@ -8,6 +8,7 @@ import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ImageView;
+import android.widget.TableLayout;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -15,132 +16,55 @@ import com.cooleshow.base.R;
 
 public class ToastUtil {
 
-    public static ToastUtil toast;
-    private String toastStr;
-    Toast toast1 = null;
-    private TextView tv;
-    private Handler handler;
+    public static ToastUtil instance;
+    private Toast toast;
 
     public static ToastUtil getInstance() {
-        if (null == toast) {
-            toast = new ToastUtil();
+        if (null == instance) {
+            instance = new ToastUtil();
         }
-        return toast;
+        return instance;
     }
 
-
     /**
      * 创建自定义Toasts :
      */
     public void show(Context context, String toastStr) {
-
-        if (null == context || TextUtils.isEmpty(toastStr)) {
-            return;
+        if (init(toastStr, Toast.LENGTH_SHORT) == null) {
+            toast = new Toast(Utils.getApp());
+            toast.setText(toastStr);
+            toast.setDuration(Toast.LENGTH_SHORT);
+            toast.show();
         }
-        if (!TextUtils.isEmpty(this.toastStr) && toastStr.equals(this.toastStr)) {
-            if (handler == null) {
-                handler = new Handler();
-                handler.postDelayed(() -> {
-                    ToastUtil.this.toastStr = null;
-                    handler = null;
-                }, 2000);
-            }
-            return;
-        }
-        this.toastStr = toastStr;
-        toast1 = null;
-        toast1 = new Toast(context);
-        View toastRoot = LayoutInflater.from(context).inflate(R.layout.my_toast, null);
-        toast1.setView(toastRoot);
-        toast1.setGravity(Gravity.CENTER, 0, 0);
-        tv = toastRoot.findViewById(R.id.TextViewInfo);
-
-        if (toastStr.length() > 15) {
-            toast1.setDuration(Toast.LENGTH_LONG);
-        } else {
-            toast1.setDuration(Toast.LENGTH_SHORT);
-        }
-        if (tv != null) {
-            tv.setText(toastStr);
-        }
-        toast1.show();
     }
 
-    public void cancel(){
-        if(toast1 != null){
-            toast1.cancel();
+    private Toast init(String message, int duration) {
+        try {
+            if (toast != null) {
+                TextView text = (TextView) toast.getView();
+                if (text != null) {
+                    text.setText(message);
+                }
+            } else {
+                int dp26 = SizeUtils.dp2px(26);
+                int dp10 = SizeUtils.dp2px(10);
+                TextView contentView = new TextView(Utils.getApp());
+                contentView.setGravity(Gravity.CENTER);
+                contentView.setBackgroundResource(R.drawable.shape_toast);
+                contentView.setTextSize(15);
+                contentView.setTextColor(Utils.getApp().getResources().getColor(R.color.white));
+                contentView.setPadding(dp26, dp10, dp26, dp10);
+                contentView.setText(message);
+                toast = new Toast(Utils.getApp());
+                toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
+                toast.setView(contentView);
+            }
+            toast.setDuration(duration);
+            toast.show();
+        } catch (Exception e) {
+            Toast.makeText(Utils.getApp(), message, duration).show();
+            e.printStackTrace();
         }
-    }
-
-    /**
-     * 创建自定义Toasts :
-     */
-    public void showSpecialScore(Context context, int score) {
-
-//        if(toast1 != null){
-//            toast1.cancel();
-//        }
-//        toast1 = null;
-//        toast1 = new Toast(context);
-//        View toastRoot = LayoutInflater.from(context).inflate(R.layout.layout_toast_score, null);
-//        toast1.setView(toastRoot);
-//        toast1.setGravity(Gravity.CENTER, 0, 0);
-//        TextView tv_layout_toast_score = toastRoot.findViewById(R.id.tv_layout_toast_score);
-//        toast1.setDuration(Toast.LENGTH_SHORT);
-//        ImageView iv_layout_toast_score = toastRoot.findViewById(R.id.iv_layout_toast_score);
-//
-//        if (score >= 80) {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_perfect);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#516AFF"));
-//        } else if (score >= 60) {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_great);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#FF8E5A"));
-//        } else if (score >= 40) {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_good);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#FF958B"));
-//        } else {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_bad);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#EE4C6A"));
-//        }
-//        if (tv_layout_toast_score != null) {
-//            tv_layout_toast_score.setText(score + "");
-//        }
-//        toast1.show();
-    }
-
-    /**
-     * 创建自定义Toasts :
-     */
-    public void showSpecialScore(Context context, int score, int x, int y) {
-//
-//        if(toast1 != null){
-//            toast1.cancel();
-//        }
-//        toast1 = null;
-//        toast1 = new Toast(context);
-//        View toastRoot = LayoutInflater.from(context).inflate(R.layout.layout_toast_score, null);
-//        toast1.setView(toastRoot);
-//        toast1.setGravity(Gravity.TOP | Gravity.LEFT, x, y);
-//        TextView tv_layout_toast_score = toastRoot.findViewById(R.id.tv_layout_toast_score);
-//        toast1.setDuration(Toast.LENGTH_SHORT);
-//        ImageView iv_layout_toast_score = toastRoot.findViewById(R.id.iv_layout_toast_score);
-//
-//        if (score >= 80) {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_perfect);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#516AFF"));
-//        } else if (score >= 60) {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_great);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#FF8E5A"));
-//        } else if (score >= 40) {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_good);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#FF958B"));
-//        } else {
-//            iv_layout_toast_score.setImageResource(R.mipmap.img_score_bad);
-//            tv_layout_toast_score.setTextColor(Color.parseColor("#EE4C6A"));
-//        }
-//        if (tv_layout_toast_score != null) {
-//            tv_layout_toast_score.setText(score + "");
-//        }
-//        toast1.show();
+        return toast;
     }
 }

+ 2 - 1
teacher/src/main/java/com/cooleshow/teacher/api/APIService.java

@@ -1,6 +1,7 @@
 package com.cooleshow.teacher.api;
 
 import com.cooleshow.base.data.net.BaseResponse;
+import com.cooleshow.teacher.bean.request.LiveCourseEntry;
 import com.cooleshow.teacher.bean.AccountDetailBean;
 import com.cooleshow.teacher.bean.AccountTotalBean;
 import com.cooleshow.teacher.bean.AddressBean;
@@ -460,7 +461,7 @@ public interface APIService {
      * @return
      */
     @POST(TEACHER_GROUP + "courseGroup/queryPageCourseGroup")
-    Observable<BaseResponse<MineLiveCourseListBean>> queryPageCourseGroup(@Body RequestBody body);
+    Observable<BaseResponse<MineLiveCourseListBean>> queryPageCourseGroup(@Body LiveCourseEntry body);
 
     /**
      * 查询视频课

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

@@ -0,0 +1,13 @@
+package com.cooleshow.teacher.bean.request;
+
+/**
+ * @author dengqw
+ * @time 2022/6/28 22:44
+ * @describe:
+ **/
+public class LiveCourseEntry {
+    public String classDate;
+    public int page;
+    public int rows;
+    public String groupStatus;
+}

+ 7 - 15
teacher/src/main/java/com/cooleshow/teacher/presenter/course/MineLiveCoursePresenter.java

@@ -3,16 +3,12 @@ package com.cooleshow.teacher.presenter.course;
 import com.cooleshow.base.constanst.Constants;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
-import com.cooleshow.base.utils.RequestBodyUtil;
 import com.cooleshow.teacher.api.APIService;
-import com.cooleshow.teacher.bean.LiveCourseListBean;
 import com.cooleshow.teacher.bean.MineLiveCourseListBean;
 import com.cooleshow.teacher.bean.TeacherUserInfo;
+import com.cooleshow.teacher.bean.request.LiveCourseEntry;
 import com.cooleshow.teacher.contract.MineLiveCourseContract;
 
-import org.json.JSONException;
-import org.json.JSONObject;
-
 /**
  * 创建日期:2022/5/19 15:15
  *
@@ -20,19 +16,15 @@ import org.json.JSONObject;
  * 类说明:
  */
 public class MineLiveCoursePresenter extends BasePresenter<MineLiveCourseContract.MineLiveCourseView> implements MineLiveCourseContract.Presenter {
-    public void queryPageCourseGroup(boolean isLoading,int page,String groupStatus){
+    public void queryPageCourseGroup(boolean isLoading, int page, String groupStatus) {
         if (isLoading && getView() != null) {
             getView().showLoading();
         }
-        JSONObject jsonObject = new JSONObject();
-        try {
-            jsonObject.put("groupStatus",groupStatus);
-            jsonObject.putOpt("page", page);
-            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-        addSubscribe(create(APIService.class).queryPageCourseGroup(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<MineLiveCourseListBean>(getView()) {
+        LiveCourseEntry entry = new LiveCourseEntry();
+        entry.rows = Constants.DEFAULT_DATA_SIZE;
+        entry.page = page;
+        entry.groupStatus = groupStatus;
+        addSubscribe(create(APIService.class).queryPageCourseGroup(entry), new BaseObserver<MineLiveCourseListBean>(getView()) {
             @Override
             protected void onSuccess(MineLiveCourseListBean data) {
                 if (getView() != null) {

+ 7 - 17
teacher/src/main/java/com/cooleshow/teacher/presenter/homePage/LiveCoursePagePresenter.java

@@ -3,18 +3,11 @@ package com.cooleshow.teacher.presenter.homePage;
 import com.cooleshow.base.constanst.Constants;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
-import com.cooleshow.base.utils.RequestBodyUtil;
 import com.cooleshow.teacher.api.APIService;
-import com.cooleshow.teacher.bean.LiveCourseListBean;
+import com.cooleshow.teacher.bean.request.LiveCourseEntry;
 import com.cooleshow.teacher.bean.MineLiveCourseListBean;
-import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 import com.cooleshow.teacher.bean.TeacherUserInfo;
 import com.cooleshow.teacher.contract.LiveCoursePageContract;
-import com.cooleshow.teacher.contract.MineStyleContract;
-import com.cooleshow.usercenter.bean.UserInfo;
-
-import org.json.JSONException;
-import org.json.JSONObject;
 
 /**
  * Author by pq, Date on 2022/4/20.
@@ -25,15 +18,12 @@ public class LiveCoursePagePresenter extends BasePresenter<LiveCoursePageContrac
         if (getView() != null) {
             getView().showLoading();
         }
-        JSONObject jsonObject = new JSONObject();
-        try {
-            jsonObject.putOpt("classDate", month);
-            jsonObject.putOpt("page", page);
-            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-        addSubscribe(create(APIService.class).queryPageCourseGroup(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<MineLiveCourseListBean>(getView()) {
+        LiveCourseEntry entry = new LiveCourseEntry();
+        entry.classDate =month;
+        entry.rows =Constants.DEFAULT_DATA_SIZE;
+        entry.page =page;
+        entry.groupStatus ="apply";
+        addSubscribe(create(APIService.class).queryPageCourseGroup(entry), new BaseObserver<MineLiveCourseListBean>(getView()) {
             @Override
             protected void onSuccess(MineLiveCourseListBean data) {
                 if (getView() != null) {

+ 10 - 17
teacher/src/main/java/com/cooleshow/teacher/ui/homepage/LiveCoursePageFragment.java

@@ -50,26 +50,19 @@ public class LiveCoursePageFragment extends BaseMVPFragment<FragmentLiveCoursePa
         Date currentSelectDate = TimeUtils.getNowDate();
         String targetDateTimeStr = TimeUtils.date2String(currentSelectDate, TimeUtils.getSafeDateFormat("yyyy-MM"));
         currentFilterDate = targetDateTimeStr;
-        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                currentPage = 1;
-                queryCourse();
-            }
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            currentPage = 1;
+            queryCourse();
         });
 
         mAdapter = new MineLiveCourseListAdapter(R.layout.item_live_course_list_layout);
-//        mAdapter.getLoadMoreModule().setEnableLoadMoreIfNotFullPage(false);
-        mAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
-            @Override
-            public void onLoadMore() {
-                //上拉加载
-                if (hasNext) {
-                    currentPage++;
-                    queryCourse();
-                } else {
-                    mAdapter.getLoadMoreModule().loadMoreEnd();
-                }
+        mAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
+            //上拉加载
+            if (hasNext) {
+                currentPage++;
+                queryCourse();
+            } else {
+                mAdapter.getLoadMoreModule().loadMoreEnd();
             }
         });
         mViewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));

+ 13 - 7
teacher/src/main/java/com/cooleshow/teacher/ui/score/MineScoreActivity.java

@@ -13,10 +13,12 @@ import androidx.viewpager.widget.ViewPager;
 import com.alibaba.android.arouter.facade.annotation.Route;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtil;
 import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.MineLiveCoursePagerAdapter;
 import com.cooleshow.teacher.bean.MusicSheetShareBean;
+import com.cooleshow.teacher.constants.TeacherInfoConstants;
 import com.cooleshow.teacher.contract.MineScoreActContract;
 import com.cooleshow.teacher.databinding.ActivityMineScoreBinding;
 import com.cooleshow.teacher.presenter.score.MineScoreActPresenter;
@@ -49,17 +51,26 @@ import io.rong.imkit.utils.StatusBarUtil;
  */
 @Route(path = RouterPath.ScoreCenter.TEACHER_MINE_SCORE)
 public class MineScoreActivity extends BaseMVPActivity<ActivityMineScoreBinding, MineScoreActPresenter> implements MineScoreActContract.MineScoreActView, View.OnClickListener {
+    private String musicianAuthStatus;
+    private TabLayout tabLayout;
+    private ViewPager viewPager;
+    private List<String> titles = new ArrayList<String>(Arrays.asList("已上架", "审核中", "审核失败"));
+    private List<String> auditStatusList = new ArrayList<String>(Arrays.asList("PASS", "DOING", "UNPASS"));
+    private List<Fragment> fragments = new ArrayList<>();
+
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.tv_right:
+                if(musicianAuthStatus != TeacherInfoConstants.MUSICIAN_STATUS_PASS){
+                    ToastUtil.getInstance().show(this,"您还没有上传曲谱");
+                    return;
+                }
                 presenter.musicSheetShare();
                 break;
         }
 
     }
-    private TabLayout tabLayout;
-    private ViewPager viewPager;
 
     @Override
     protected void initView() {
@@ -78,7 +89,6 @@ public class MineScoreActivity extends BaseMVPActivity<ActivityMineScoreBinding,
         super.onCreate(savedInstanceState);
         StatusBarUtil.setStatusBarDarkTheme(this, true);
     }
-    private String musicianAuthStatus;
     @Override
     public void initData() {
         super.initData();
@@ -96,10 +106,6 @@ public class MineScoreActivity extends BaseMVPActivity<ActivityMineScoreBinding,
         return new MineScoreActPresenter();
     }
 
-    private List<String> titles = new ArrayList<String>(Arrays.asList("已上架", "审核中", "审核失败"));
-    private List<String> auditStatusList = new ArrayList<String>(Arrays.asList("PASS", "DOING", "UNPASS"));
-    private List<Fragment> fragments = new ArrayList<>();
-
     private void initTabLayoutAndViewPager() {
         tabLayout.removeAllTabs();
         fragments.clear();

+ 31 - 35
teacher/src/main/java/com/cooleshow/teacher/ui/score/MineScoreFragment.java

@@ -1,6 +1,7 @@
 package com.cooleshow.teacher.ui.score;
 
 import android.os.Bundle;
+import android.os.StrictMode;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -37,6 +38,10 @@ import java.util.List;
  * 类说明:
  */
 public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding, MineScorePresenter> implements MineScoreContract.MineScoreView, View.OnClickListener {
+    private String auditStatus = "";
+    private String musicianAuthStatus = "";
+    private MineScoreAdapter mineScoreAdapter;
+    List<MusicSheetListBean.RowsBean> dataList = new ArrayList<>();
 
     @Override
     public void onClick(View view) {
@@ -47,11 +52,11 @@ public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding,
         }
     }
 
-    public static MineScoreFragment newInstance(String auditStatus,String musicianAuthStatus) {
+    public static MineScoreFragment newInstance(String auditStatus, String musicianAuthStatus) {
         Bundle args = new Bundle();
         MineScoreFragment fragment = new MineScoreFragment();
         args.putString("auditStatus", auditStatus);
-        args.putString("musicianAuthStatus",musicianAuthStatus);
+        args.putString("musicianAuthStatus", musicianAuthStatus);
         fragment.setArguments(args);
         return fragment;
     }
@@ -66,15 +71,10 @@ public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding,
         return new MineScorePresenter();
     }
 
-    private String auditStatus = "";
-    private String musicianAuthStatus="";
-    private MineScoreAdapter mineScoreAdapter;
-    List<MusicSheetListBean.RowsBean> dataList = new ArrayList<>();
-
     @Override
     protected void initView(View rootView) {
         auditStatus = getArguments().getString("auditStatus");
-        musicianAuthStatus=getArguments().getString("musicianAuthStatus");
+        musicianAuthStatus = getArguments().getString("musicianAuthStatus");
         RecyclerView rvAddress = mViewBinding.recyclerView;
         mViewBinding.llUploadScore.setOnClickListener(this);
         LinearLayoutManager manager = new LinearLayoutManager(getContext());
@@ -82,13 +82,13 @@ public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding,
         mineScoreAdapter = new MineScoreAdapter(dataList);
         LayoutInflater inflater = LayoutInflater.from(getContext());
         View emptyLayout = inflater.inflate(R.layout.layout_empty_conent, null);
-        ImageView im_empty_logo=emptyLayout.findViewById(R.id.im_empty_logo);
-        im_empty_logo.setBackgroundResource(R.drawable.icon_empty_score);
-        TextView tv_empty_hint=emptyLayout.findViewById(R.id.tv_empty_hint);
-        tv_empty_hint.setText("暂无收藏~");
+        ImageView im_empty_logo = emptyLayout.findViewById(R.id.im_empty_logo);
+        im_empty_logo.setBackgroundResource(R.drawable.icon_empty_content);
+        TextView tv_empty_hint = emptyLayout.findViewById(R.id.tv_empty_hint);
+        tv_empty_hint.setText("暂无曲谱~");
         mineScoreAdapter.setEmptyView(emptyLayout);
         rvAddress.setAdapter(mineScoreAdapter);
-        switch (musicianAuthStatus){
+        switch (musicianAuthStatus) {
             case TeacherInfoConstants.MUSICIAN_STATUS_PASS:
                 mViewBinding.llContent.setVisibility(View.VISIBLE);
                 mViewBinding.clEmpty.setVisibility(View.GONE);
@@ -97,24 +97,26 @@ public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding,
                 mViewBinding.llContent.setVisibility(View.GONE);
                 mViewBinding.clEmpty.setVisibility(View.VISIBLE);
                 mViewBinding.tvEmptyHint.setText("您已提交认证申请\n清耐心等待审核结果~");
+                mViewBinding.gotoVerifyBtn.setVisibility(View.GONE);
                 break;
             case TeacherInfoConstants.MUSICIAN_STATUS_UNPAALY:
                 mViewBinding.llContent.setVisibility(View.GONE);
                 mViewBinding.clEmpty.setVisibility(View.VISIBLE);
                 mViewBinding.tvEmptyHint.setText("您还未提交认证申请");
+                mViewBinding.gotoVerifyBtn.setVisibility(View.VISIBLE);
                 break;
             case TeacherInfoConstants.MUSICIAN_STATUS_UNPASS:
                 mViewBinding.llContent.setVisibility(View.GONE);
                 mViewBinding.clEmpty.setVisibility(View.VISIBLE);
-                mViewBinding.tvEmptyHint.setText("您已提交认证申请未通过\n清重新提交~");
+                mViewBinding.tvEmptyHint.setText("您已提交认证申请未通过\n请重新提交~");
+                mViewBinding.gotoVerifyBtn.setVisibility(View.VISIBLE);
                 break;
         }
+        mViewBinding.gotoVerifyBtn.setOnClickListener(v -> {
+            WebStartHelper.startMusicPersonCertPage();
+        });
+        mineScoreAdapter.setOnItemClickListener((adapter, view, position) -> {
 
-        mineScoreAdapter.setOnItemClickListener(new OnItemClickListener() {
-            @Override
-            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
-
-            }
         });
 
     }
@@ -123,23 +125,17 @@ public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding,
 
     @Override
     protected void initData() {
-        mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                currentPage = 1;
-                queryScore(true);
-            }
+        mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
+            currentPage = 1;
+            queryScore(true);
         });
-        mineScoreAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
-            @Override
-            public void onLoadMore() {
-                //上拉加载
-                if (hasNext) {
-                    currentPage++;
-                    queryScore(false);
-                } else {
-                    mineScoreAdapter.getLoadMoreModule().loadMoreEnd();
-                }
+        mineScoreAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
+            //上拉加载
+            if (hasNext) {
+                currentPage++;
+                queryScore(false);
+            } else {
+                mineScoreAdapter.getLoadMoreModule().loadMoreEnd();
             }
         });
         currentPage = 1;

+ 29 - 12
teacher/src/main/res/layout/fragment_mine_score.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
+    android:layout_height="match_parent">
 
     <LinearLayout
         android:id="@+id/ll_content"
@@ -62,26 +63,24 @@
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/cl_empty"
-        android:visibility="gone"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:visibility="gone"
+        tools:visibility="visible">
 
 
         <ImageView
             android:id="@+id/im_empty_logo"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
             android:layout_width="@dimen/dp_260"
             android:layout_height="@dimen/dp_230"
             android:layout_marginTop="8dp"
-            android:background="@drawable/icon_empty_content" />
+            android:background="@drawable/icon_empty_content"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
 
         <TextView
             android:id="@+id/tv_empty_hint"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/im_empty_logo"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="14dp"
@@ -89,7 +88,25 @@
             android:lineSpacingExtra="4dp"
             android:text="暂无内容~"
             android:textColor="@color/color_999999"
-            android:textSize="@dimen/sp_16" />
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/im_empty_logo" />
 
+
+        <TextView
+            android:id="@+id/goto_verify_btn"
+            android:layout_width="@dimen/dp_130"
+            android:layout_height="@dimen/dp_42"
+            android:layout_marginTop="@dimen/dp_20"
+            android:background="@drawable/sure_btn_bg"
+            android:gravity="center"
+            android:text="去认证"
+            android:textColor="@color/white"
+            android:textSize="@dimen/sp_15"
+            android:visibility="gone"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_empty_hint" />
     </androidx.constraintlayout.widget.ConstraintLayout>
 </RelativeLayout>