diff --git a/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java b/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java index 0fa4b21..37d7d8c 100644 --- a/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java +++ b/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java @@ -23,6 +23,7 @@ import com.tamguo.modules.tiku.service.IBookService; import com.tamguo.modules.tiku.service.IChapterService; import com.tamguo.modules.tiku.service.ICourseService; import com.tamguo.modules.tiku.service.ISubjectService; +import com.tamguo.utils.BrowserUtils; /** * Controller - 科目 @@ -65,7 +66,11 @@ public class CourseController { model.addObject("subject", subject); model.addObject("bookList", bookList); model.addObject("book" , book); - model.setViewName("chapter"); + if(BrowserUtils.isMobile(request.getHeader("user-agent"))) { + model.setViewName("mobile/chapter"); + }else { + model.setViewName("chapter"); + } return model; } diff --git a/tamguo-tms/src/main/resources/templates/mobile/chapter.html b/tamguo-tms/src/main/resources/templates/mobile/chapter.html new file mode 100644 index 0000000..9a30faa --- /dev/null +++ b/tamguo-tms/src/main/resources/templates/mobile/chapter.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ 上海 +
+ +
+ +
+ + +
+ + + + + +
+

+ 章节学习更多 +

+
+
    +
  • + +
    +
    +
    +
    +
    + +
  • +
+
+
+ +
+ + + + +
+ +
+
+ + + + \ No newline at end of file