Commit 6edccd3c32dbeb819f053f6f03c90af4c1249ab4
1 parent
6d1cb318
修改送审页面
Showing
2 changed files
with
7 additions
and
4 deletions
src/main/java/com/cnlive/shenhe/api/ContentControllerApi.java
| ... | ... | @@ -199,9 +199,10 @@ public class ContentControllerApi { |
| 199 | 199 | |
| 200 | 200 | @GetMapping("/detail/{id}.html") |
| 201 | 201 | public Object getContentDetail(Model model, @PathVariable Integer id) { |
| 202 | - System.out.println("1111"); | |
| 202 | + System.out.println("数美送审页面开始进入"); | |
| 203 | 203 | ShyContent content = contentService.selectByPrimaryKey(id); |
| 204 | - model.addAttribute("content", content.getContent_text()); | |
| 204 | + model.addAttribute("contentText", content.getContent_text()); | |
| 205 | + model.addAttribute("contentTitle", content.getTitle()); | |
| 205 | 206 | return "html/contentPage.html"; |
| 206 | 207 | } |
| 207 | 208 | ... | ... |
src/main/resources/templates/html/contentPage.html
| 1 | 1 | <!DOCTYPE HTML> |
| 2 | 2 | <html xmlns:th="http://www.thymeleaf.org"> |
| 3 | 3 | <head> |
| 4 | - <title>图文内容</title> | |
| 4 | + <title th:text="${contentTitle}">图文内容</title> | |
| 5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 6 | 6 | </head> |
| 7 | 7 | <body> |
| 8 | - <div th:utext=" ${content}">3333</div> | |
| 8 | + <div style="height:50px;text-align:center;font-size:26px;color:#3a3a3a;" | |
| 9 | + th:text=" ${contentTitle}">标题</div> | |
| 10 | + <div th:utext=" ${contentText}">内容</div> | |
| 9 | 11 | </body> |
| 10 | 12 | </html> |
| 11 | 13 | \ No newline at end of file | ... | ... |