Browse Source

bug 修改

邓琴文 3 years ago
parent
commit
6d948102b8
23 changed files with 45 additions and 37 deletions
  1. 1 0
      BaseLibrary/src/main/java/com/cooleshow/base/common/BaseConstant.java
  2. 1 1
      BaseLibrary/src/main/res/drawable/shape_couse_type_text_bg.xml
  3. 2 0
      student/src/main/java/com/cooleshow/student/presenter/course/LiveCoursePresenter.java
  4. 1 3
      student/src/main/java/com/cooleshow/student/ui/main/MineFragment.java
  5. 1 1
      student/src/main/java/com/cooleshow/student/ui/mine/ModifyPasswordActivity.java
  6. 1 1
      student/src/main/java/com/cooleshow/student/ui/mine/SettingActivity.java
  7. 5 1
      student/src/main/java/com/cooleshow/student/ui/splash/SplashActivity.kt
  8. 1 1
      student/src/main/java/com/cooleshow/student/widgets/helper/JsInterfaceAccomPanyUtils.java
  9. 1 1
      student/src/main/java/com/cooleshow/student/widgets/helper/JsInterfaceUtils.java
  10. 2 1
      student/src/main/res/layout/fragment_mine_layout.xml
  11. 2 3
      student/src/main/res/layout/layout_mark_item.xml
  12. 1 1
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPasswordActivity.java
  13. 1 1
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/SettingActivity.java
  14. 5 1
      teacher/src/main/java/com/cooleshow/teacher/ui/splash/SplashActivity.kt
  15. 1 1
      teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceAccomPanyUtils.java
  16. 1 1
      teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceHelper.java
  17. 1 1
      teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceUtils.java
  18. 0 12
      usercenter/src/main/java/com/cooleshow/usercenter/UserConstants.java
  19. 5 1
      usercenter/src/main/java/com/cooleshow/usercenter/constants/UserConstants.java
  20. 1 1
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/BindPasswordActivity.java
  21. 1 1
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/LoginActivity.kt
  22. 1 1
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeInputActivity.java
  23. 9 2
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeLoginActivity.java

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

@@ -17,4 +17,5 @@ public class BaseConstant {
 
     public final static String TABLE_PREFS = "Kotlin_mall";
     public final static String KEY_SP_TOKEN = "token";
+    public final static String STUDENT_ID = "student_id";
 }

+ 1 - 1
BaseLibrary/src/main/res/drawable/shape_couse_type_text_bg.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
     <solid android:color="@color/color_fff1de"/>
-    <corners android:radius="4dp"/>
+    <corners android:radius="2dp"/>
 </shape>

+ 2 - 0
student/src/main/java/com/cooleshow/student/presenter/course/LiveCoursePresenter.java

@@ -8,6 +8,7 @@ import com.cooleshow.student.api.APIService;
 import com.cooleshow.student.bean.LiveCourseListBean;
 import com.cooleshow.student.bean.QuerySubjectBean;
 import com.cooleshow.student.contract.LiveCourseContract;
+import com.cooleshow.usercenter.helper.UserHelper;
 
 
 import org.json.JSONException;
@@ -35,6 +36,7 @@ public class LiveCoursePresenter extends BasePresenter<LiveCourseContract.LiveCo
             }
             jsonObject.putOpt("page", page);
             jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
+            jsonObject.putOpt("studentId", UserHelper.getUserId());
         } catch (JSONException e) {
             e.printStackTrace();
         }

+ 1 - 3
student/src/main/java/com/cooleshow/student/ui/main/MineFragment.java

@@ -54,6 +54,7 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
                         .navigation();
                 break;
             case R.id.ll_residue_class:
+            case R.id.ll_finished_class:
             case R.id.ll_mine_course:
                 //我的课程
                 ARouter.getInstance().build(RouterPath.CourseCenter.TEACHER_MINE_COURSE)
@@ -118,9 +119,6 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
                         .withString(WebConstants.WEB_URL, WebConstants.STUDENT_TEACHER_FOLLOW)
                         .navigation();
                 break;
-            case R.id.ll_finished_class:
-                //已完成课时
-                break;
         }
     }
 

+ 1 - 1
student/src/main/java/com/cooleshow/student/ui/mine/ModifyPasswordActivity.java

@@ -20,7 +20,7 @@ import com.cooleshow.student.R;
 import com.cooleshow.student.contract.ModifyPasswordContract;
 import com.cooleshow.student.databinding.ActivityModifyPasswordBinding;
 import com.cooleshow.student.presenter.mine.ModifyPasswordPresenter;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 
 

+ 1 - 1
student/src/main/java/com/cooleshow/student/ui/mine/SettingActivity.java

@@ -16,7 +16,7 @@ import com.cooleshow.student.R;
 import com.cooleshow.student.contract.SettingContract;
 import com.cooleshow.student.databinding.ActivitySettingBinding;
 import com.cooleshow.student.presenter.mine.SettingPresenter;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 
 import io.rong.imkit.utils.StatusBarUtil;

+ 5 - 1
student/src/main/java/com/cooleshow/student/ui/splash/SplashActivity.kt

@@ -10,7 +10,9 @@ import com.cooleshow.base.router.RouterPath
 import com.cooleshow.base.ui.activity.BaseActivity
 import com.cooleshow.base.utils.SPUtils
 import com.cooleshow.student.databinding.ActivitySplashLayoutBinding
+import com.cooleshow.usercenter.constants.UserConstants
 import com.cooleshow.usercenter.helper.UserHelper
+import com.cooleshow.usercenter.ui.activity.VerifyCodeLoginActivity
 import io.rong.imkit.utils.StatusBarUtil
 
 
@@ -68,7 +70,9 @@ class SplashActivity : BaseActivity<ActivitySplashLayoutBinding>() {
     }
 
     private fun jumpLogin() {
-        ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN).navigation()
+        ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
+            .withInt(UserConstants.LOGIN_ITEM, VerifyCodeLoginActivity.STUDENT_ITEM)
+            .navigation()
     }
 
 }

+ 1 - 1
student/src/main/java/com/cooleshow/student/widgets/helper/JsInterfaceAccomPanyUtils.java

@@ -10,7 +10,7 @@ import android.webkit.JavascriptInterface;
 
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.router.RouterPath;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.gyf.immersionbar.ImmersionBar;
 

+ 1 - 1
student/src/main/java/com/cooleshow/student/widgets/helper/JsInterfaceUtils.java

@@ -12,7 +12,7 @@ import android.webkit.JavascriptInterface;
 
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.router.RouterPath;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.gyf.immersionbar.ImmersionBar;
 

+ 2 - 1
student/src/main/res/layout/fragment_mine_layout.xml

@@ -62,9 +62,10 @@
         <androidx.recyclerview.widget.RecyclerView
             android:id="@+id/rv_mark"
             android:layout_width="wrap_content"
-            android:layout_height="@dimen/dp_16"
+            android:layout_height="wrap_content"
             android:layout_marginLeft="9dp"
             app:layout_constraintLeft_toRightOf="@+id/tv_nickname"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_nickname"
             app:layout_constraintTop_toTopOf="@+id/tv_nickname" />
 
 

+ 2 - 3
student/src/main/res/layout/layout_mark_item.xml

@@ -8,12 +8,11 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginRight="6dp"
+        android:gravity="center_vertical"
         android:background="@drawable/shape_couse_type_text_bg"
         android:paddingLeft="4dp"
-        android:paddingTop="2dp"
         android:paddingRight="4dp"
-        android:paddingBottom="2dp"
-        android:text="--"
+        android:text="竖笛"
         android:textColor="@color/color_ff8c00"
         android:textSize="@dimen/sp_11"
         />

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

@@ -20,7 +20,7 @@ import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.contract.ModifyPasswordContract;
 import com.cooleshow.teacher.databinding.ActivityModifyPasswordBinding;
 import com.cooleshow.teacher.presenter.mine.ModifyPasswordPresenter;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 
 import org.json.JSONException;

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

@@ -16,7 +16,7 @@ import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.contract.SettingContract;
 import com.cooleshow.teacher.databinding.ActivitySettingBinding;
 import com.cooleshow.teacher.presenter.mine.SettingPresenter;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 
 import io.rong.imkit.utils.StatusBarUtil;

+ 5 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/splash/SplashActivity.kt

@@ -8,7 +8,9 @@ import com.cooleshow.base.router.RouterPath
 import com.cooleshow.base.ui.activity.BaseActivity
 import com.cooleshow.base.utils.SPUtils
 import com.cooleshow.teacher.databinding.ActivitySplashLayoutBinding
+import com.cooleshow.usercenter.constants.UserConstants
 import com.cooleshow.usercenter.helper.UserHelper
+import com.cooleshow.usercenter.ui.activity.VerifyCodeLoginActivity
 
 
 /**
@@ -59,7 +61,9 @@ class SplashActivity : BaseActivity<ActivitySplashLayoutBinding>() {
     }
 
     private fun jumpLogin() {
-        ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN).navigation()
+        ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
+            .withInt(UserConstants.LOGIN_ITEM,VerifyCodeLoginActivity.TEACHER_ITEM)
+            .navigation()
     }
 
 }

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceAccomPanyUtils.java

@@ -10,7 +10,7 @@ import android.webkit.JavascriptInterface;
 
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.router.RouterPath;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.gyf.immersionbar.ImmersionBar;
 

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceHelper.java

@@ -8,7 +8,7 @@ import android.webkit.JavascriptInterface;
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.utils.LogUtils;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 
 import org.json.JSONException;

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceUtils.java

@@ -13,7 +13,7 @@ import android.webkit.JavascriptInterface;
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.common.WebApi;
 import com.cooleshow.base.router.RouterPath;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.gyf.immersionbar.ImmersionBar;
 

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

@@ -1,12 +0,0 @@
-package com.cooleshow.usercenter;
-
-/**
- * Author by pq, Date on 2022/4/24.
- */
-public class UserConstants {
-    public static final String PHONE_NUM_KEY="phone_num_key";
-    public static final String TEMP_TOKEN="temp_token";
-    public static final String LOGIN_STATUS="login_status";
-    public static final String LOGIN_STATUS_SUCCESS="login_success";
-
-}

+ 5 - 1
usercenter/src/main/java/com/cooleshow/usercenter/constants/UserConstants.java

@@ -8,5 +8,9 @@ public class UserConstants {
     public static final String SEND_VERIFY_CODE_TYPE_LOGIN ="LOGIN";//发送验证码type-登录
     public static final String SEND_VERIFY_CODE_TYPE_REGISTER ="REGISTER";//发送验证码type-注册
     public static final String SEND_VERIFY_CODE_TYPE_BANK ="BANK";//发送验证码type-绑定银行卡
-
+    public static final String LOGIN_ITEM ="login_item";//发送验证码type-绑定银行卡
+    public static final String PHONE_NUM_KEY="phone_num_key";
+    public static final String TEMP_TOKEN="temp_token";
+    public static final String LOGIN_STATUS="login_status";
+    public static final String LOGIN_STATUS_SUCCESS="login_success";
 }

+ 1 - 1
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/BindPasswordActivity.java

@@ -10,7 +10,7 @@ import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.usercenter.R;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.databinding.ActivityBindPwdLayoutBinding;
 import com.cooleshow.usercenter.helper.PhoneCheckHelper;
 import com.cooleshow.usercenter.presenter.BindPasswordPresenter;

+ 1 - 1
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/LoginActivity.kt

@@ -18,8 +18,8 @@ import com.cooleshow.base.utils.SpannableStringUtils
 import com.cooleshow.base.utils.ToastUtils
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper
 import com.cooleshow.usercenter.R
-import com.cooleshow.usercenter.UserConstants
 import com.cooleshow.usercenter.bean.UserLoginInfo
+import com.cooleshow.usercenter.constants.UserConstants
 import com.cooleshow.usercenter.databinding.ActivityLoginBinding
 import com.cooleshow.usercenter.helper.UserHelper
 import com.cooleshow.usercenter.presenter.LoginPresenter

+ 1 - 1
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeInputActivity.java

@@ -18,8 +18,8 @@ import com.cooleshow.base.utils.Utils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.base.widgets.VerifyEditText;
 import com.cooleshow.usercenter.R;
-import com.cooleshow.usercenter.UserConstants;
 import com.cooleshow.usercenter.bean.UserLoginInfo;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.databinding.ActivityInputCodeLayoutBinding;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.cooleshow.usercenter.presenter.VerifyLoginPresenter;

+ 9 - 2
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeLoginActivity.java

@@ -19,7 +19,7 @@ import com.cooleshow.base.utils.SpannableStringUtils;
 import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.usercenter.R;
-import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.constants.UserConstants;
 import com.cooleshow.usercenter.databinding.ActivityVerifyCodeLoginBinding;
 import com.cooleshow.usercenter.helper.PhoneCheckHelper;
 import com.cooleshow.usercenter.helper.UserHelper;
@@ -34,7 +34,8 @@ import androidx.annotation.Nullable;
 @Route(path = RouterPath.UserCenter.PATH_VERIFY_LOGIN)
 public class VerifyCodeLoginActivity extends BaseMVPActivity<ActivityVerifyCodeLoginBinding, VerifyLoginPresenter> implements View.OnClickListener {
     public static final int LOGIN_STATUS_REQUEST_CODE = 10000002;
-
+    public static final int TEACHER_ITEM = 1;
+    public static final int STUDENT_ITEM = 2;
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -49,6 +50,12 @@ public class VerifyCodeLoginActivity extends BaseMVPActivity<ActivityVerifyCodeL
 
     @Override
     protected void initView() {
+        int loginFromType = getIntent().getIntExtra(UserConstants.LOGIN_ITEM, 0);
+        if(loginFromType == TEACHER_ITEM){
+            viewBinding.tvHeaderTitle.setText("您好, \n欢迎使用酷乐秀学院");
+        } else if(loginFromType == STUDENT_ITEM){
+            viewBinding.tvHeaderTitle.setText("您好, \n欢迎使用酷乐秀");
+        }
         viewBinding.tvSendVerifyCode.setOnClickListener(this);
         viewBinding.tvLoginByCode.setOnClickListener(this);
         String phoneNum = getIntent().getStringExtra(UserConstants.PHONE_NUM_KEY);