Commit 6edccd3c32dbeb819f053f6f03c90af4c1249ab4

Authored by liwei2917
1 parent 6d1cb318

修改送审页面

src/main/java/com/cnlive/shenhe/api/ContentControllerApi.java
@@ -199,9 +199,10 @@ public class ContentControllerApi { @@ -199,9 +199,10 @@ public class ContentControllerApi {
199 199
200 @GetMapping("/detail/{id}.html") 200 @GetMapping("/detail/{id}.html")
201 public Object getContentDetail(Model model, @PathVariable Integer id) { 201 public Object getContentDetail(Model model, @PathVariable Integer id) {
202 - System.out.println("1111"); 202 + System.out.println("数美送审页面开始进入");
203 ShyContent content = contentService.selectByPrimaryKey(id); 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 return "html/contentPage.html"; 206 return "html/contentPage.html";
206 } 207 }
207 208
src/main/resources/templates/html/contentPage.html
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html xmlns:th="http://www.thymeleaf.org"> 2 <html xmlns:th="http://www.thymeleaf.org">
3 <head> 3 <head>
4 - <title>图文内容</title> 4 + <title th:text="${contentTitle}">图文内容</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6 </head> 6 </head>
7 <body> 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 </body> 11 </body>
10 </html> 12 </html>
11 \ No newline at end of file 13 \ No newline at end of file