|
@@ -86,6 +86,14 @@ public class JumpUtils {
|
|
|
ARouter.getInstance().build(RouterPath.CommentCenter.TEACHER_RECEIVED_COMMENT)
|
|
|
.navigation();
|
|
|
return true;
|
|
|
+ } else {
|
|
|
+ String params = routeBean.params;
|
|
|
+ if (!TextUtils.isEmpty(params)) {
|
|
|
+ String[] multiParams = getMultiParams(params, "courseGroupId", "courseId", "courseType");
|
|
|
+ if (multiParams != null) {
|
|
|
+ goCourseDetailByCourseType(multiParams[0], multiParams[1], multiParams[2]);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -162,7 +170,7 @@ public class JumpUtils {
|
|
|
//对应的课程详情
|
|
|
String courseType = getParams(routeBean.params, "courseType");
|
|
|
String courseGroupId = getParams(routeBean.params, "courseGroupId");
|
|
|
- goCourseGroupDetailByCourseType(courseGroupId,courseType);
|
|
|
+ goCourseGroupDetailByCourseType(courseGroupId, courseType);
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -184,7 +192,28 @@ public class JumpUtils {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- private static void goCourseGroupDetailByCourseType(String courseGroupID,String courseType) {
|
|
|
+ private static void goCourseDetailByCourseType(String courseGroupID, String courseId, String courseType) {
|
|
|
+ LOG.i("goCourseDetailByCourseType: courseGroupID="+courseGroupID+"---courseId="+courseId+"---courseType="+courseType);
|
|
|
+ if (TextUtils.equals(courseType, Constants.VIP_COURSE_TAG)) {
|
|
|
+ ARouter.getInstance()
|
|
|
+ .build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
|
|
|
+ .withString("course_id", courseId)
|
|
|
+ .withString("course_group_id", courseGroupID)
|
|
|
+ .navigation();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (TextUtils.equals(courseType, Constants.INTEREST_COURSE_TAG)) {
|
|
|
+ ARouter.getInstance()
|
|
|
+ .build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
|
|
|
+ .withString("course_id", courseId)
|
|
|
+ .withString("course_group_id", courseGroupID)
|
|
|
+ .navigation();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void goCourseGroupDetailByCourseType(String courseGroupID, String courseType) {
|
|
|
//VIP课课程组详情
|
|
|
if (TextUtils.equals(courseType, Constants.VIP_COURSE_TAG)) {
|
|
|
ARouter.getInstance().build(RouterPath.CourseCenter.VIP_COURSE_GROUP_DETAIL)
|
|
@@ -220,6 +249,22 @@ public class JumpUtils {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
+ private static String[] getMultiParams(String paramsJson, String... keys) {
|
|
|
+ try {
|
|
|
+ String[] results = new String[keys.length];
|
|
|
+ paramsJson.replace("\\", "");
|
|
|
+ JSONObject jsonObject = new JSONObject(paramsJson);
|
|
|
+ for (int i = 0; i < keys.length; i++) {
|
|
|
+ results[i] = jsonObject.optString(keys[i]);
|
|
|
+ LOG.i(keys[i] + " value is:" + results[i]);
|
|
|
+ }
|
|
|
+ return results;
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 跳转首页,选中目标页面
|
|
|
*
|