diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdExamController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdExamController.java index abce9e6..6f2e045 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdExamController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdExamController.java @@ -1,11 +1,13 @@ package com.ruoyi.web.controller.system; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.system.domain.TdQuestion; import com.ruoyi.system.service.ITdQuestionService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -28,11 +30,13 @@ public class TdExamController extends BaseController{ @RequiresPermissions("system:exam:view") @GetMapping() - public String exam() - { - return prefix + "/exam"; - } + public String index(ModelMap mmap){ + SysUser user = getSysUser(); + mmap.put("user", user); + return prefix + "/index"; + + } /** * 查询题库列表返回 */ @@ -47,6 +51,13 @@ public class TdExamController extends BaseController{ return getDataTable(list); } + /** + * 访问考试界面,点击开始答题,重定向到exam页面 + */ + @RequestMapping("/exam") + public String index(){ + return prefix + "/exam"; + } diff --git a/ruoyi-admin/src/main/resources/templates/system/exam/index.html b/ruoyi-admin/src/main/resources/templates/system/exam/index.html index 5a421f7..1dae158 100644 --- a/ruoyi-admin/src/main/resources/templates/system/exam/index.html +++ b/ruoyi-admin/src/main/resources/templates/system/exam/index.html @@ -57,7 +57,7 @@