Преглед изворни кода

修改训练工具跳转参数

Pq пре 1 година
родитељ
комит
f4d262965b

+ 1 - 1
institution/src/main/java/com/cooleshow/institution/stu/constants/JGWebConstants.java

@@ -33,7 +33,7 @@ public class JGWebConstants {
     //排行榜
     public static final String RANK_BOARD = getBaseUrlH5() + "/#/ranking-list";
     public static final String ACTIVATION_CODE = getBaseUrlH5() + "/#/activation-code";
-    public static final String TRAIN_TOOLS = getBaseUrlH5() + "/#/train-tool";
+    public static final String TRAIN_TOOLS = getBaseUrlH5() + "/#/train-tool?subjectType=%s";
     public static final String TRAIN_LIST = getBaseUrlH5() + "/#/train-list?subjectType=%s";
     //我的乐谱
     public static final String MUSIC_PERSONAL = getBaseUrlH5() + "/#/music-personal";

+ 2 - 2
institution/src/main/java/com/cooleshow/institution/stu/constants/JGWebStartHelper.java

@@ -107,10 +107,10 @@ public class JGWebStartHelper {
                 .navigation();
     }
 
-    public static void startTrainTools(){
+    public static void startTrainTools(String subjectType){
         ARouter.getInstance()
                 .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                .withString(WebConstants.WEB_URL, JGWebConstants.TRAIN_TOOLS)
+                .withString(WebConstants.WEB_URL, String.format(JGWebConstants.TRAIN_TOOLS,subjectType))
                 .navigation();
     }
 

+ 1 - 1
institution/src/main/java/com/cooleshow/institution/stu/ui/main/CardAnimFragment.java

@@ -119,7 +119,7 @@ public class CardAnimFragment extends BaseFragment<FgCardAnimLayoutBinding> {
                 if(UiUtils.isFastClick()){
                     return;
                 }
-                JGWebStartHelper.startTrainTools();
+                JGWebStartHelper.startTrainTools(pageTypeValue);
             }
         });
     }

+ 5 - 5
institution/src/main/java/com/cooleshow/institution/stu/ui/main/MineFragment.java

@@ -143,20 +143,20 @@ public class MineFragment extends BaseMVPFragment<FgMineLayoutBinding, MinePrese
             return;
         }
 
-        if(id == R.id.view_class_num){
+        if (id == R.id.view_class_num) {
             JGWebStartHelper.startVipCenter();
             return;
         }
-        if (id == R.id.view_student_num){
-            JGWebStartHelper.startTrainTools();
+        if (id == R.id.view_student_num) {
+            JGWebStartHelper.startTrainTools("");
             return;
         }
 
-        if(id == R.id.tv_rank_board){
+        if (id == R.id.tv_rank_board) {
             JGWebStartHelper.startRankBoard();
             return;
         }
-        if(id == R.id.tv_activation_code){
+        if (id == R.id.tv_activation_code) {
             JGWebStartHelper.startActivationCodePage();
             return;
         }

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

@@ -14,6 +14,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.base.utils.LOG;
 import com.cooleshow.chatmodule.utils.helper.ChatHelper;
 import com.cooleshow.student.helper.EventHelper;
 import com.cooleshow.usercenter.constants.UserConstants;
@@ -53,6 +54,7 @@ public class JsInterfaceUtils extends Object {
             try {
                 JSONObject jsonObject = new JSONObject(message);
                 String api = jsonObject.getString("api");
+                LOG.i("api:"+api);
                 if ("back".equals(api)) {
                     activity.finish();
                 }